Skip to content
Justin edited this page Sep 30, 2013 · 8 revisions

Item 목록 얻어오기

  • Path: /v1/items

  • Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN

  • Method: GET

  • Parameters:

    Name Type Description
    key Array of String 얻어오고자 아는 item의 key 목록
  • Request URI Example:

http://[server-url]/v1/item?key=hearts&key=character.

  • Response Body: JSON
Name Type Description
result_code Number Error Code 참고
result_message Option[String] 실패한 경우에 메시지 있을 수 있음
items JSON Object
key String item의 key
value Number item의 count
  • Response Body Example:
{
    "result_code": 0,
    "items": {
        "stone": 100,
        "candy": 200,
        "character.angel": 1
    }
}

Item 사용

  • Path: /v1/items
  • Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
  • Method: POST
  • Request Body:
Name Type Description
items JSON Array 다음을 포함하는 JSON Array
Name Type Description
key String 사용할 아이템의 key
count Number 사용할 아이템의 값. count 만큼 차감됨
to_key Option[String] 다른 아이템으로 전환하고자 할 때, 전환하고자 하는 아이템의 key.
전환 비율은 partner에서 미리 정의해 두어야 함
이 값이 없으면 단순히 'key'의 아이템의 값이 차감됨
with_return_values Boolean true이면 변경된 데이터를 결과에 포함한다.
Default는 false
  • Response Body: JSON
Name Type Description
result_code Number Error Code 참고
result_message Option[String] 실패한 경우에 메시지 있을 수 있음
items Option[JSON Array] 변경된 item의 값들
with_return_values가 true이면 포함됨
Name Type Description
key String 아이템의 key
count Number 변경된 아이템의 값

Clone this wiki locally