Skip to content

Commit

Permalink
feat: 입덕포인트 통계 조회 api 추가 #303
Browse files Browse the repository at this point in the history
  • Loading branch information
imdaxsz committed Dec 27, 2023
1 parent da073ad commit 7d6b61d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/features/animes/api/AnimeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ type ListAnimeResponse = CursorPage<{
starScoreAvg: number;
}>;

export type AttractionPointStatics = {
[K in keyof AttractionPoint]: number;
};

export type TOP10ListResponse = Pick<Anime, "title" | "thumbnail"> & {
animeId: number;
genres: string[];
Expand Down Expand Up @@ -92,6 +96,10 @@ export default class AnimeApi {
return get<{ starRatingAvg: number }>(`/animes/${id}/ratings/average`);
}

getAttractionPoint(id: number) {
return get<AttractionPointStatics>(`/attraction-points/animes/${id}`);
}

async getTOP10List(): Promise<TOP10ListResponse[]> {
return get(`/animes/weekly`);
}
Expand Down

0 comments on commit 7d6b61d

Please sign in to comment.