-
Notifications
You must be signed in to change notification settings - Fork 1
DB server API
Sofiia Tesliuk edited this page Feb 8, 2020
·
1 revision
Action | URL http://server_path |
Method |
Create user
/user_sign_up
POST
/user_sign_up
Request
{
"email": str,
"name": str,
"phone number": str,
"password": str
}
Response
{
"user_id": int
}
Check user
/user_check_password
GET
/user_check_password
Request
{
"email": str,
"password": str
}
Response
{
"user_id": int
}
Get items
/items
GET
/items
Request
{}
Response
{
"categories": [{
"category_id": int,
"name": str,
"items_id": [int]
}]
"items": {
"item_id": str
}
}
Get posts
/posts
GET
/posts
Request
{
"city_id": int,
"time_from": str,
"time_to": str,
"categories_id": [int],
"items_id": [int]
}
Response
{
"posts": [{
"post_id": int,
"user_id": int,
"time_from": str,
"time_to": str,
"location_id": int,
"description": str,
"category_id": [int]
"items_id": [int]
}]
"users": {
"user_id": {
"name": str,
"phone_number": str
},
}
"locations": {
"location_id": {
"region_id": int,
"address": str,
"longitude": double,
"latitude": double
}
}
"regions": {
"region_id": {
"name": str
}
}
}
Something wrong
/*
GET/PUT/POST
/*
Request
{}
Response
{
"error": str
}