mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
1.5 KiB
1.5 KiB
Administration
GET v1/config
Fetch configuration values:
curl "https://goscrobble.com/api/v1/config" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6ZmFsc2UsImVtYWlsIjoidGVzdEB0ZXN0LmNvbSIsImV4cCI6MTY0MTAwMjUxOSwiaWF0IjoxNjQwMzk3NzE5LCJtb2QiOnRydWUsI"
Response:
{
"SPOTIFY_API_ID": "abc",
"SPOTIFY_API_SECRET": "def",
"REGISTRATION_ENABLED": true
}
Fetch instance configuration values.
HTTP Request
GET https://goscrobble.com/api/v1/config
POST v1/config
Update a configuration parameter:
curl "https://goscrobble.com/api/v1/config" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6ZmFsc2UsImVtYWlsIjoidGVzdEB0ZXN0LmNvbSIsImV4cCI6MTY0MTAwMjUxOSwiaWF0IjoxNjQwMzk3NzE5LCJtb2QiOnRydWUsI" \
-X POST \
--data '{"SPOTIFY_API_ID":"notarealapikey","SPOTIFY_API_SECRET":"notarealsecret"}'
Response:
{
"message": "Config updated successfully"
}
Updates instance configuration values.
HTTP Request
POST https://goscrobble.com/api/v1/config
Query Parameters
Parameter | Required | Description |
---|---|---|
key | true | Array of key/value pairs to update. See example. |