2015-03-09 12:20:32 +00:00
|
|
|
{
|
2017-10-02 07:51:34 +00:00
|
|
|
"base_url" : "https://sync.koreader.rocks:443/",
|
2015-03-09 12:20:32 +00:00
|
|
|
"name" : "koreader-sync-api",
|
|
|
|
"methods" : {
|
|
|
|
"register" : {
|
|
|
|
"path" : "/users/create",
|
|
|
|
"method" : "POST",
|
|
|
|
"required_params" : [
|
|
|
|
"username",
|
|
|
|
"password",
|
|
|
|
],
|
|
|
|
"payload" : [
|
|
|
|
"username",
|
|
|
|
"password",
|
|
|
|
],
|
|
|
|
"expected_status" : [201, 402]
|
|
|
|
},
|
|
|
|
"authorize" : {
|
|
|
|
"path" : "/users/auth",
|
|
|
|
"method" : "GET",
|
|
|
|
"expected_status" : [200, 401]
|
|
|
|
},
|
|
|
|
"update_progress" : {
|
|
|
|
"path" : "/syncs/progress",
|
|
|
|
"method" : "PUT",
|
|
|
|
"required_params" : [
|
|
|
|
"document",
|
|
|
|
"progress",
|
|
|
|
"percentage",
|
|
|
|
"device",
|
2016-07-30 00:38:02 +00:00
|
|
|
"device_id",
|
2015-03-09 12:20:32 +00:00
|
|
|
],
|
|
|
|
"payload" : [
|
|
|
|
"document",
|
|
|
|
"progress",
|
|
|
|
"percentage",
|
|
|
|
"device",
|
2016-07-30 00:38:02 +00:00
|
|
|
"device_id",
|
2015-03-09 12:20:32 +00:00
|
|
|
],
|
|
|
|
"expected_status" : [200, 202, 401]
|
|
|
|
},
|
|
|
|
"get_progress" : {
|
|
|
|
"path" : "/syncs/progress/:document",
|
|
|
|
"method" : "GET",
|
|
|
|
"required_params" : [
|
|
|
|
"document",
|
|
|
|
],
|
|
|
|
"expected_status" : [200, 401]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|