better-trakt
Version:
A Trakt.tv client with native Typescript support and quality of life features
222 lines • 8.32 kB
TypeScript
import { ApiConfig, ApiNamespace } from '../client';
import { MovieSummary_Full, MoviePeople, TrendingMovie, TraktApiContent, RecommendedPeriod, RecommendedMovie, Played_Watched_CollectedMovie, AnticipatedMovie, BoxOfficeMovie, UpdatesMovie, UpdatedStartDate, UpdatedIDs, Release, ReleasesCountry, Alias, MovieTranslation, CommentSortByMedia, Comment, ListQueryByType, MediaRating, List, MovieStats, UserProfile } from '../trakt';
import { ApiResponse, Pagination, Filters } from '../utils';
/**
* Movies api namespace
*/
export declare class Movies implements ApiNamespace {
config: ApiConfig;
constructor(config: ApiConfig);
/**
* Returns a single movie's details.
* @param movieId movie id
* @returns
*/
summary({ movieId }: {
movieId: string;
}): Promise<ApiResponse<MovieSummary_Full>>;
/**
* Returns all cast and crew for a movie.
* @param movieId movie id
* @returns
*/
people({ movieId }: {
movieId: string;
}): Promise<ApiResponse<MoviePeople>>;
/**
* Returns all movies being watched right now.
* @param pagination
* @returns
*/
trending({ pagination, filters, }: {
pagination: Pagination;
filters?: Filters;
}): Promise<ApiResponse<TrendingMovie[]>>;
/**
* Returns the most popular movies.
* @param pagination
* @returns
*/
popular({ pagination, filters, }: {
pagination: Pagination;
filters?: Filters;
}): Promise<ApiResponse<TraktApiContent[]>>;
/**
* Returns the most recommended movies in the specified time period, defaulting to weekly. All stats are relative to the specific time period.
* @param param0
* @returns
*/
recommended({ pagination, filters, period, }: {
pagination: Pagination;
filters?: Filters;
period?: RecommendedPeriod;
}): Promise<ApiResponse<RecommendedMovie[]>>;
/**
* Returns the most played (a single user can watch multiple times) movies in the specified time period, defaulting to weekly. All stats are relative to the specific time period.
* @param param0
* @returns
*/
played({ pagination, filters, period, }: {
pagination: Pagination;
filters?: Filters;
period?: RecommendedPeriod;
}): Promise<ApiResponse<Played_Watched_CollectedMovie[]>>;
/**
* Returns the most collected (unique users) shows in the specified time period, defaulting to weekly. All stats are relative to the specific time period.
* @param param0
* @returns
*/
watched({ pagination, filters, period, }: {
pagination: Pagination;
filters?: Filters;
period?: RecommendedPeriod;
}): Promise<ApiResponse<Played_Watched_CollectedMovie[]>>;
/**
* Returns the most collected (unique users) movies in the specified time period, defaulting to weekly. All stats are relative to the specific time period.
* @param param0
* @returns
*/
collected({ pagination, filters, period, }: {
pagination: Pagination;
filters?: Filters;
period?: RecommendedPeriod;
}): Promise<ApiResponse<Played_Watched_CollectedMovie[]>>;
/**
* Returns the most anticipated movies based on the number of lists a movie appears on.
* @param param0
* @returns
*/
anticipated({ pagination, filters, }: {
pagination: Pagination;
filters?: Filters;
}): Promise<ApiResponse<AnticipatedMovie[]>>;
/**
* Returns the top 10 grossing movies in the U.S. box office last weekend. Updated every Monday morning.
* @returns
*/
boxOffice(): Promise<ApiResponse<BoxOfficeMovie[]>>;
/**
* Returns all shows updated since the specified UTC date and time.
* We recommended storing the X-Start-Date header you can be efficient using this method moving forward.
* By default, 10 results are returned. You can send a limit to get up to 100 results per page.
*
* **Important!**
* The start_date is only accurate to the hour, for caching purposes.
* Please drop the minutes and seconds from your timestamp to help optimize our cached data.
* For example, use 2021-07-17T12:00:00Z and not 2021-07-17T12:23:34Z.
*
* Note: The start_date can only be a maximum of 30 days in the past.
* @param param0
* @returns
*/
updates({ pagination, startDate, }: {
pagination: Pagination;
startDate?: UpdatedStartDate;
}): Promise<ApiResponse<UpdatesMovie[]>>;
/**
* Returns all show Trakt IDs updated since the specified UTC date and time.
* We recommended storing the X-Start-Date header you can be efficient using this method moving forward.
* By default, 10 results are returned. You can send a limit to get up to 100 results per page.
*
* **Important!**
* The start_date is only accurate to the hour, for caching purposes.
* Please drop the minutes and seconds from your timestamp to help optimize our cached data.
* For example, use 2021-07-17T12:00:00Z and not 2021-07-17T12:23:34Z.
*
* Note: The start_date can only be a maximum of 30 days in the past.
* @param param0
* @returns
*/
updatedIDs({ pagination, startDate, }: {
pagination: Pagination;
startDate?: UpdatedStartDate;
}): Promise<ApiResponse<UpdatedIDs>>;
/**
* Returns all title aliases for a movie. Includes country where name is different.
* @param param0
* @returns
*/
aliases({ movieID }: {
movieID: string;
}): Promise<ApiResponse<Alias[]>>;
/**
* Returns all releases for a movie including country,
* certification, release date, release type, and note.
* The release type can be set to unknown, premiere,
* limited, theatrical, digital, physical, or tv.
* The note might have optional info such as the film festival
* name for a premiere release or Blu-ray specs for a physical release.
* We pull this info from TMDB.
* @param param0
* @returns All the releases for a movie
*/
releases({ movieID, country, }: {
movieID: string;
country?: ReleasesCountry;
}): Promise<ApiResponse<Release[]>>;
/**
* Returns all translations for a movie, including language and translated values for title, tagline and overview.
* @param param0
* @returns
*/
translations({ movieID, language, }: {
movieID: string;
language?: string;
}): Promise<ApiResponse<MovieTranslation[]>>;
/**
* Returns all top level comments for a movie. By default, the newest comments are returned first.
* Other sorting options include oldest, most likes, most replies, highest rated, lowest rated, and most plays.
* @param param0
* @returns
*/
comments({ movieID, pagination, sort, }: {
movieID: string;
pagination: Pagination;
sort?: CommentSortByMedia;
}): Promise<ApiResponse<Comment[]>>;
/**
* Returns all lists that contain this movie. By default, personal lists are returned sorted by the most popular.
* @param param0
* @returns
*/
lists({ movieID, pagination, sort, type, }: {
movieID: string;
pagination: Pagination;
sort?: CommentSortByMedia;
type?: ListQueryByType;
}): Promise<ApiResponse<List[]>>;
/**
* Returns rating (between 0 and 10) and distribution for a movie.
* @param param0
* @returns
*/
ratings({ movieID }: {
movieID: string;
}): Promise<ApiResponse<MediaRating>>;
/**
* Returns related and similar movies.
* @param param0
* @returns
*/
related({ movieID, pagination, }: {
movieID: string;
pagination: Pagination;
}): Promise<ApiResponse<TraktApiContent[]>>;
/**
* Returns lots of movie stats.
* @param param0
* @returns
*/
stats({ movieID }: {
movieID: string;
}): Promise<ApiResponse<MovieStats>>;
/**
* Returns all users watching this movie right now.
* @param param0
* @returns
*/
watching({ movieID }: {
movieID: string;
}): Promise<ApiResponse<UserProfile[]>>;
}
//# sourceMappingURL=index.d.ts.map