-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from tutkli/next
next
- Loading branch information
Showing
50 changed files
with
480 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"*.{js,ts,css,scss,html,json,md}": "biome format --write ./src" | ||
"*.{js,ts,css,scss,html,json,md}": [ | ||
"biome format --write ./src", | ||
"biome check --write --unsafe ./src" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { ClubsEndpoints } from '../endpoints/clubs.enpoints' | ||
import type { ClubSearchParams } from '../models/clubs/clubs-params.model' | ||
import type { | ||
Club, | ||
ClubMember, | ||
ClubRelations, | ||
ClubStaff | ||
} from '../models/clubs/clubs.model' | ||
import { BaseClient } from './base.client' | ||
|
||
/** | ||
* **Club Client** | ||
* | ||
* Client used to access the Club Endpoints. | ||
* | ||
* See also: [Jikan Documentation](https://docs.api.jikan.moe/) | ||
*/ | ||
export class ClubsClient extends BaseClient { | ||
/** | ||
* @returns Club resource | ||
* @param id Club ID | ||
*/ | ||
public getClubsById(id: number) { | ||
return this.getResource<Club>(ClubsEndpoints.clubById, { id }) | ||
} | ||
|
||
/** | ||
* @returns Club members resource | ||
* @param id Club ID | ||
* @param params | ||
*/ | ||
public getClubMembers(id: number, params: Partial<{ page: number }> = {}) { | ||
return this.getResource<ClubMember[]>( | ||
ClubsEndpoints.clubMembers, | ||
{ id }, | ||
params | ||
) | ||
} | ||
|
||
/** | ||
* @returns Club staff | ||
* @param id Club ID | ||
*/ | ||
public getClubStaff(id: number) { | ||
return this.getResource<ClubStaff[]>(ClubsEndpoints.clubStaff, { id }) | ||
} | ||
|
||
/** | ||
* @returns Club relations | ||
* @param id Club ID | ||
*/ | ||
public getClubRelations(id: number) { | ||
return this.getResource<ClubRelations>(ClubsEndpoints.clubRelations, { id }) | ||
} | ||
|
||
/** | ||
* @returns Search results for Clubs | ||
* @param params | ||
*/ | ||
public getClubSearch(params: Partial<ClubSearchParams> = {}) { | ||
return this.getResource<Club[]>(ClubsEndpoints.clubSearch, {}, params) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.