Shop api protocol - SG-Finder/auth_server GitHub Wiki
Deal Item
Request
- endpoint: POST /finder/shop
- header
Key |
Value |
Type |
Info |
session-token |
askfziouh&%=as |
string |
μΈμ
ν ν° |
userId |
gksxodnd007 |
string |
μμ΄λ |
Key |
Value |
Type |
Info |
nickname |
Zookeeper |
string |
νλ μ΄μ΄ λλ€μ |
item |
knife |
string |
μμ΄ν
μ΄λ¦ |
count |
2 |
int |
μμ΄ν
μ΄μ©κΆ νμ |
count κ°μ΄ μμμΌ κ²½μ° νλ§€λ‘ μΈμ
Response
Success
Key |
Value |
Type |
Info |
nickname |
Zookeeper |
string |
νλ μ΄μ΄μ λλ€μ |
weapons |
[ knife, gun ] |
json array |
μμ΄ν
λͺ©λ‘ |
point |
0 |
int |
νλ μ΄μ΄μ ν¬μΈνΈ |
example
{
"nickname": "zookeeper",
"weapons": [
{
"name": "knife",
"damage": 50,
"price": 100,
"usableCount": 3
},
{
"name": "gun",
"damage": 100,
"price": 200,
"usableCount": 3
}
],
"point": 100
}
Fail
Key |
Value |
Type |
Info |
code |
409 |
int |
μλ¬ μ½λ |
message |
ν¬μΈνΈκ° λΆμ‘±ν©λλ€ |
string |
μλ¬ λ©μμ§ |
Failμ΄ λ μ μλκ²½μ°
404 : BAD_REQUEST
- bodyμ parameter formκ·κ²©μ΄ λ§μ§ μμκ²½μ°
409 : UNAUTHORIZED
- ν ν° κ°μ΄ λ§λ£ λμ κ²½μ°
- ν¬μΈνΈκ° λΆμ‘±ν κ²½μ°
500 : INTERNAL SERVER ERROR
Get Shop's Item List
Request
- endpoint: GET /finder/shop/item?count={count}&cursor={cursor}
- header
Key |
Value |
Type |
Info |
session-token |
askfziouh&%=as |
string |
μΈμ
ν ν° |
Response
Success
Key |
Value |
Type |
Info |
cursor |
10 |
int |
λ€μ νμ΄μ§ ν ν° |
totalCount |
20 |
int |
itemμ μ΄ κ°―μ |
data |
[{item1}, {item2}] |
json Array |
itemμ λ°μ΄ν°λ€ |
Fail
Key |
Value |
Type |
Info |
code |
400 |
int |
μν μ½λ |
message |
λλ€μμ μ
λ ₯ν΄μ£ΌμΈμ |
string |
μλ¬ λ©μμ§ |
Fail μ΄ λ μ μλ κ²½μ°
401 : UNAUTHORIZED
- headerμ ν ν°κ°μ΄ μκ±°λ λ§λ£ λμμ κ²½μ°
500 : INTERNAL SERVER ERROR