YogiBot API v2

The YogiBot API is the backend for the YogiBot website and other apps. Because the API is public other projects can use it too. The sayings are from a tea I love to drink: YOGI TEA.

Parameters for the YogiBot API v2

Base URL: https://poopjournal.rocks/YogiBot/API/v2/api.php
Authentication: no, public API
Errors: no (only HTTP Status Codes)

Supported Languages

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.