@musicorum/lastfm
Version:
Fully typed [Last.fm](https://last.fm) api client library written and made for Typescript!
15 lines (14 loc) • 1.31 kB
TypeScript
import type { LastClient } from '../LastClient.js';
import PaginatedResult from '../PaginatedResource.js';
import { LastfmRecentTracksResponse, LastfmRecentTracksTrackResource, LastfmUserRecentTracksParams, LastfmUserTopAlbumsParams, UserTopArtists, UserTopTracks } from '../types/packages/user.js';
import type { GetFormattedResponse, LastfmResponses } from '../types/responses.js';
export declare class User {
private client;
constructor(client: LastClient);
getInfo(user: string): Promise<GetFormattedResponse<LastfmResponses['user.getInfo']>>;
getRecentTracks<EXTENDED extends boolean = false>(user: string, params?: LastfmUserRecentTracksParams): Promise<LastfmRecentTracksResponse<EXTENDED>>;
getRecentTracksPaginated<EXTENDED extends boolean = false>(user: string, params?: LastfmUserRecentTracksParams): Promise<PaginatedResult<LastfmRecentTracksTrackResource<EXTENDED>>>;
getTopAlbums(user: string, params?: LastfmUserTopAlbumsParams): Promise<GetFormattedResponse<LastfmResponses['user.getTopAlbums']>>;
getTopArtists(user: string, params?: UserTopArtists.Params): Promise<GetFormattedResponse<LastfmResponses['user.getTopArtists']>>;
getTopTracks(user: string, params?: UserTopTracks.Params): Promise<GetFormattedResponse<LastfmResponses['user.getTopTracks']>>;
}