GodspeakAPI
A simple API for generating random words ("godspeaks"), inspired by the works of Terrence Andrew Davis (Rest In Peace, King).
Installation
git clone https://github.com/eccentrici/godspeakapi.git
cd godspeakapi
pip install -r r.txt
python main.py
Usage
If you don't wish to host the GodspeakAPI yourself; I offer my own public available API at i386.tk. I will be using that website below, if you are self hosting; use your loopback or your fowarded host.
curl -L -X GET -H 'Content-Type: application/json' http://i386.tk/get\?num\=1
If you wish to use the Vocab.DD vocabulary:
curl -L -X GET -H 'Content-Type: application/json' http://i386.tk/get\?num\=5&dict=vocab
If you wish to extract only the Godspeak data you can do so using jq:
curl -s -L -X GET -H 'Content-Type: application/json' http://i386.tk/get\?num\=1 | jq '.Godspeak'
Example
Usage within the Python Interpreter:
>>> import requests
>>> response = requests.get('http://i386.tk/get?num=1')
>>> print(response.json()['Godspeak'])
don't_even_think_about_it
Credit
Thank you xslendix, for refractoring my code. View their version at https://git.kiwifarms.net/slendi/TempleAPI