Skip to content

Commit 770514d

Browse files
authored
Merge pull request #54 from w8385/solvedac_update
Solvedac update
2 parents 1e06721 + 28d99e2 commit 770514d

File tree

10 files changed

+305
-41
lines changed

10 files changed

+305
-41
lines changed

src/openapi.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ servers:
2828
tags:
2929
- name: "account"
3030
description: "계정과 관련이 있는 API입니다"
31+
- name: "badge"
32+
description: "뱃지와 관련이 있는 API입니다"
33+
- name: "background"
34+
description: "배경과 관련이 있는 API입니다"
3135
- name: "coins"
3236
description: "코인/별조각과 관련이 있는 API입니다"
3337
- name: "other"
@@ -46,6 +50,10 @@ paths:
4650
$ref: "./paths/account/update_settings.yaml#/paths/Path"
4751
/account/verify_credentials:
4852
$ref: "./paths/account/verify_credentials.yaml#/paths/Path"
53+
/background/show:
54+
$ref: "./paths/background/show.yaml#/paths/Path"
55+
/badge/show:
56+
$ref: "./paths/badge/show.yaml#/paths/Path"
4957
/coins/exchange_rate:
5058
$ref: "./paths/coins/exchange_rate.yaml#/paths/Path"
5159
/coins/shop/list:
@@ -106,6 +114,8 @@ paths:
106114
responses:
107115
"200":
108116
description: "TODO"
117+
/user/organizations:
118+
$ref: "./paths/user/organizations.yaml#/paths/Path"
109119
/user/problem_stats:
110120
$ref: "./paths/user/problem_stats.yaml#/paths/Path"
111121
/user/problem_tag_stats:
@@ -126,8 +136,14 @@ components:
126136
$ref: "./schemas/class-decoration.yaml#/components/schemas/ClassDecoration"
127137
CoinshopProduct:
128138
$ref: "./schemas/coinshop-product.yaml#/components/schemas/CoinshopProduct"
139+
Background:
140+
$ref: "./schemas/background.yaml#/components/schemas/Background"
129141
Badge:
130142
$ref: "./schemas/badge.yaml#/components/schemas/Badge"
143+
BadgeCategory:
144+
$ref: "./schemas/badge-category.yaml#/components/schemas/BadgeCategory"
145+
BadgeTier:
146+
$ref: "./schemas/badge-tier.yaml#/components/schemas/BadgeTier"
131147
FullUser:
132148
$ref: "./schemas/full-user.yaml#/components/schemas/FullUser"
133149
IconScheme:

src/paths/background/show.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# yaml-language-server: $schema=https://spec.openapis.org/oas/3.1/schema/2021-05-20
2+
---
3+
# for the intellisense
4+
openapi: "3.1.0"
5+
info: { title: "", version: "" }
6+
7+
paths:
8+
Path:
9+
get:
10+
summary: "배경 정보 가져오기"
11+
description: "배경의 정보를 가져옵니다."
12+
tags:
13+
- background
14+
operationId: getBackground
15+
16+
parameters:
17+
- name: "backgroundId"
18+
in: "query"
19+
description: "배경 ID"
20+
required: true
21+
schema:
22+
type: "string"
23+
24+
responses:
25+
"200":
26+
description: "서버가 반환에 성공한 경우입니다."
27+
content:
28+
application/json:
29+
schema:
30+
$ref: "../../schemas/background.yaml#/components/schemas/Background"

src/paths/badge/show.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# yaml-language-server: $schema=https://spec.openapis.org/oas/3.1/schema/2021-05-20
2+
---
3+
# for the intellisense
4+
openapi: "3.1.0"
5+
info: { title: "", version: "" }
6+
7+
paths:
8+
Path:
9+
get:
10+
summary: "뱃지 정보 가져오기"
11+
description: "뱃지의 정보를 가져옵니다."
12+
tags:
13+
- badge
14+
operationId: getBadge
15+
16+
parameters:
17+
- name: "badgeId"
18+
in: "query"
19+
description: "뱃지 ID"
20+
required: true
21+
schema:
22+
type: "string"
23+
24+
responses:
25+
"200":
26+
description: "서버가 반환에 성공한 경우입니다."
27+
content:
28+
application/json:
29+
schema:
30+
$ref: "../../schemas/badge.yaml#/components/schemas/Badge"

src/paths/user/organizations.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# yaml-language-server: $schema=https://spec.openapis.org/oas/3.1/schema/2021-05-20
2+
---
3+
# for the intellisense
4+
openapi: "3.1.0"
5+
info: { title: "", version: "" }
6+
7+
paths:
8+
Path:
9+
get:
10+
summary: "사용자가 속한 조직 목록 가져오기"
11+
description: "사용자가 속한 조직 목록를 가져옵니다."
12+
tags:
13+
- user
14+
operationId: getUserOrganizations
15+
16+
security:
17+
- {}
18+
- solvedacToken: []
19+
20+
parameters:
21+
- name: "handle"
22+
in: "query"
23+
description: "사용자 ID"
24+
required: true
25+
schema:
26+
type: "string"
27+
28+
responses:
29+
"200":
30+
description: "서버가 반환에 성공한 경우입니다."
31+
content:
32+
application/json:
33+
schema:
34+
type: "array"
35+
items:
36+
type: "object"
37+
$ref: "../../schemas/organization.yaml#/components/schemas/Organization"

src/schemas/background.yaml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# yaml-language-server: $schema=https://spec.openapis.org/oas/3.1/schema/2021-05-20
2+
---
3+
# for the intellisense
4+
openapi: "3.1.0"
5+
info: { title: "", version: "" }
6+
7+
components:
8+
schemas:
9+
Background:
10+
title: Background
11+
description: |
12+
사용자가 사용할 수 있는 배경입니다.
13+
type: "object"
14+
required:
15+
- backgroundId
16+
- backgroundImageUrl
17+
- unlockedUserCount
18+
- displayName
19+
- displayDescription
20+
- conditions
21+
- hiddenConditions
22+
- isIllust
23+
- authors
24+
properties:
25+
backgroundId:
26+
description: "배경의 ID입니다."
27+
type: "string"
28+
example: "hanbyeol_stars"
29+
backgroundImageUrl:
30+
description: "배경 사진으로 가는 하이퍼링크입니다."
31+
type: "string"
32+
example: "https://static.solved.ac/profile_bg/hanbyeol_stars/hanbyeol_stars.jpg"
33+
fallbackBackgroundImageUrl:
34+
description: "배경 사진이 없을 때 대체로 사용할 사진으로 가는 하이퍼링크입니다."
35+
type: "string"
36+
nullable: true
37+
example: null
38+
backgroundVideoUrl:
39+
description: "배경 비디오로 가는 하이퍼링크입니다."
40+
type: "string"
41+
nullable: true
42+
example: null
43+
unlockedUserCount:
44+
description: "해당 배경을 획득한 사용자의 수입니다."
45+
type: "integer"
46+
format: "int64"
47+
example: 1394
48+
displayName:
49+
description: "배경의 이름입니다."
50+
type: "string"
51+
example: "Stars in the Evening Sky"
52+
displayDescription:
53+
description: "배경의 설명입니다."
54+
type: "string"
55+
example: "She who has a star in her heart never gets lost in the dark"
56+
conditions:
57+
description: "해당 배경을 얻을 수 있는 조건입니다."
58+
type: "string"
59+
example: "Bought the background at the coin shop"
60+
hiddenConditions:
61+
description: "해당 배경을 얻을 수 있는 조건이 숨겨져 있는지 여부입니다."
62+
type: "boolean"
63+
example: false
64+
isIllust:
65+
description: "해당 배경이 일러스트인지 여부입니다."
66+
type: "boolean"
67+
example: true
68+
authors:
69+
description: "해당 배경을 만든 사람들의 정보입니다."
70+
type: "array"
71+
items:
72+
type: "object"
73+
properties:
74+
authorId:
75+
description: "작가의 ID입니다."
76+
type: "string"
77+
example: "havana723"
78+
role:
79+
description: "작가의 역할입니다."
80+
type: "string"
81+
example: "Illustration"
82+
authorUrl:
83+
description: "작가의 홈페이지로 가는 하이퍼링크입니다."
84+
type: "string"
85+
nullable: true
86+
example: null
87+
handle:
88+
description: "작가의 사용자 ID입니다."
89+
type: "string"
90+
example: "havana723"
91+
twitter:
92+
description: "작가의 트위터 ID입니다."
93+
type: "string"
94+
nullable: true
95+
example: null
96+
instagram:
97+
description: "작가의 인스타그램 ID입니다."
98+
type: "string"
99+
nullable: true
100+
example: null
101+
displayName:
102+
description: "작가의 이름입니다."
103+
type: "string"
104+
example: "havana723"

src/schemas/badge-category.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# yaml-language-server: $schema=https://spec.openapis.org/oas/3.1/schema/2021-05-20
2+
---
3+
# for the intellisense
4+
openapi: "3.1.0"
5+
info: { title: "", version: "" }
6+
7+
components:
8+
schemas:
9+
BadgeCategory:
10+
title: BadgeCategory
11+
type: "string"
12+
enum:
13+
- "achievement"
14+
- "season"
15+
- "event"
16+
- "contest"
17+
description: |
18+
뱃지 종류입니다.

src/schemas/badge-tier.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# yaml-language-server: $schema=https://spec.openapis.org/oas/3.1/schema/2021-05-20
2+
---
3+
# for the intellisense
4+
openapi: "3.1.0"
5+
info: { title: "", version: "" }
6+
7+
components:
8+
schemas:
9+
BadgeTier:
10+
title: BadgeTier
11+
type: "string"
12+
enum:
13+
- "bronze"
14+
- "silver"
15+
- "gold"
16+
- "master"
17+
description: |
18+
뱃지 티어입니다.

src/schemas/badge.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@ components:
3333
description: "뱃지의 설명입니다."
3434
type: "string"
3535
example: "solved.ac의 1주년과 함께했다"
36+
badgeTier:
37+
type: "string"
38+
$ref: "./badge-tier.yaml#/components/schemas/BadgeTier"
39+
badgeCategory:
40+
type: "string"
41+
$ref: "./badge-category.yaml#/components/schemas/BadgeCategory"

src/schemas/full-user.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ components:
1414
- $ref: "./user.yaml#/components/schemas/User"
1515
- type: "object"
1616
properties:
17-
rank:
18-
description: "사용자의 순위입니다."
19-
type: "integer"
20-
format: "int64"
2117
isRival:
2218
description: "라이벌 여부입니다."
2319
type: "boolean"

0 commit comments

Comments
 (0)