Skip to content

purplepig4657/boongsaegwon_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

우리 동네 붕세권 Back-end Server

API

route required data response data description
/ None - html for test
/get_store_info json("id": String or "store_id": Int) - json("ok": Boolean, "error": String(if "ok" is false), "name": String, "store_name": String, "category": String, "store_description": String, "store_open_info": String, "store_photo": json(), "menu_info": json())
/get_location json("store_id": Int) - json("ok": Boolean, "error": String(if "ok" is false), "store_name": String, "is_open": Boolean, "latitude": Double, "longitude": Double)
/get_all_location None - json("ok": Boolean, "error": String(if "ok" is false), "store_id": Int, "is_open": Boolean, locations": [json("latitude": Double, "longitude": Double), ...])
/set_store_info json("id": String, "name": String, "store_name": String, "category": String, "store_description": String, "store_open_info": json(), "store_photo": json(), "menu_info": json()) - json("ok": Boolean, "error": String(if "ok" is false))
/set_location json("id": String, "latitude": Double, "longitude": Double, "is_open": Boolean) - json("ok": Boolean, "error": String(if "ok" is false))
/login json("id": String, "password": String) - json("ok": Boolean, "error": String(if "ok" is false), "token": String)
/logout json("id": String) - json("ok": Boolean, "error": String(if "ok" is false))
/register json("id", String, "password": String) - json("ok": Boolean, "error": String(if "ok" is false))

API Examples

/get_store_info: json

request

{
    "id": "String",
    or "store_id": 2,
}

response

{
    "ok": true,
    "error": None,
    "name": "purple pig",
    "store_name": "my_store",
    "category": "Default",
    "store_description": "It is purple pig's store",
    "store_open_info": {
        "information": [
            "월, 화 -> 대전광역시 유성구 ~ 16시 ~ 20시",
            "월, 화 -> 대전광역시 유성구 ~ 16시 ~ 20시",
        ]
    },
    "store_photo": {
            "photo_urls": [
                 "photo_url",
                 "photo_url",
            ]
    },
    "menu_info": {
        "menu": [
             { "name": "음식", "price": 10000, "photo": "photo_url", },
             { "name": "음식", "price": 20000, "photo": "photo_url", },
        ]
    },
}

/get_location: json

request

{
     "store_id": 2,
}

response

{
    "ok": true,
    "error": None,
    "store_name": "hello",
    "is_open": True,
    "latitude": 34.53252,
    "longitude": 124.53252,
}

/get_all_location: json

request

None

response

{
    "ok": true,
    "error": None,
    "locations": [
        { "store_id": 2, "latitude": 63.342435, "longitude": 123.523425 },
        { "store_id": 3, "latitude": 142.342435, "longitude": 23.523425 },
    ],
}

/set_store_info: json

request

{
    "id": "purplepig",
    "name": "changed name",
    "store_name": "my_store",
    "category": "Default",
    "store_description": "It is purple pig's store. ok?",
    "store_open_info": {
        "information": [
            "월, 화 -> 대전광역시 유성구 ~ 16시 ~ 20시",
            "월, 화 -> 대전광역시 유성구 ~ 12시 ~ 20시",
        ]
    },
    "store_photo": {
            "photo_urls": [
                 "photo_url",
                 "raw data base64 encoded",
                 "raw data base64 encoded",
            ]
    },
    "menu_info": {
        "menu": [
             { "name": "음식", "price": 10000, "photo": "photo_url", },
             { "name": "치킨", "price": 30000, "photo": "raw data base64 encoded", },
        ]
    },
}

response

{
     "ok": true,
     "error": None,
}

/set_location: json

request

{
    "id": "purplepig",
    "latitude": 63.342435,
    "longitude": 123.523425,
    "is_open": true,
}

response

{
     "ok": true,
     "error": None,
}

About

boongsaegwon server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors