This repository has been archived by the owner on Jan 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
REST API :: Prefs
George Czabania edited this page Feb 19, 2014
·
5 revisions
GET /api/prefs
Parameters:
No parameters
Example Request:
curl -X GET \
-H "Authorization: bearer <token>" \
https://nitro-server.herokuapp.com/api/prefs
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"sort": 1,
"night": 0,
"language": "en-us",
"weekStart": 1,
"dateFormat": "dd/mm/yy",
"moveCompleted": 0,
"confirmDelete": 1
}
GET /api/prefs/:key
Parameters:
-
key
: a string. Can be any ofsort
,night
,language
,weekStart
,dateFormat
,moveCompleted
,confirmDelete
.
Example Request:
curl -X GET \
-H "Authorization: bearer <token>" \
https://nitro-server.herokuapp.com/api/prefs/language
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"language": "en-us"
}
PUT /api/prefs
Example Request:
curl -X PUT \
-H "Authorization: bearer <token>" \
-H "Content-Type: application/json" \
-d '{"confirmDelete":0,"dateFormat":"mm/dd/yy"}' \
https://nitro-server.herokuapp.com/api/prefs
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"sort": 1,
"night": 0,
"language": "en-us",
"weekStart": 1,
"dateFormat": "mm/dd/yy",
"moveCompleted": 0,
"confirmDelete": 0
}