Skip to content

Commit

Permalink
feat: migrate /ranking/rival
Browse files Browse the repository at this point in the history
  • Loading branch information
RanolP committed Mar 17, 2024
1 parent 5778df4 commit c6b9355
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 66 deletions.
21 changes: 0 additions & 21 deletions src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@
---
openapi: "3.1.0"


tags:
- name: "account"
description: "계정과 관련이 있는 API입니다"
- name: "badge"
description: "뱃지와 관련이 있는 API입니다"
- name: "background"
description: "배경과 관련이 있는 API입니다"
- name: "coins"
description: "코인/별조각과 관련이 있는 API입니다"
- name: "other"
description: "아직 분류하지 못한 API입니다"
- name: "problem"
description: "문제와 관련이 있는 API입니다"
- name: "search"
description: "검색과 관련이 있는 API입니다"
- name: "user"
description: "사용자와 관련이 있는 API입니다"

paths:
/account/verify_credentials:
$ref: "./paths/account/verify_credentials.yaml#/paths/Path"
Expand All @@ -36,8 +17,6 @@ paths:
description: "TODO"
/ranking/tier:
$ref: "./paths/ranking/tier.yaml#/paths/Path"
/ranking/rival:
$ref: "./paths/ranking/rival.yaml#/paths/Path"
/ranking/organization:
$ref: "./paths/ranking/organization.yaml#/paths/Path"
/search/suggestion:
Expand Down
1 change: 1 addition & 0 deletions src/operations/ranking/_barrel.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ import "./contribution.tsp";
import "./class.tsp";
import "./streak.tsp";
import "./reverse_rival.tsp";
import "./rival.tsp";
37 changes: 37 additions & 0 deletions src/operations/ranking/rival.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace SolvedAC;

/**
* 라이벌인 사용자 중에서 티어가 높은 사용자가 먼저 오도록 정렬한 목록을 가져옵니다.
*
* @return
* 페이지네이션 가능한 사용자 목록을 반환합니다.
*/
@summary("티어 순 라이벌 랭킹 가져오기")
@tag("ranking")
@useAuth(TokenAuth)
@get
@route("/ranking/rival")
op getRivalRankingByTier(
/**
* 응답을 받을 언어입니다.
*/
@header
`x-solvedac-language`?: Language,

/**
* 페이지
*/
@query
page?: uint32,
): GetRivalRankingByTier.Ok | Unauthorized;

namespace GetRivalRankingByTier {
@extension(XInternal, true)
model Ok {
@statusCode status: 200;
@body data: PaginatedList<RivalUser>;
}
}
45 changes: 0 additions & 45 deletions src/paths/ranking/rival.yaml

This file was deleted.

0 comments on commit c6b9355

Please sign in to comment.