BacLibAPI
BacLibAPI by Marius Müller http://mariusmüller.de
See https://documenter.getpostman.com/view/8028167/SVSRG67r?version=latest for live (full working) version.
Request without parameters. Returns error.
curl --location --request GET "https://openballot.de/bac3/project/api.php"
Error 400 Topic not set.
Basic request with topic (required).
topic (required)
curl --location --request GET "https://openballot.de/bac3/project/api/?topic=trump"
{
"result": {
"count": 1,
"sum": 2268,
"mean": 2268,
"median": "2268",
"max": "2268",
"senti": -617.051998999581,
"senti_mean": -0.2720687826276812,
"date_array": [
"2019"
Request with one topic and all other possible parameters.
topic: one word (required)
unit: D / M / Y / W (optional)
start year (optional)
end year (optional)
curl --location --request GET "https://openballot.de/bac3/project/api/?topic=trump&unit=Y&start=2018-01-01&end=2019-12-31"
{
"result": {
"count": 2,
"sum": 4527,
"mean": 2263.5,
"median": 2263.5,
"max": "2268",
"senti": -1302.6277991867537,
"senti_mean": -0.2877775963132148,
"date_array": [
"2018",
Request with multiple topics and all possible parameters.
topic: one word (required)
unit: D / M / Y / W (optional)
start year (optional)
end year (optional)
second topic (optional)
third topic (optional)
curl --location --request GET "https://openballot.de/bac3/project/api/?topic=trump&unit=Y&start=2018-01-01&end=2019-12-31&topic_b=merkel&topic_c=usa"
{
"result": {
"count": 2,
"sum": 9416,
"mean": 4708,
"median": 4708,
"max": "4921",
"senti": -2571.4008000883186,
"senti_mean": -0.2740111068375977,
"date_array": [
"2018",
Request with all possible parameters for year 2000-2001. For testing. Returns parameter and zero results.
topic: one word (required)
unit: D / M / Y / W (optional)
start year (optional)
end year (optional)
second topic (optional)
third topic (optional)
curl --location --request GET "https://openballot.de/bac3/project/api/?topic=trump&unit=Y&start=2000-01-01&end=2001-12-31&topic_b=merkel&topic_c=usa"
{
"result": {
"count": 0,
"sum": 0,
"mean": 0,
"median": 0,
"max": "0",
"senti": 0,
"senti_mean": 0,
"date_array": [
"2000",
Returns two posts from mariusmüller.de. Parameter are known, tested and have to fit 100% for all.
topic: one word (required)
unit: D / M / Y / W (optional)
start year (optional)
end year (optional)
second topic (optional)
curl --location --request GET "https://openballot.de/bac3/project/api/?topic=rp19&unit=Y&start=2018-01-01&end=2019-12-31&topic_b=seligenstadt"
{
"result": {
"count": 2,
"sum": 2,
"mean": 1,
"median": 1,
"max": "1",
"senti": 0.3609999935142696,
"senti_mean": 0.1804999967571348,
"date_array": [
"2018",
Request without parameters. Returns error.
curl --location --request GET "https://openballot.de/bac3/project/api-draft.php"
Error 400 Topic not set.
Request with multiple topics and all possible parameters.
topic: one word (required)
unit: D / M / Y / W (optional)
start year (optional)
end year (optional)
second topic (optional)
third topic (optional)
curl --location --request GET "https://openballot.de/bac3/project/api/api-draft.php?topic=trump&unit=Y&start=2018-01-01&end=2019-12-31&topic_b=merkel&topic_c=usa"
Request with all possible parameters for year 2000-2001. For testing. Returns parameter and zero results.
topic: one word (required)
unit: D / M / Y / W (optional)
start year (optional)
end year (optional)
second topic (optional)
third topic (optional)
curl --location --request GET "https://openballot.de/bac3/project/api/api-draft.php?topic=trump&unit=Y&start=2000-01-01&end=2001-12-31&topic_b=merkel&topic_c=usa"
Returns two posts from mariusmüller.de. Parameter are known, tested and have to fit 100% for all.
topic: one word (required)
unit: D / M / Y / W (optional)
start year (optional)
end year (optional)
second topic (optional)
curl --location --request GET "https://openballot.de/bac3/project/api/api-draft.php?topic=rp19&unit=Y&start=2018-01-01&end=2019-12-31&topic_b=seligenstadt"