Squashed commit of the following:

commit 5d38a76997
Merge: 7cccdb9 f160e23
Author: Blake <blakejoy@users.noreply.github.com>
Date:   Sat Apr 15 11:44:39 2023 -0400

    Merge pull request #22 from blakejoy/feat/add_linting

    feat - add linting and prettier

commit f160e2362c
Author: Blake Joynes <blakejoynes@gmail.com>
Date:   Sat Apr 15 11:44:00 2023 -0400

    add pre commit hook

commit 0fd8317884
Merge: bc91674 d1e87ba
Author: Blake Joynes <blakejoynes@gmail.com>
Date:   Sat Apr 15 11:41:28 2023 -0400

    add husky

commit bc91674c4b
Author: Blake Joynes <blakejoynes@gmail.com>
Date:   Sat Apr 15 11:39:24 2023 -0400

    add husky

commit d1e87ba7be
Author: Blake <blakejoy@users.noreply.github.com>
Date:   Fri Apr 14 08:48:33 2023 -0400

    Update .prettierrc

commit d064d4d86f
Author: Blake Joynes <blakejoynes@gmail.com>
Date:   Fri Apr 14 03:09:39 2023 -0400

    turn off linebreak rules

commit 06155bd323
Author: Blake Joynes <blakejoynes@gmail.com>
Date:   Thu Apr 13 21:58:41 2023 -0400

    add linting and prettier
This commit is contained in:
DerPenz
2023-04-15 18:32:06 +02:00
parent 562864a70f
commit 6c361002bf
37 changed files with 2373 additions and 2073 deletions

View File

@@ -30,48 +30,54 @@ import {
const BASE_TV = '/tv';
export class TvShowsEndpoint extends BaseEndpoint{
export class TvShowsEndpoint extends BaseEndpoint {
constructor(protected readonly accessToken: string) {
super(accessToken);
}
async details(id: number): Promise<TvShowDetails>{
async details(id: number): Promise<TvShowDetails> {
return await this.api.get<TvShowDetails>(`${BASE_TV}/${id}`);
}
async alternativeTitles(id: number): Promise<AlternativeTitles>{
return await this.api.get<AlternativeTitles>(`${BASE_TV}/${id}/alternative_titles`);
async alternativeTitles(id: number): Promise<AlternativeTitles> {
return await this.api.get<AlternativeTitles>(
`${BASE_TV}/${id}/alternative_titles`
);
}
async changes(id: number, options?: ChangeOptions): Promise<TvShowChanges>{
return await this.api.get<TvShowChanges>(`${BASE_TV}/${id}/changes`, options);
}
async contentRatings(id: number): Promise<ContentRatings>{
return await this.api.get<ContentRatings>(`${BASE_TV}/${id}/content_ratings`);
async contentRatings(id: number): Promise<ContentRatings> {
return await this.api.get<ContentRatings>(
`${BASE_TV}/${id}/content_ratings`
);
}
async credits(id: number): Promise<Credits>{
async credits(id: number): Promise<Credits> {
return await this.api.get<Credits>(`${BASE_TV}/${id}/credits`);
}
async season(tvId: number, seasonNumber: number): Promise<SeasonDetails>{
return await this.api.get<SeasonDetails>(`${BASE_TV}/${tvId}/season/${seasonNumber}`);
async season(tvId: number, seasonNumber: number): Promise<SeasonDetails> {
return await this.api.get<SeasonDetails>(
`${BASE_TV}/${tvId}/season/${seasonNumber}`
);
}
async episodeGroups(id: number): Promise<EpisodeGroups>{
async episodeGroups(id: number): Promise<EpisodeGroups> {
return await this.api.get<EpisodeGroups>(`${BASE_TV}/${id}/episode_groups`);
}
async externalIds(id: number): Promise<ExternalIds>{
async externalIds(id: number): Promise<ExternalIds> {
return await this.api.get<ExternalIds>(`${BASE_TV}/${id}/external_ids`);
}
async images(id: number): Promise<Images>{
async images(id: number): Promise<Images> {
return await this.api.get<Images>(`${BASE_TV}/${id}/images`);
}
async keywords(id: number): Promise<Keywords>{
async keywords(id: number): Promise<Keywords> {
return await this.api.get<Keywords>(`${BASE_TV}/${id}/keywords`);
}
@@ -83,35 +89,39 @@ export class TvShowsEndpoint extends BaseEndpoint{
return await this.api.get<Reviews>(`${BASE_TV}/${id}/reviews`, options);
}
async screenedTheatrically(id: number): Promise<ScreenedTheatrically>{
return await this.api.get<ScreenedTheatrically>(`${BASE_TV}/${id}/screened_theatrically`);
async screenedTheatrically(id: number): Promise<ScreenedTheatrically> {
return await this.api.get<ScreenedTheatrically>(
`${BASE_TV}/${id}/screened_theatrically`
);
}
async similar(id: number, options?: PageOption): Promise<SimilarTvShows>{
return await this.api.get<SimilarTvShows>(`${BASE_TV}/${id}/similar`, options);
}
async translations(id: number): Promise<Translations>{
async translations(id: number): Promise<Translations> {
return await this.api.get<Translations>(`${BASE_TV}/${id}/translations`);
}
async videos(id: number): Promise<Videos>{
async videos(id: number): Promise<Videos> {
return await this.api.get<Videos>(`${BASE_TV}/${id}/videos`);
}
/**
* Powered by JustWatch
* @param id
*/
async watchProviders(id: number): Promise<WatchProviders>{
return await this.api.get<WatchProviders>(`${BASE_TV}/${id}/watch/providers`);
* Powered by JustWatch
* @param id
*/
async watchProviders(id: number): Promise<WatchProviders> {
return await this.api.get<WatchProviders>(
`${BASE_TV}/${id}/watch/providers`
);
}
async latest(): Promise<LatestTvShows>{
async latest(): Promise<LatestTvShows> {
return await this.api.get<LatestTvShows>(`${BASE_TV}/latest`);
}
async onTheAir(): Promise<OnTheAir>{
async onTheAir(): Promise<OnTheAir> {
return await this.api.get<OnTheAir>(`${BASE_TV}/on_the_air`);
}