File tree Expand file tree Collapse file tree 2 files changed +51
-1
lines changed
src/main/kotlin/org/gitanimals/inbox/infra Expand file tree Collapse file tree 2 files changed +51
-1
lines changed Original file line number Diff line number Diff line change 1+ # Gotcha
2+
3+ pet을 뽑기 할 수 있습니다.
4+
5+ > [ !IMPORTANT]
6+ > 기존 단일 뽑기 API는 RequestHeader에 아무값도 넣지 마세요.
7+ > count가 추가된 뽑기는 RequestHeader에 ApiVersion=2 를 입력해야합니다.
8+
9+ ## Request
10+
11+ ### HTTP METHOD : ` POST `
12+
13+ ### url : ` https://api.gitanimals.org/gotchas?type={gotcha-type}?count={count} `
14+
15+ ### RequestHeader
16+
17+ - Authorization: ` {token} `
18+ - ApiVersion: 3 // 아무값도 넣지 않을시 버전 1 api로 매핑됩니다.
19+
20+ ### Request param
21+
22+ - gotcha-type: gotcha에 사용할 뽑기 기계의 type입니다. 입력 가능한 type은 아래와 같습니다.
23+ 입력 가능한 type : ` DEFAULT `
24+ - count: 뽑을 횟수 입니다. 아무것도 입력하지 않을시, 1로 매핑됩니다.
25+
26+ # Response
27+
28+ 성공시 이름, 뽑히는 확률을 반환합니다.
29+
30+ ``` json
31+ {
32+ "gotchaResults" : [
33+ {
34+ "name" : " CAT" ,
35+ "dropRate" : " 0.2"
36+ },
37+ {
38+ "name" : " LITTLE_CHICK" ,
39+ "dropRate" : " 0.9"
40+ }
41+ ]
42+ }
43+ ```
44+
45+ ### 400 error
46+ - 포인트가 부족할 경우 발생 가능
47+ - 요청 이상
48+
49+ ### 500 error
50+ - 서버 이슈
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import org.springframework.http.HttpHeaders
88import org.springframework.stereotype.Component
99import org.springframework.web.client.RestClient
1010
11- @Component(" shop .RestIdentityApi" )
11+ @Component(" inbox .RestIdentityApi" )
1212class RestIdentityApi (
1313 @Qualifier(" shop.identityRestClient" ) private val restClient : RestClient ,
1414 @Value(" \$ {internal.secret}" ) private val internalSecret : String ,
You can’t perform that action at this time.
0 commit comments