Skip to content

Returns cached information of foodsharing donation-goal via third service provider twingle.

GET
/api/donation-goal

Authorizations

api_key
Type: API Key (header: X-CSRF-Token)

Responses

Successful
JSON
{
"donators": 42,
"receivedDonationsInEuros": 1337,
"goalInEuros": 2000,
"percentOfGoalReached": 66.85,
"isGoalReached": true,
"updatedAt": "2019-02-01T03:45:27.612584Z"
}
Authorization
api_key
cURL
curl -X GET \
'http://localhost/api/donation-goal'

Samples

cURL
curl -X GET http://localhost/api/donation-goal
JavaScript
fetch("http://localhost/api/donation-goal")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("http://localhost/api/donation-goal");
Python
import requests
response = requests.get("http://localhost/api/donation-goal")
print(response.json())