API DOCS - Another-Company/BackEnd GitHub Wiki
USERS
Create, Login(Allow Any)
POST /api/users/
Parameters
uid: Integer
Response
STATUS_CODE: 201 Created
{
uid: Integer
token: String
}
Album
Album List (Is Authenticated)
GET /api/albums/
Headers
Authorization: Token {token_value}
Response
STATUS_CODE: 200 OK
{
id: Integer (album id)
title: string
created_date: DateTime
user_id: Integer (user id)
}
Create Album (Is Authenticated)
POST /api/albums/
Headers
Authorization: Token {token_value}
Params
title: string
Response
STATUS_CODE: 201 Create
{
id: Integer (album id)
title: string
created_date: DateTime
user_id: Integer (user id)
}
Update Album (Is Authenticated)
PATCH /api/albums/{album_id}/
Headers
Authorization: Token {token_value}
Parameters
title: string
Response
STATUS_CODE: 204 NoContent
{}
Photo
Photo List (Is Authenticated)
GET /api/photos/
Headers
Authorization: Token {token_value}
Response
STATUS_CODE: 200 OK
[
{
"album": Integer (album id),
"title": String,
"photo": String(type URL),
"user": Integer (user id),
"latitude": Float,
"longitude": Float
}
]
Create Photo (Is Authenticated)
POST /api/photos/
Headers
Authorization: Token {token_value}
Params
photo: Image
album: Integer (album id)
Response
STATUS_CODE: 201 Created
{
"album": Integer (album id),
"title": String,
"photo": String(type URL),
"user": Integer (user id),
"latitude": Float,
"longitude": Float
}