-
Notifications
You must be signed in to change notification settings - Fork 0
Version 3
- Post의 경우 request body는 JSON으로 한다.
- Authentication 정보는 HTTP Header에 같이 보낸다.
- 모든 통신은 HTTPS로 한다.
| 종류 | Host |
|---|---|
| Beta (Staging) | https://beta.api.hive5.io |
| Production | https://api.hive5.io |
다음 parameter를 HTTP Header에 실어서 보낸다.
| Name | Value |
|---|---|
| X-APP-KEY | 게임에 발급된 app key. 모든 API 호출에 필요. |
| X-AUTH-UUID | 디바이스 고유의 UUID. 모든 API 호출에 필요. 안드로이드의 경우에는 설치 직후 UUID를 생성하여 넘겨준다.(권고사항) |
| X-AUTH-TOKEN | 서버에서 발급한 인증 token. 사용자 식별이 필요한 API호출에 필요 로그인 API를 호출하면 응답결과로 받음 |
게임 클라이언트가 시작되고, 로그인을 위해 서버로 호출하는 함수
- Path: /:version/auth/anonymous
- Authentication Header: X-APP-KEY, X-AUTH-UUID
- Method: GET
- Parameter:
| Name | Type | Description |
|---|---|---|
| os | String | 'android' 또는 'ios' |
| user_data_key | Array of String | 로그인 후 가져와야할 사용자 user data의 key |
| item_key | Array of String | 로그인 후 가져와야할 사용자 item의 key |
| config_key | Array of String | 로그인 후 가져와야할 사용자 configuration의 key |
- Request URI Example:
https://[server-url]/:version/auth/anonymous?user_data_key=level&user_data_key=score&item_key=character.&config_key=version&config_key=is_under_maintenance
- Response Body: JSON
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | ||||||||||||||||||||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | ||||||||||||||||||||||||
| access_token | String | 로그인한 사용자를 위한 access token | ||||||||||||||||||||||||
| user_data | JSON data | user_data_key에 명시된 사용자 데이터들을 json 형태로 반환 | ||||||||||||||||||||||||
| items | JSON data |
|
||||||||||||||||||||||||
| configs | JSON data | config_key에 명시된 configuration 데이터들을 json 형태로 반환 | ||||||||||||||||||||||||
| agreements | JSON data |
사용자가 동의한 약관에 대한 정보 key는 약관의 이름, value는 다음과 같다.
|
||||||||||||||||||||||||
| promotions | JSON Array |
현재 진행 중인 promotion에 대한 목록
|
||||||||||||||||||||||||
| completed_missions | JSON Object | JSON object의 key는 mission key이고, value는 미션 완료한 시간 시간 형식은 "yyyy-MM-dd'T'HH:mm:ss |
- Response Body Example:
{
"result_code": 0,
"access_token": "iuojsdof-SDFSDF-sdf24-123",
"user_data": {
"key1": "value1",
"key2": "value2"
},
"items": {
"candy": {
"value": 500
},
"character.angel": {
"value": 1,
"locked": false
},
"stone": {
"value": 100
},
"character.elvis": {
"value": 0,
"locked": true
},
"star": {
"value": 1,
"recharge_info": {
"max": 5,
"next_recharges_at": "2013-10-06T05:50:08",
"recharges_in_sec": 3600
}
},
"character.devil": {
"value": 0,
"locked": true
},
"character.viking": {
"value": 0,
"locked": true
}
},
"configs": {
"config1": "value1",
"config2": "value2"
},
"agreements": {
"agreement1": {
"version": "1.1.0",
"agreed_at": "2013-10-05T14:19:53"
},
"agreement2": {
"version": "2.2",
"agreed_at": "2013-10-05T14:19:53"
}
},
"promotions": [
{
"id": 1,
"name": "pre_promotion",
"apply_url": "http://hive5.io/promotions",
"display_url": "http://hive5.io/promotions",
"order":1
}
],
"completed_missions": {
"mission_key_1": "2013-12-01T14:00:11",
"mission_key_2": "2013-12-01T14:00:11"
}
}
}게임 클라이언트가 시작되고, 로그인을 위해 서버로 호출하는 함수
- Path: /:version/auth/naver
- Authentication Header: X-APP-KEY, X-AUTH-UUID
- Method: GET
- Parameter:
| Name | Type | Description |
|---|---|---|
| user_id | String | 네이버 로그인 후 얻게되는 네이버 유저의 고유값 |
| os | String | 'android' 또는 'ios' |
| user_data_key | Array of String | 로그인 후 가져와야할 사용자 user data의 key 목록 |
| item_key | Array of String | 로그인 후 가져와야할 사용자 item의 key 목록 |
| config_key | Array of String | 로그인 후 가져와야할 사용자 configuration의 key |
- Response Body: JSON
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | ||||||||||||||||||||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | ||||||||||||||||||||||||
| access_token | String | 로그인한 사용자를 위한 access token | ||||||||||||||||||||||||
| user_data | JSON data | key에 명시된 사용자 데이터들을 json 형태로 반환 | ||||||||||||||||||||||||
| items | JSON data |
|
||||||||||||||||||||||||
| configs | JSON data | config_key에 명시된 configuration 데이터들을 json 형태로 반환 | ||||||||||||||||||||||||
| promotions | JSON Array | 현재 진행 중인 promotion에 대한 목록
|
||||||||||||||||||||||||
| agreements | JSON data | 사용자가 동의한 약관에 대한 정보 key는 약관의 이름, value는 다음과 같다.
|
||||||||||||||||||||||||
| completed_missions | JSON Object | JSON object의 key는 mission key이고, value는 미션 완료한 시간 시간 형식은 "yyyy-MM-dd'T'HH:mm:ss |
게임 클라이언트가 시작되고, 로그인을 위해 서버로 호출하는 함수
- Path: /:version/auth/kakao
- Authentication Header: X-APP-KEY, X-AUTH-UUID
- Method: GET
- Parameter:
| Name | Type | Description |
|---|---|---|
| user_id | String | 카카오 user id |
| access_token | String | 카카오 로그인 후 발급 받은 access token |
| sdk_version | String | 클라이언트에서 사용하고 있는 카카오 sdk의 버전 |
| os | String | 'android' 또는 'ios' |
| user_data_key | Array of String | 로그인 후 가져와야할 사용자 user data의 key 목록 |
| item_key | Array of String | 로그인 후 가져와야할 사용자 item의 key 목록 |
| config_key | Array of String | 로그인 후 가져와야할 사용자 configuration의 key |
| completed_missions | JSON Object | JSON object의 key는 mission key이고, value는 미션 완료한 시간 시간 형식은 "yyyy-MM-dd'T'HH:mm:ss |
- Response Body: JSON
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | ||||||||||||||||||||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | ||||||||||||||||||||||||
| access_token | String | 로그인한 사용자를 위한 access token | ||||||||||||||||||||||||
| user_data | JSON data | key에 명시된 사용자 데이터들을 json 형태로 반환 | ||||||||||||||||||||||||
| items | JSON data |
|
||||||||||||||||||||||||
| configs | JSON data | config_key에 명시된 configuration 데이터들을 json 형태로 반환 | ||||||||||||||||||||||||
| promotions | JSON Array | 현재 진행 중인 promotion에 대한 목록
|
||||||||||||||||||||||||
| agreements | JSON data | 사용자가 동의한 약관에 대한 정보 key는 약관의 이름, value는 다음과 같다.
|
||||||||||||||||||||||||
| completed_missions | JSON Object | JSON object의 key는 mission key이고, value는 미션 완료한 시간 시간 형식은 "yyyy-MM-dd'T'HH:mm:ss |
Push 메시지를 보내기 위한 push token을 등록한다. 실제 push message는 Partner를 통해서 발송한다.
- Path: /:version/push_tokens
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Body: JSON
| Name | Type | Description |
|---|---|---|
| push_platform | String | 'gcm' 또는 'apns' |
| push_token | String | 외부 push platform으로부터 발급받은 token |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
유저의 약관 동의를 처리합니다.
-
Path: /:version/agreements
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: POST
-
Parameter: 없음
-
Request Body: JSON JSON Object에 json으로 json key는 약관의 이름, json value에는 약관의 버전 명시
-
Request Body Example:
{
"general_agreement": "1.1.1",
"partnership_agreement": "0.1"
}- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
처리된 약관 동의 내역을 조회합니다.
-
Path: /:version/agreements
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: GET
-
Parameter: 없음
-
Response Body: JSON
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | |||||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | |||||||||
| agreements | JSON data | 사용자가 동의한 약관에 대한 정보 key는 약관의 이름, value는 다음과 같다.
|
서버에 저장된 사용자 정보를 삭제하고 회원 탈퇴 처리
-
Path: /:version/auth/delete
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: POST
-
Parameter: 없음
-
Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
user별로 data를 저장한다.
기본적으로 key/value store라고 보면 된다. key에 관한 제약사항은 아래 링크 참고.
- Path: /:version/data
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Body: JSON array로 다음과 같은 JSON object들 포함
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| condition | Option[JSON Array] |
set하기 위한 조건들. Array내의 조건이 모두 만족할 때만 data에 세팅된 값들로 변경된다.
|
||||||||||||
| data | JSON Array |
|
- Request Body Example
{
"condition": [
{
"key": "money",
"operator": ">",
"value": "100"
},
{
"key": "level",
"operator": "==",
"value": "20"
}
],
"data": [
{
"key": "money",
"value": "100",
"command": "dec"
},
{
"key": "level",
"value": "21"
}
]
}- Response Body: JSON
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | ||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | ||||||
| data | JSON Object |
변경된 user data.
|
-
Path: /:version/data
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: GET
-
Parameters:
Name Type Description key Array of String 얻어오고자 아는 User 데이터의 key 목록 -
Request URI Example:
https://[server-url]/:version/data?key=level&key=score&key=friends_count
- Response Body: JSON
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | ||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | ||||||
| data | JSON Object |
|
- Response Body Example:
{
"result_code": 0,
"data": {
"key1": "value1",
"key2": "value2"
}
}-
Path: /:version/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]/:version/item?key=hearts&key=character.
- Response Body: JSON
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | ||||||||||||||||||||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | ||||||||||||||||||||||||
| items | JSON data |
|
- Response Body Example:
{
"result_code": 0,
"items": {
"candy": {
"value": 500
},
"character.angel": {
"value": 1,
"locked": false
},
"stone": {
"value": 100
},
"character.elvis": {
"value": 0,
"locked": true
},
"star": {
"value": 1,
"recharge_info": {
"max": 5,
"next_recharges_at": "2013-10-06T05:50:08",
"recharges_in_sec": 3600
}
},
"character.devil": {
"value": 0,
"locked": true
},
"character.viking": {
"value": 0,
"locked": true
}
}
}- Path: /:version/items
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Body:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| items | JSON Array | 다음을 포함하는 JSON Array
|
||||||||||||
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| items | Option[JSON Object] | 변경된 item의 값들 json의 key는 item의 key, json의 value는 item의 내용이 나옴 |
아이템을 전환시킨다. A 아이템에서 B아이템으로 전환한다고 할때, 여기에 대한 rule을 partner에 미리 정의해 두어야 한다.
- Path: /:version/items/convert/:conversion_key
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Parameter:
| Name | Type | Description |
|---|---|---|
| conversion_key | String | Partner에서 정의한 conversion key |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| items | Option[JSON Object] | 변경된 item의 값들 json의 key는 item의 key, json의 value는 item의 내용이 나옴 |
아이템을 소비시킨다.
- Path: /:version/items/consume
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Parameter:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| items | JSON Array | 다음을 포함하는 JSON Array
|
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| items | Option[JSON Object] | 변경된 item의 값들 json의 key는 item의 key, json의 value는 item의 내용이 나옴 |
시작과 끝이 있는 여러 판(round)이 있는 게임의 경우에, round를 통해서 item과 user data의 조정이 가능하다. 각각이 어떻게 변경될 지는 partner의 'round rule'에서 설정한다.
이 API를 호출하여, round 시작을 한다.
- Path: /:version/rounds/start?rule_id=:id
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Parameter:
| Name | Type | Description |
|---|---|---|
| rule_id | Number | round의 rule이 적용될 round rule의 id |
-
Request Body: 없음
-
Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| id | Number | 생성된 round의 id |
| items | JSON Object | round rule에 의해 item이 변경된 경우 이것들의 목록 형식은 'Item 목록 얻어오기'의 response 참고 |
| user_data | JSON Object | round rule에 의해 user data가 변경된 경우 이것들의 목록 형식은 'User 데이터 얻어오기'의 response 참고 |
Round를 끝낸다. 끝낼때의 변경사항을 서버에서 처리하고 그 결과를 response에 포함한다.
- Path: /:version/rounds/end/:id
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Parameter:
| Name | Type | Description |
|---|---|---|
| id | Number | round의 id |
- Request Body:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| score | Option[JSON Object] | End 처리시에 리더보드에 점수 제출하는 것을 한번에 하고자 할때 세팅한다.
|
||||||||||||
| item_changes | Option[Json Array] |
|
- Request Body Example:
{
"score": {
"leaderboard_id": 2,
"value": 100
},
"item_changes": [
{
"key": "experience",
"command": "inc",
"value":100
},
{
"key": "coin",
"command": "inc",
"value":5
}
]
}- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| items | JSON Object | round rule에 의해 item이 변경된 경우 이것들의 목록 형식은 'Item 목록 얻어오기'의 response 참고 |
| user_data | JSON Object | round rule에 의해 user data가 변경된 경우 이것들의 목록 형식은 'User 데이터 얻어오기'의 response 참고 |
| score_updated_at | String | 점수가 업데이트 되는 경우에는 시간. 기존 점수보다 낮아 업데이트 안되면 null |
- Path: /:version/mails
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Body:
| Name | Type | Description |
|---|---|---|
| content | String | 내용 |
| platform_user_id | Option[String] | 친구에게 보내고자 할 때 Kakao user_id을 세팅한다. |
| tags | Option[Array of String] | 메일에 tag를 붙이고자 할때 세팅. 복수개의 tag를 세팅할 수 있고, 생략 가능 |
*Request Body Example:
{
"content": "mail입니다.",
"platform_user_id": "1231233",
"tags": [
"notice",
"event"
]
}- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| id | Number | 추가된 mail의 id |
메일의 내용을 얻어온다.
- Path: /:version/mails
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: GET
- Parameters:
| Name | Type | Description |
|---|---|---|
| order | Option[String] | 'asc' 또는 'dec' 중 하나. asc이면 오래된 것부터, dec이면 최신 것부터 가져온다. default는 asc |
| after_mail_id | Option[Number] | after_mail_id 다음 것부터 얻어온다 |
| limit | Number | 가져올 최대 개수. default는 10개 |
| tag | Option[String] | 특정 tag가 붙은 것의 메일만 얻어오고자 할때 세팅 |
- Response Body: JSON으로 다음과 같은 결과값 리턴
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | |||||||||||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | |||||||||||||||
| mails | JSON Array |
|
- Response Example:
{
"result_code": 0,
"mails": [
{
"id": 1235324,
"content": "\"title\": \"선물이도착했어요~\",\"body\": \"별이1개지급되었습니다\", \"read\": true, \"expires_at\":\"2013/11/30T00: 00: 00+0000\" }",
"reward_id": 542
},
{
"id": 1235320,
"content": "\"title\": \"메시지가 왔습니다~~\",\"body\": \"1월1일 점수가 리셋됩니다.\", \"read\": true, \"expires_at\":\"2013/11/30T00: 00: 00+0000\" }"
}
]
}- Path: /:version/mails/count
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: GET
- Parameters:
| Name | Type | Description |
|---|---|---|
| after_mail_id | Option[Number] | after_mail_id 다음 것부터 얻어옴 |
| order | Option[String] | 'asc' 또는 'dec' 중 하나. after_mail_id가 있을 때, asc이면 오래된 것부터, dec이면 최신 것부터 개수를 센다. default는 asc |
| tag | Option[String] | 특정 tag가 붙은 것 듯의 개수만 알고 싶을 때 세팅 |
- Response Body: JSON으로 다음과 같은 결과값 리턴
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| count | Number | 메일 개수 |
-
Path: /:version/mails/update/:id
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: POST
-
Request Body:
Name Type Description content String 새롭게 갱신할 데이터 -
Response Body: JSON으로 다음과 같은 결과값 리턴
Name Type Description result_code Number Error Code 참고 result_message Option[String] 실패한 경우에 메시지 있을 수 있음
-
Path: /:version/mails/delete/:id
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: POST
-
Request Body:없음
-
Response Body: JSON으로 다음과 같은 결과값 리턴
Name Type Description result_code Number Error Code 참고 result_message Option[String] 실패한 경우에 메시지 있을 수 있음
해당 user_id에 속한 mail을 모두 삭제한다. 현재는 1,000개까지 한번에 삭제하는 걸로 제한이 걸려있으므로 유의.
-
Path: /:version/mails/delete_all
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: POST
-
Request Parameter: 없음
-
Request Body:
Name Type Description from_mail_id Option[Number] 삭제 시작할 메일의 id. 이 값이 없으면 처음 메일부터 삭제 to_mail_id Option[Number] 삭제 끝낼 메일의 id. 이 id 포함. 이 값이 없으면 마지막 메일까지 삭제 -
Response Body: JSON으로 다음과 같은 결과값 리턴
Name Type Description result_code Number Error Code 참고 result_message Option[String] 실패한 경우에 메시지 있을 수 있음
- Path: /:version/mails/:id/add_tags
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Parameter:
| Name | Type | Description |
|---|---|---|
| id | Number | mail의 id |
- Request Body:
| Name | Type | Description |
|---|---|---|
| tags | Array of String | 메일에 추가하고자 하는 tag 목록 |
-
Response Body: JSON으로 다음과 같은 결과값 리턴
Name Type Description result_code Number Error Code 참고 result_message Option[String] 실패한 경우에 메시지 있을 수 있음 tags Array of String 메일의 모든 tag 목록
- Path: /:version/mails/:id/remove_tags
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Parameter:
| Name | Type | Description |
|---|---|---|
| id | Number | mail의 id |
- Request Body:
| Name | Type | Description |
|---|---|---|
| tags | Array of String | 메일에서 삭제 하는 tag 목록 |
-
Response Body: JSON으로 다음과 같은 결과값 리턴
Name Type Description result_code Number Error Code 참고 result_message Option[String] 실패한 경우에 메시지 있을 수 있음 tags Array of String 메일의 모든 tag 목록
미션을 완료하는 경우 호출한다. 미리 Partner를 통해 정의된 보상이 지급되고, 메일이 송신된다.
-
Path: /:version/missions/complete/:key
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: POST
-
Request Parameter:
Name Type Description key String 수행 완료할 mission의 key.
파트너를 통해 먼저 정의되어 있어야 한다. -
Request Body: 없음
-
Response Body:
Name Type Description result_code Number Error Code 참고 result_message Option[String] 실패한 경우에 메시지 있을 수 있음 reward_id Number 미션이 완료되어 생성된 reward의 id. 'change_immediately'가 true이면 null. mail_id Number 미션이 완료되어 발송된 mail의 id. 'change_immediately'가 true이면 null. items JSON Object 'change_immediately'가 true인 경우의, 변경된 item들
여러개의 미션을 완료하는 경우 호출한다. 미리 Partner를 통해 정의된 보상이 지급되고, 메일이 송신된다.
-
Path: /:version/missions/batch_complete
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: POST
-
Request Parameter: 없음
-
Request Body:
Name Type Description keys Array of String 수행 완료할 mission의 key 목록.
파트너를 통해 먼저 정의되어 있어야 한다. -
Request Body Example:
{
"keys": [
"mission_1",
"mission_2"
]
}-
Response Body:
Name Type Description result_code Number Error Code 참고 result_message Option[String] 실패한 경우에 메시지 있을 수 있음 completed JSON Array change_immediately가 false인 mission의 reward id와 mail id Name Type Description key String mission의 key reward_id Number 미션이 완료되어 생성된 reward의 id mail_id Number 미션이 완료되어 발송된 mail의 id items JSON Object 'change_immediately'가 true인 mission이 있는 경우에, 그 mission들에 의해 변경된 item들
-
Path: /:version/missions/completed
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: GET
-
Request Parameter: 없음
-
Response Body: JSON으로 다음과 같은 결과값 리턴
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| completed_missions | JSON Object | JSON object의 key는 mission key이고, value는 미션 완료한 시간 시간 형식은 "yyyy-MM-dd'T'HH:mm:ss |
- Response Example:
{
"result_code": 0,
"completed_missions": {
"mission_key_1": "2013-12-01T14:00:11",
"mission_key_2": "2013-12-01T14:00:11"
}
}-
Path: /:version/rewards/:id
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: GET
-
Request Parameter: 없음
-
Response Body: JSON으로 다음과 같은 결과값 리턴
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | ||||||||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | ||||||||||||
| changes | JSON Array | 보상의 결과로 변경될 item 목록
|
||||||||||||
| valid | Boolean | 이미 사용된 경우 false |
reward를 사용하여, reward 변화 조건을 실행하게 만든다. 한번 사용된 reward 아이템은 두번 사용하지 못하도록 invalidate된다.
-
Path: /:version/rewards/apply/:id
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: POST
-
Request Body:
Name Type Description delete_mail Boolean 보상과 관련된 mail이 있는 경우 삭제. default는 false -
Response Body: JSON으로 다음과 같은 결과값 리턴
Name Type Description result_code Number Error Code 참고 result_message Option[String] 실패한 경우에 메시지 있을 수 있음 items JSON Object 변경된 item들
현재 사용자에게 유요한 reward 아이템을 모두 사용한다.
-
Path: /:version/rewards/apply_all
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: POST
-
Request Body:
Name Type Description delete_mail Boolean 보상과 관련된 mail이 있는 경우 삭제. default는 false -
Response Body: JSON으로 다음과 같은 결과값 리턴
Name Type Description result_code Number Error Code 참고 result_message Option[String] 실패한 경우에 메시지 있을 수 있음
-
Path: /:version/rewards/invalidate/:id
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: POST
-
Request Body:
Name Type Description delete_mail Boolean 보상과 관련된 mail이 있는 경우 삭제. default는 false -
Response Body: JSON으로 다음과 같은 결과값 리턴
Name Type Description result_code Number Error Code 참고 result_message Option[String] 실패한 경우에 메시지 있을 수 있음
- Path: /:version/leaderboards/:leaderboard_id/scores/:score
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Body: 없음
- Request Parameter:
| Name | Type | Description |
|---|---|---|
| leaderboard_id | String | 리더보드 id |
| score | Number | 새로 득점한 값 |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| updated_at | String | 최고 기록이 경신되어 업데이트 되었으면 시간이 있고, 그렇지 않으면 null임 |
순위 목록은 최대 10개까지만 얻어올 수 있다.
- Path: /:version/leaderboards/:leaderboard_id/scores
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: GET
- Parameters:
| Name | Type | Description |
|---|---|---|
| leaderboard_id | String | 조회하고자 하는 leaderboard id |
| user_data_key | Array of String | score 정보에 포함될 사용자별 user data |
| item_key | Array of String | score 정보에 포함될 사용자별 item |
| rank_min | Number | 조회하고자 하는 순위 목록의 시작 순위 |
| rank_max | Number | 조회하고자 하는 순위 목록의 끝 순위 |
| range_min | Option[Number] | 특정 구간내의 목록으로 얻어오고자 할 때, 구간의 최소 값 |
| range_max | Option[Number] | 특정 구간내의 목록으로 얻어오고자 할 때, 구간의 최대 값 |
- Response Body:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | |||||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | |||||||||
| scores_count | Number | 해당 range내의 스코어 목록의 전체 개수 | |||||||||
| my_last_score | JSON Object |
|
|||||||||
| scores | JSON Array | Score의 JSON Array 객체. Score에 대해서는 'Score' 참고 |
Score JSON Object는 다음과 같다.
| Name | Type | Description |
|---|---|---|
| user_id | Number | 사용자 id |
| value | Number | score 값 |
| rank | Number | 순위 |
| user_data | JSON data | user_data_key에 명시된 사용자 데이터들을 json 형태로 반환 |
| items | JSON data | item_key에 명시된 사용자 데이터들을 json 형태로 반환 |
-
Response Example:
Request를 다음과 같이 user_data_key를 세팅해서 보내면 response는 다음처럼 나올 수 있다.
http://[server_url]/:version/leaderboard/3312/scores?user_data_key=level&user_data_key=character&range_min=0&range_max=100000
{
"result_code": 0,
"my_last_score": {
"value": 100,
"scored_at": "2013-12-01T14:00:11"
},
"scores_count": 3421,
"scores": [
{
"user_id": 234331,
"value": 10002,
"rank": 31,
"user_data": {
"level": "23"
},
"items": {
"candy": {
"value": 200
},
"stone": {
"value": 1000
}
}
},
{
"user_id": 114331,
"value": 9900,
"rank": 32,
"user_data": {
"level": "22"
},
"items": {
"candy": {
"value": 200
},
"stone": {
"value": 1000
}
}
},
{
"user_id": 44332,
"value": 10002,
"rank": 33,
"user_data": {
"level": "12"
},
"items": {
"candy": {
"value": 200
},
"stone": {
"value": 1000
}
}
}
]
}- Path: /:version/leaderboards/:leaderboard_id/my_score
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: GET
- Parameters:
| Name | Type | Description |
|---|---|---|
| leaderboard_id | String | 조회하고자 하는 leaderboard id |
| range_min | Option[Number] | 특정 구간내의 목록으로 얻어오고자 할 때, 구간의 최소 값 |
| range_max | Option[Number] | 특정 구간내의 목록으로 얻어오고자 할 때, 구간의 최대 값 |
- Response Body:
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| scores_count | Number | 해당 range내의 스코어 목록의 전체 개수 |
| value | Option[Number] | 내 점수. 단, 기존에 점수가 없는 경우 이 field도 없음 |
| rank | Option[Number] | 내 순위. 단, 기존에 점수가 없는 경우 이 field도 없음 |
나와 친구들의 점수 정보를 가져온다.
- Path: /:version/leaderboards/:leaderboard_id/social_scores
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: GET
- Parameter:
| Name | Type | Description |
|---|---|---|
| leaderboard_id | Number | leaderboard의 id |
| user_data_key | Array of String | score 정보에 포함될 사용자별 user data |
| item_key | Array of String | score 정보에 포함될 사용자별 item |
- Response Body: JSON
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | ||||||||||||||||||||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | ||||||||||||||||||||||||
| last_prized_at | String | 마지막 정산한 시간. 이전에 정산한 적이 없으면 계정 생성시간. 시간 형식은 "yyyy-MM-dd'T'HH:mm:ss |
||||||||||||||||||||||||
| reset_info | JSON Object |
|
||||||||||||||||||||||||
| my_last_score | JSON Object |
|
||||||||||||||||||||||||
| scores | JSON Array |
|
||||||||||||||||||||||||
| scores_count | Number | scores의 개수 |
- Response Body Example:
{
"result_code": 0,
"reset_info": {
"period": "weekly",
"weekday": "mon",
"hour": 13,
"minute": 0
},
"last_prized_at": "2013-11-06T13:58:18",
"scores": [
{
"platform_user_id": "user_id_99",
"value": 17524,
"rank": 1,
"user_data": {},
"items": {
"candy": {
"value": 200
},
"stone": {
"value": 1000
}
},
"can_gift_items": {
"heart": {
"after": "2013-11-06T13:58:18"
}
}
},
{
"platform_user_id": "user_id_98",
"value": 17523,
"rank": 2,
"user_data": {},
"items": {
"candy": {
"value": 200
},
"stone": {
"value": 1000
}
},
"can_gift_items": {
"heart": {
"after": "2013-11-06T13:58:18"
}
}
}
],
"scores_count": 2
}친구들의 item, user data 정보를 얻어온다.
- Path: /:version/friends/info
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: GET
- Parameter:
| Name | Type | Description |
|---|---|---|
| platform_user_id | Array of String | 얻어오고자 하는 친구들의 카카오 user id |
| item_key | Array of String | item의 key |
| user_data_key | Array of String | user data의 key |
- Request URI Example:
https://[server-url]/:version/friends/info?platform_user_id=1235342&platform_user_id=222&item_key=items.&item_key=heart&user_data_key=data1
- Response Body: JSON
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | ||||||||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | ||||||||||||
| friends | JSON Array |
|
- Response Body Example:
{
"result_code": 0,
"friends": [
{
"platform_user_id": "user_id_99",
"user_data": {},
"items": {
"candy": {
"value": 200
},
"stone": {
"value": 1000
}
}
},
{
"platform_user_id": "user_id_98",
"user_data": {},
"items": {
"candy": {
"value": 200
},
"stone": {
"value": 1000
}
}
}
]
}리셋된 점수들에 대해서, 보상이 걸려 있는 경우 지급한다.
- Path: /:version/leaderboards/prize/:leaderboard_id
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Parameter: JSON
| Name | Type | Description |
|---|---|---|
| leaderboard_id | String | leaderboard의 id |
- Response Body: JSON
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| prized | Option[JSON Object] | 새롭게 정산이 된 경우에 있음
|
- Response Sample:
{
"result_code": 0,
"prized": {
"season_from": "2013-10-06T00:00:00",
"season_to": "2013-10-13T00:00:00",
"prized_at": "2013-10-13T00:00:00",
"score": 123,
"rank": 109,
"top_scores": [
{
"platform_user_id": "user_id_99",
"value": 17524,
"rank": 1
},
{
"platform_user_id": "user_id_98",
"value": 17523,
"rank": 2
},
{
"platform_user_id": "user_id_20",
"value": 12001,
"rank": 3
}
],
"scores_count": 120,
"reward": {
"id": 12314324,
"mail_id": 48382,
"changes": [
{
"key": "item1",
"command": "inc",
"value": 100
},
{
"key": "item2",
"command": "set",
"value": 1
},
{
"key": "char1",
"command": "set",
"value": 1
}
]
}
}
}- Partner v컬럼에 다음과 같은 값이 세팅되어 있어야 한다.
{
"rewards": {
"mail": "축하합니다. ${scores_count} 중에서, ${score}을 획득하여 ${rank} 등입니다.",
"by_outnumbered": {
"key": "gift_point",
"factor": 1
},
"by_rank_random": {
"1": [
{
"key": "boost1",
"weight": 50,
"value": 1
},
{
"key": "boost2",
"weight": 30,
"value": 1
},
{
"key": "boost3",
"weight": 20,
"value": 1
}
],
"2": [
{
"key": "boost1",
"weight": 50,
"value": 1
},
{
"key": "boost2",
"weight": 30,
"value": 1
},
{
"key": "boost3",
"weight": 20,
"value": 1
}
],
"3": [
{
"key": "boost1",
"weight": 50,
"value": 1
},
{
"key": "boost2",
"weight": 30,
"value": 1
},
{
"key": "boost3",
"weight": 20,
"value": 1
}
]
},
"by_rank": {
"1": [
{
"key": "gift_point",
"command": "inc",
"value": 200
}
],
"2": [
{
"key": "gift_point",
"command": "inc",
"value": 100
}
],
"3": [
{
"key": "gift_point",
"command": "inc",
"value": 50
}
]
}
}
}상품을 구매하기 전에, 구매를 위한 id를 발급 받는다. 구매를 처리하기 전에 partner를 통해서 product를 등록해야 한다.
- Path: /:version/naver_purchases
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Body:
| Name | Type | Description |
|---|---|---|
| product_code | String | 네이버에 등록된 상품의 code |
| payement_sequence | String | 네이버 결제 완료후 전달받은 paymentSeq 값 |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| id | Number | 구매 id |
결제 일련번호를 확인하고, 정상 결제이면 앞서 설정된 유료 아이템 변경 값을 적용한다.
- Path: /:version/naver_purchases/complete/:id
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Parameter:
| Name | Type | Description |
|---|---|---|
| id | Number | 구매 등록시 발급 받은 구매 id |
- Request Body:
| Name | Type | Description |
|---|---|---|
| list_price | Number | 원래 상품의 가격 |
| purchased_price | Number | 실제 구매한 가격 |
| currency | String | 'KRW', 'USD', 'JPY' 중 하나. default는 'KRW' |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| items | JSON Object | 완료후 변경된 아이템. json의 key에는 item의 key가, json의 value에는 item의 value가 세팅됨 |
상품을 구매하기 전에, 구매를 위한 id를 발급 받는다. 구매를 처리하기 전에 partner를 통해서 product를 등록해야 한다.
- Path: /:version/google_purchases
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Body:
| Name | Type | Description |
|---|---|---|
| product_code | String | Google에 등록된 상품의 code |
| receiver_kakao_user_id | Option[String] | 구매한 것을 카카오 친구에게 선물하고자 할때 사용 |
| mail_for_receiver | Option[String] | 카카오 친구에게 선물할 때 메일을 같이 보내려고 할 때, 메일의 content를 세팅 |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| id | Number | 구매 id |
결제 일련번호를 확인하고, 정상 결제이면 앞서 설정된 유료 아이템 변경 값을 적용한다.
- Path: /:version/google_purchases/complete/:id
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Parameter:
| Name | Type | Description |
|---|---|---|
| id | Number | 구매 등록시 발급 받은 구매 id |
- Request Body:
| Name | Type | Description |
|---|---|---|
| purchase_data | String | Google IAP API에서 응답받은 내용 중 purchase data |
| signature | String | Google IAP API에서 응답받은 내용 중 signature |
| list_price | Number | 원래 상품의 가격 |
| purchased_price | Number | 실제 구매한 가격 |
| currency | String | 'KRW', 'USD', 'JPY' 중 하나. default는 'KRW' |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| items | JSON Object | 완료후 변경된 아이템. 단, 친구에게 구매해준 경우에는 items는 비어 있음 json의 key에는 item의 key가, json의 value에는 item의 value가 세팅됨 |
상품을 구매하기 전에, 구매를 위한 id를 발급 받는다. 구매를 처리하기 전에 partner를 통해서 product를 등록해야 한다.
- Path: /:version/apple_purchases
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Body:
| Name | Type | Description |
|---|---|---|
| product_code | String | Apple에 등록된 상품의 code |
| receiver_kakao_user_id | Option[String] | 구매한 것을 카카오 친구에게 선물하고자 할때 사용 |
| mail_for_receiver | Option[String] | 카카오 친구에게 선물할 때 메일을 같이 보내려고 할 때, 메일의 content를 세팅 |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| id | Number | 구매 id |
정상 결제이면 앞서 설정된 유료 아이템 변경 값을 적용한다.
- Path: /:version/apple_purchases/complete/:id
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Parameter:
| Name | Type | Description |
|---|---|---|
| id | Number | 구매 등록시 발급 받은 구매 id |
- Request Body:
| Name | Type | Description |
|---|---|---|
| receipt | String | Apple 결제 후 받은 'receipt'. Base 64 Encoding이 되어 있어야 함 애플의 [관련문서](https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW1) 참고 |
| is_sandbox | Option[Boolean] | receipt가 apple의 sandbox용 일 경우에 이값을 true로 한다. default는 false |
| list_price | Number | 원래 상품의 가격 |
| purchased_price | Number | 실제 구매한 가격 |
| currency | String | 'KRW', 'USD', 'JPY' 중 하나. default는 'KRW' |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| items | JSON Object | 완료후 변경된 아이템. 단, 친구에게 구매해준 경우에는 items는 비어 있음 json의 key에는 item의 key가, json의 value에는 item의 value가 세팅됨 |
카카오 서버로부터 받은 정보를 이용해서 친구 목록을 업데이트 한다.
- Path: /:version/kakao_friends
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Body:
| Name | Type | Description |
|---|---|---|
| app_friends_info | JSON array | 카카오 친구 목록 조회 api를 호출해서 얻은 결과에서 'app_friends_info'. |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
카카오 친구에게 아이템을 선물한다. 선물하려고 하는 item에 대해 미리 item_property가 설정되어 있어야만 가능한다.
item_property에 다음 두 값이 설정되어 있어야 한다.
| Name | Type | Description |
|---|---|---|
| gifts_in_sec | Number | 선물을 줄 수 있는 시간 간격. 단위는 초. |
| max_gift_count | Number | 최대로 선물을 줄 수 있는 값. |
- Path: /:version/items/gift
- Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
- Method: POST
- Request Body:
| Name | Type | Description |
|---|---|---|
| kakao_user_id | String | 선물을 받을 사용자의 카카오 user_id |
| item | String | 선물로 주고자 하는 item의 key |
| count | Number | 선물로 주고자 하는 item의 개수. default는 1 |
| String | 친구에게 전달되는 메시지 |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| can_gift_after | String | 선물을 줄 수 있는 시간. 이 시간 이후일 경우에 선물이 가능하다. 형식은 "yyyy-MM-dd'T'HH:mm:ss" |
Partner를 통해 미리 정의해둔 configuration을 얻어올 수 있다.
-
Path: /:version/configurations
-
Authentication Header: X-APP-KEY, X-AUTH-UUID, X-AUTH-TOKEN
-
Method: GET
-
Parameters:
Name Type Description key Array of String 얻어오고자 아는 Configuration 데이터의 key 목록 -
Request URI Example:
https://[server-url]/:version/configurations?key=app_version&key=agreement_version
- Response Body: JSON
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| result_code | Number | Error Code 참고 | ||||||
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 | ||||||
| configs | JSON Object |
|
- Response Body Example:
{
"result_code": 0,
"configs": {
"key1": "value1",
"key2": "value2"
}
}분석을 위해 로그를 쌓기 위한 API이다. 로그가 쌓인 후 분석은 별도로 바이트코드랩과 협의하여 처리하여야 한다.
- Path: /:version/logs
- Authentication Header: X-APP-KEY
- Method: POST
- Request Body: JSON
| Name | Type | Description |
|---|---|---|
| event_id | String | 어떠한 종류의 event인지 구분하기 위한 값. 클라이언트에서 정해서 사용. |
| data | String | 로그 데이터 |
- Response Body: JSON
| Name | Type | Description |
|---|---|---|
| result_code | Number | Error Code 참고 |
| result_message | Option[String] | 실패한 경우에 메시지 있을 수 있음 |
| Value | Description |
|---|---|
| 0 | Success |
| 1001 | Invalid parameter |
| 1002 | Data dose not exist |
| 2001 | Conditions are not met |
| 2002 | Too many conditions Max 5개 |
| 2003 | Too many 'get data' request Max 10개 |
| 2004 | Too many 'set data' request Max 10개 |
| 2101 | Invalid reward |
| 2201 | Invalid purchase status |
| 2202 | Invalid payment sequence |
| 2203 | Invalid apple receipt |
| 2204 | Invalid google purchase data |
| 2205 | Invalid google signature |
| 2206 | No google iap public key is registered |
| 2207 | Invalid google iap public key |
| 2301 | No item conversion is defined |
| 2302 | Not enough item |
| 2303 | No iap conversion |
| 2401 | Mission already completed |
| 2601 | Invalid round status |
| 2701 | Not friend |
| 2702 | The item is not able to gift |
| 2703 | The item cannot gift because it has recently gifted |
| 2704 | Too many count to gift |
| 8001 | The user has been disabled |
| 9999 | Unknown error |
