You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
1.5 KiB
84 lines
1.5 KiB
4 years ago
|
# Routes
|
||
|
|
||
|
## POST `/register`
|
||
|
|
||
|
### Request type: `application/json`
|
||
|
|
||
|
### Request:
|
||
|
- username: `string`
|
||
|
- email: `string`
|
||
|
- password: `string`
|
||
|
|
||
|
### Response:
|
||
|
- success: `boolean`
|
||
|
- msg: `string` (if success false)
|
||
|
|
||
|
## POST `/user`
|
||
|
|
||
|
### Request type: ``application/json``
|
||
|
|
||
|
### Request:
|
||
|
- username: `string`
|
||
|
- password: `string`
|
||
|
|
||
|
### Response:
|
||
|
- success: `boolean`
|
||
|
- msg: `string` (if success false)
|
||
|
- token: `string`
|
||
|
|
||
|
## GET `/search/:query`
|
||
|
|
||
|
### Headers:
|
||
|
- Authentication: `token`
|
||
|
|
||
|
### Response:
|
||
|
- success: `boolean`
|
||
|
- msg: `string` (if success false)
|
||
|
- results: `object array`
|
||
|
- movieId: `string`
|
||
|
- title: `string`
|
||
|
- overview: `string`
|
||
|
- poster: `string`
|
||
|
- release: `string`
|
||
|
|
||
|
## GET `/movie/:movieId`
|
||
|
|
||
|
### Headers:
|
||
|
- Authentication: `token`
|
||
|
|
||
|
### Response:
|
||
|
- success: `boolean`
|
||
|
- msg: `string` (if success false)
|
||
|
- data:
|
||
|
- movieId: `string`
|
||
|
- title: `string`
|
||
|
- overview: `string`
|
||
|
- poster: `string`
|
||
|
- release: `string`
|
||
|
- watchStatus: `undefined|string`
|
||
|
- rating: `undefined|string`
|
||
|
|
||
|
|
||
|
## POST `/movie/:movieId`
|
||
|
|
||
|
### Headers:
|
||
|
- Authentication: `token`
|
||
|
|
||
|
### Request type: ``application/json``
|
||
|
|
||
|
### Request:
|
||
|
- watchStatus: `string ∈ ["PLANNED", "IN_PROGRESS", "COMPLETED"]`
|
||
|
- rating: `string ∈ ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]`
|
||
|
|
||
|
### Response:
|
||
|
- success: `boolean`
|
||
|
- msg: `string` (if success false)
|
||
|
- data:
|
||
|
- movieId: `string`
|
||
|
- title: `string`
|
||
|
- overview: `string`
|
||
|
- poster: `string`
|
||
|
- release: `string`
|
||
|
- watchStatus: `undefined|string`
|
||
|
- rating: `undefined|string`
|