Parameters for the YogiBot API v2
Base URL: https://poopjournal.rocks/YogiBot/API/v2/api.phpAuthentication: no, public API
Errors: no (only HTTP Status Codes)
- lng - language
- cnt - count ---> range is 1000
Supported Languages
- en - English
- de - German
- ...more languages planned...
Commands for the YogiBot API v2
Filter by language
Example: https://poopjournal.rocks/YogiBot/API/v2/api.php?command=filter_by_lang&lng=de
This command gives you sayings in your requested language. The example gives you German sayings only. You can use the cnt parameter (e.g. https://poopjournal.rocks/YogiBot/API/v2/api.php?command=filter_by_lang&lng=de&cnt=3) to get more than one saying.
Competely Random Saying
Example: https://poopjournal.rocks/YogiBot/API/v2/api.php?command=get_random_one
This command gives you a completely random saying. You can add the lng parameter (e.g. https://poopjournal.rocks/YogiBot/API/v2/api.php?command=get_random_one&lng=de) to get a random saying from a specific language. The cnt parameter works here too (e.g. https://poopjournal.rocks/YogiBot/API/v2/api.php?command=get_random_one&lng=de&cnt=4).
Get By ID(s)
Examples: https://poopjournal.rocks/YogiBot/API/v2/api.php?command=get_by_id&id=2 or https://poopjournal.rocks/YogiBot/API/v2/api.php?command=get_by_ids&id=2,3,4
You can use that command if you need one or more specific ids.
Get All Records
Example: https://poopjournal.rocks/YogiBot/API/v2/api.php?command=all
This command gives you all available records. Keep the range of 1000 in mind. I may send you a MySQL database dump if you are interested.
Code & Contact
The source is available on GitHub. You can reach me via [email protected]. Thanks.