From 09aed2246a73a407e7d9d7523e39de589992ba14 Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 8 May 2025 17:44:15 +0300 Subject: [PATCH 1/4] Make users.signOut work through post instead of get --- src/endpoints/users.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/endpoints/users.ts b/src/endpoints/users.ts index ef48040..5af40b5 100644 --- a/src/endpoints/users.ts +++ b/src/endpoints/users.ts @@ -57,7 +57,7 @@ export interface UsersHistoryParams { * Users * @param methods */ -export const users = ({ get }: RequestMethods) => { +export const users = ({ get, post }: RequestMethods) => { /** * List users * @param params @@ -89,7 +89,7 @@ export const users = ({ get }: RequestMethods) => { * Sign out from an account * @param params */ - const signOut = (): Promise => get(`/users/sign_out`, {}); + const signOut = (): Promise => post(`/users/sign_out`, {}); /** * List user's friends From 78421a028ff4be7f720f6b3c7e6812799f98db1a Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 8 May 2025 17:49:26 +0300 Subject: [PATCH 2/4] Add `page` and `limit` as parameters for `users.friends` --- src/endpoints/users.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/endpoints/users.ts b/src/endpoints/users.ts index 5af40b5..a16fe0d 100644 --- a/src/endpoints/users.ts +++ b/src/endpoints/users.ts @@ -22,6 +22,12 @@ export interface UsersListParams { limit?: number; } +export interface FriendsListParams { + id: UserId; + page?: number; + limit?: number; +} + export interface UsersByIdParams { id: number | string; is_nickname?: boolean; @@ -95,8 +101,11 @@ export const users = ({ get, post }: RequestMethods) => { * List user's friends * @param params */ - const friends = ({ id }: Id): Promise => - get(`/users/${id}/friends`, {}); + const friends = ({ + id, + ...params + }: FriendsListParams): Promise => + get(`/users/${id}/friends`, params); /** * List user's clubs From 0b3e9ec00b6b655336425db43769ebcdf8b28d6b Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 8 May 2025 18:31:44 +0300 Subject: [PATCH 3/4] Add `genre_v2` to `animes.list` --- src/endpoints/animes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/endpoints/animes.ts b/src/endpoints/animes.ts index 1b32ac4..3b46b6d 100644 --- a/src/endpoints/animes.ts +++ b/src/endpoints/animes.ts @@ -30,6 +30,7 @@ export interface AnimesParams { duration?: AnimeDuration; rating?: AnimeRating; genre?: string; + genre_v2?: string; studio?: string; franchise?: string; censored?: boolean; From 74ab80a2325812cbaf62c57526edc28cafdbd5b7 Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 8 May 2025 18:40:49 +0300 Subject: [PATCH 4/4] Add `genre_v2` to `mangas.list` --- src/endpoints/mangas.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/endpoints/mangas.ts b/src/endpoints/mangas.ts index 555cdc3..eaf0017 100644 --- a/src/endpoints/mangas.ts +++ b/src/endpoints/mangas.ts @@ -24,6 +24,7 @@ export interface MangasParams { season?: string; score?: number; genre?: string; + genre_v2?: string; publisher?: string; franchise?: string; censored?: boolean;