better-trakt
Version:
A Trakt.tv client with native Typescript support and quality of life features
34 lines • 1.24 kB
TypeScript
import { ApiConfig, ApiNamespace } from '../client';
import { WatchedMovie, WatchedShow } from '../trakt';
import { ApiResponse } from '../utils';
/**
* Users api namespace
*/
export declare class Users implements ApiNamespace {
config: ApiConfig;
constructor(config: ApiConfig);
/**
* Returns all movies a user has watched sorted by most plays.
* @param client axios
* @param userId trakt user id
* @param accessToken oauth access token for private accounts
* @returns
*/
watchedMovies({ userId, accessToken, }: {
userId: string;
accessToken?: string;
}): Promise<ApiResponse<WatchedMovie[]>>;
/**
* Returns all shows a user has watched sorted by most plays.
* @param client axios
* @param userId trakt user id
* @param accessToken oauth access token for private accounts
* @returns
*/
watchedShows({ userId, accessToken }: {
userId: string;
accessToken?: string;
}): Promise<ApiResponse<WatchedShow[]>>;
}
export declare function getUserWatchedMedia<T>({ client, apiUrl }: ApiConfig, userId: string, type: 'movies' | 'shows', accessToken?: string): Promise<ApiResponse<T>>;
//# sourceMappingURL=index.d.ts.map