@solely/simple-fm
Advanced tools
Comparing version 1.4.5 to 1.4.6
@@ -9,4 +9,3 @@ import type { AlbumGetInfoType, AlbumGetTopTagsType, AlbumSearchType } from '../types/index.js'; | ||
* @param albumName - The name of the album. | ||
* @param userName - The username for the context of the request. | ||
* If supplied, the user's playcount for this artist's album is included in the response. | ||
* @param userName - The username for the context of the request. If supplied, the user's playcount for this artist's album is included in the response. | ||
*/ | ||
@@ -13,0 +12,0 @@ fetch(artistName: string, albumName: string, userName?: string): Promise<AlbumGetInfoType>; |
@@ -1,4 +0,3 @@ | ||
import { sanitizeURL } from '../utils/links.js'; | ||
import { convertImageSizes, convertURL } from '../utils/convert.js'; | ||
import { request } from '../request.js'; | ||
import { ImageSizes } from '../types/index.js'; | ||
export default class Album { | ||
@@ -13,4 +12,3 @@ token; | ||
* @param albumName - The name of the album. | ||
* @param userName - The username for the context of the request. | ||
* If supplied, the user's playcount for this artist's album is included in the response. | ||
* @param userName - The username for the context of the request. If supplied, the user's playcount for this artist's album is included in the response. | ||
*/ | ||
@@ -45,10 +43,2 @@ async fetch(artistName, albumName, userName) { | ||
}); | ||
const image = album.image | ||
.filter((i) => ImageSizes.includes(i.size)) | ||
.map((i) => { | ||
return { | ||
size: i.size, | ||
url: i['#text'], | ||
}; | ||
}); | ||
const response = { | ||
@@ -58,3 +48,3 @@ name: album.name, | ||
name: album.artist, | ||
url: `https://www.last.fm/music/${sanitizeURL(album.artist)}`, | ||
url: `https://www.last.fm/music/${convertURL(album.artist)}`, | ||
}, | ||
@@ -68,3 +58,3 @@ stats: { | ||
url: album.url, | ||
image, | ||
image: convertImageSizes(album.image), | ||
}; | ||
@@ -97,3 +87,3 @@ if (userName) | ||
name: attr.artist, | ||
url: `https://www.last.fm/music/${sanitizeURL(attr.artist)}`, | ||
url: `https://www.last.fm/music/${convertURL(attr.artist)}`, | ||
}, | ||
@@ -117,10 +107,2 @@ tags, | ||
const albums = album.map((album) => { | ||
const image = album.image | ||
.filter((i) => ImageSizes.includes(i.size)) | ||
.map((i) => { | ||
return { | ||
size: i.size, | ||
url: i['#text'], | ||
}; | ||
}); | ||
return { | ||
@@ -130,6 +112,6 @@ name: album.name, | ||
name: album.artist, | ||
url: `https://www.last.fm/music/${sanitizeURL(album.artist)}`, | ||
url: `https://www.last.fm/music/${convertURL(album.artist)}`, | ||
}, | ||
url: album.url, | ||
image, | ||
image: convertImageSizes(album.image), | ||
}; | ||
@@ -136,0 +118,0 @@ }); |
@@ -8,4 +8,3 @@ import type { ArtistGetInfoType, ArtistSearchType, ArtistSimilarType, ArtistTopAlbumsType, ArtistTopTagsType, ArtistTopTracksType } from '../types/index.js'; | ||
* @param artistName - The name of the artist. | ||
* @param userName - The username for the context of the request. | ||
* If supplied, the user's playcount for this artist is included in the response. | ||
* @param userName - The username for the context of the request. If supplied, the user's playcount for this artist is included in the response. | ||
* */ | ||
@@ -12,0 +11,0 @@ fetch(artistName: string, userName?: string): Promise<ArtistGetInfoType>; |
@@ -1,4 +0,3 @@ | ||
import { sanitizeURL } from '../utils/links.js'; | ||
import { convertImageSizes, convertURL } from '../utils/convert.js'; | ||
import { request } from '../request.js'; | ||
import { ImageSizes } from '../types/index.js'; | ||
export default class Artist { | ||
@@ -12,4 +11,3 @@ token; | ||
* @param artistName - The name of the artist. | ||
* @param userName - The username for the context of the request. | ||
* If supplied, the user's playcount for this artist is included in the response. | ||
* @param userName - The username for the context of the request. If supplied, the user's playcount for this artist is included in the response. | ||
* */ | ||
@@ -58,3 +56,3 @@ async fetch(artistName, userName) { | ||
name: attr.artist, | ||
url: `https://www.last.fm/music/${sanitizeURL(attr.artist)}`, | ||
url: `https://www.last.fm/music/${convertURL(attr.artist)}`, | ||
}, | ||
@@ -79,10 +77,2 @@ }, | ||
const albums = album.map((album) => { | ||
const image = album.image | ||
.filter((i) => ImageSizes.includes(i.size)) | ||
.map((i) => { | ||
return { | ||
size: i.size, | ||
url: i['#text'], | ||
}; | ||
}); | ||
return { | ||
@@ -96,3 +86,3 @@ name: album.name, | ||
url: album.url, | ||
image, | ||
image: convertImageSizes(album.image), | ||
}; | ||
@@ -104,3 +94,3 @@ }); | ||
name: attr.artist, | ||
url: `https://www.last.fm/music/${sanitizeURL(attr.artist)}`, | ||
url: `https://www.last.fm/music/${convertURL(attr.artist)}`, | ||
}, | ||
@@ -134,3 +124,3 @@ page: Number(attr.page), | ||
name: attr.artist, | ||
url: `https://www.last.fm/music/${sanitizeURL(attr.artist)}`, | ||
url: `https://www.last.fm/music/${convertURL(attr.artist)}`, | ||
}, | ||
@@ -172,3 +162,3 @@ tags, | ||
name: attr.artist, | ||
url: `https://www.last.fm/music/${sanitizeURL(attr.artist)}`, | ||
url: `https://www.last.fm/music/${convertURL(attr.artist)}`, | ||
}, | ||
@@ -175,0 +165,0 @@ page: Number(attr.page), |
@@ -7,4 +7,2 @@ import type { GeoArtistType, GeoTrackType } from '../types/index.js'; | ||
* Fetches and returns the most popular artists by country. | ||
* | ||
* Ordered by relevance. | ||
* @param country - The name of the country. | ||
@@ -17,4 +15,2 @@ * @param limit - The number of results to fetch per page. Defaults to 50. | ||
* Fetches and returns the most popular tracks by country. | ||
* | ||
* Ordered by relevance. | ||
* @param country - The name of the country. | ||
@@ -21,0 +17,0 @@ * @param limit - The number of results to fetch per page. Defaults to 50. |
@@ -9,4 +9,2 @@ import { request } from '../request.js'; | ||
* Fetches and returns the most popular artists by country. | ||
* | ||
* Ordered by relevance. | ||
* @param country - The name of the country. | ||
@@ -43,4 +41,2 @@ * @param limit - The number of results to fetch per page. Defaults to 50. | ||
* Fetches and returns the most popular tracks by country. | ||
* | ||
* Ordered by relevance. | ||
* @param country - The name of the country. | ||
@@ -47,0 +43,0 @@ * @param limit - The number of results to fetch per page. Defaults to 50. |
@@ -1,4 +0,3 @@ | ||
import { sanitizeURL } from '../utils/links.js'; | ||
import { convertImageSizes, convertURL } from '../utils/convert.js'; | ||
import { request } from '../request.js'; | ||
import { ImageSizes } from '../types/index.js'; | ||
export default class Tag { | ||
@@ -25,3 +24,3 @@ token; | ||
}, | ||
url: `https://www.last.fm/tag/${sanitizeURL(tag.name)}`, | ||
url: `https://www.last.fm/tag/${convertURL(tag.name)}`, | ||
}; | ||
@@ -43,10 +42,2 @@ } | ||
const albums = album.map((album) => { | ||
const image = album.image | ||
.filter((i) => ImageSizes.includes(i.size)) | ||
.map((i) => { | ||
return { | ||
size: i.size, | ||
url: i['#text'], | ||
}; | ||
}); | ||
return { | ||
@@ -59,4 +50,4 @@ rank: Number(album['@attr'].rank), | ||
}, | ||
url: `https://www.last.fm/music/${sanitizeURL(album.artist.name)}/${sanitizeURL(album.name)}`, | ||
image, | ||
url: `https://www.last.fm/music/${convertURL(album.artist.name)}/${convertURL(album.name)}`, | ||
image: convertImageSizes(album.image), | ||
}; | ||
@@ -63,0 +54,0 @@ }); |
@@ -9,4 +9,3 @@ import type { TrackGetInfoType, TrackSearchType, TrackSimilarType, TrackTopTagsType } from '../types/index.js'; | ||
* @param trackName - The name of the track. | ||
* @param userName - The username for the context of the request. | ||
* If supplied, the user's playcount for this track and whether they have loved the track is included in the response. | ||
* @param userName - The username for the context of the request. If supplied, the user's playcount for this track and whether they have loved the track is included in the response. | ||
*/ | ||
@@ -13,0 +12,0 @@ fetch(artistName: string, trackName: string, userName?: string): Promise<TrackGetInfoType>; |
@@ -1,4 +0,3 @@ | ||
import { sanitizeURL } from '../utils/links.js'; | ||
import { convertImageSizes, convertURL } from '../utils/convert.js'; | ||
import { request } from '../request.js'; | ||
import { ImageSizes } from '../types/index.js'; | ||
export default class Track { | ||
@@ -13,4 +12,3 @@ token; | ||
* @param trackName - The name of the track. | ||
* @param userName - The username for the context of the request. | ||
* If supplied, the user's playcount for this track and whether they have loved the track is included in the response. | ||
* @param userName - The username for the context of the request. If supplied, the user's playcount for this track and whether they have loved the track is included in the response. | ||
*/ | ||
@@ -30,10 +28,2 @@ async fetch(artistName, trackName, userName) { | ||
}); | ||
const image = track.album?.image | ||
.filter((i) => ImageSizes.includes(i.size)) | ||
.map((i) => { | ||
return { | ||
size: i.size, | ||
url: i['#text'], | ||
}; | ||
}); | ||
const response = { | ||
@@ -53,3 +43,3 @@ name: track.name, | ||
name: album?.title || null, | ||
image, | ||
image: convertImageSizes(album.image), | ||
url: album?.url || null, | ||
@@ -80,10 +70,2 @@ }, | ||
const tracks = track.map((track) => { | ||
const image = track.image | ||
.filter((i) => ImageSizes.includes(i.size)) | ||
.map((i) => { | ||
return { | ||
size: i.size, | ||
url: i['#text'], | ||
}; | ||
}); | ||
return { | ||
@@ -99,3 +81,3 @@ match: Number(track.match), | ||
url: track.url, | ||
image, | ||
image: convertImageSizes(track.image), | ||
}; | ||
@@ -107,5 +89,5 @@ }); | ||
name: attr.artist, | ||
url: `https://www.last.fm/music/${sanitizeURL(attr.artist)}`, | ||
url: `https://www.last.fm/music/${convertURL(attr.artist)}`, | ||
}, | ||
url: `https://www.last.fm/music/${sanitizeURL(attr.artist)}/_/${sanitizeURL(trackName)}`, | ||
url: `https://www.last.fm/music/${convertURL(attr.artist)}/_/${convertURL(trackName)}`, | ||
tracks, | ||
@@ -136,5 +118,5 @@ }; | ||
name: attr.artist, | ||
url: `https://www.last.fm/music/${sanitizeURL(attr.artist)}`, | ||
url: `https://www.last.fm/music/${convertURL(attr.artist)}`, | ||
}, | ||
url: `https://www.last.fm/music/${sanitizeURL(attr.artist)}/_/${sanitizeURL(attr.track)}`, | ||
url: `https://www.last.fm/music/${convertURL(attr.artist)}/_/${convertURL(attr.track)}`, | ||
tags, | ||
@@ -162,3 +144,3 @@ }; | ||
name: track.artist, | ||
url: `https://www.last.fm/music/${sanitizeURL(track.artist)}`, | ||
url: `https://www.last.fm/music/${convertURL(track.artist)}`, | ||
}, | ||
@@ -165,0 +147,0 @@ url: track.url, |
@@ -1,4 +0,3 @@ | ||
import { sanitizeURL } from '../utils/links.js'; | ||
import { convertImageSizes, convertURL } from '../utils/convert.js'; | ||
import { request } from '../request.js'; | ||
import { ImageSizes } from '../types/index.js'; | ||
export default class User { | ||
@@ -18,10 +17,2 @@ token; | ||
}); | ||
const image = user.image | ||
.filter((i) => ImageSizes.includes(i.size)) | ||
.map((i) => { | ||
return { | ||
size: i.size, | ||
url: i['#text'], | ||
}; | ||
}); | ||
return { | ||
@@ -33,3 +24,3 @@ name: user.name, | ||
url: user.url, | ||
image, | ||
image: convertImageSizes(user.image), | ||
}; | ||
@@ -51,10 +42,2 @@ } | ||
const friends = user.map((user) => { | ||
const image = user.image | ||
.filter((i) => ImageSizes.includes(i.size)) | ||
.map((i) => { | ||
return { | ||
size: i.size, | ||
url: i['#text'], | ||
}; | ||
}); | ||
return { | ||
@@ -66,3 +49,3 @@ name: user.name, | ||
url: user.url, | ||
image, | ||
image: convertImageSizes(user.image), | ||
}; | ||
@@ -129,5 +112,2 @@ }); | ||
}); | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
if (!tagType) | ||
throw new Error('No method was selected.'); | ||
const responseTypes = { | ||
@@ -188,10 +168,2 @@ album: albums?.album.map((album) => { | ||
const tracks = track.map((track) => { | ||
const image = track.image | ||
.filter((i) => ImageSizes.includes(i.size)) | ||
.map((i) => { | ||
return { | ||
size: i.size, | ||
url: i['#text'], | ||
}; | ||
}); | ||
return { | ||
@@ -201,7 +173,7 @@ name: track.name, | ||
name: track.artist['#text'], | ||
url: `https://www.last.fm/music/${sanitizeURL(track.artist['#text'])}`, | ||
url: `https://www.last.fm/music/${convertURL(track.artist['#text'])}`, | ||
}, | ||
album: track.album['#text'] || null, | ||
url: track.url, | ||
image, | ||
image: convertImageSizes(track.image), | ||
}; | ||
@@ -236,10 +208,2 @@ }); | ||
const albums = album.map((album) => { | ||
const image = album.image | ||
.filter((i) => ImageSizes.includes(i.size)) | ||
.map((i) => { | ||
return { | ||
size: i.size, | ||
url: i['#text'], | ||
}; | ||
}); | ||
return { | ||
@@ -254,3 +218,3 @@ rank: Number(album['@attr'].rank), | ||
url: album.url, | ||
image, | ||
image: convertImageSizes(album.image), | ||
}; | ||
@@ -340,10 +304,2 @@ }); | ||
const tracks = track.map((track) => { | ||
const image = track.image | ||
.filter((i) => ImageSizes.includes(i.size)) | ||
.map((i) => { | ||
return { | ||
size: i.size, | ||
url: i['#text'], | ||
}; | ||
}); | ||
return { | ||
@@ -361,3 +317,3 @@ rank: Number(track['@attr'].rank), | ||
url: track.url, | ||
image, | ||
image: convertImageSizes(track.image), | ||
}; | ||
@@ -364,0 +320,0 @@ }); |
@@ -8,2 +8,3 @@ import Album from './classes/album.class.js'; | ||
import User from './classes/user.class.js'; | ||
import LastFMError from './utils/error.js'; | ||
export * from './types/index.js'; | ||
@@ -22,3 +23,6 @@ export default class SimpleFMClient { | ||
if (!token) | ||
throw new Error('You have not specified a Last.fm API key.'); | ||
throw new LastFMError({ | ||
message: 'You have not specified a Last.fm API key. Get one here: https://www.last.fm/api/account/create', | ||
error: 6, | ||
}); | ||
this.album = new Album(token); | ||
@@ -25,0 +29,0 @@ this.artist = new Artist(token); |
@@ -54,9 +54,9 @@ export declare const ImageSizes: string[]; | ||
} | ||
export * from './album.type.js'; | ||
export * from './artist.type.js'; | ||
export * from './chart.type.js'; | ||
export * from './geo.type.js'; | ||
export * from './tag.type.js'; | ||
export * from './track.type.js'; | ||
export * from './user.type.js'; | ||
export type * from './album.type.js'; | ||
export type * from './artist.type.js'; | ||
export type * from './chart.type.js'; | ||
export type * from './geo.type.js'; | ||
export type * from './tag.type.js'; | ||
export type * from './track.type.js'; | ||
export type * from './user.type.js'; | ||
export * from '../responses/index.js'; |
export const ImageSizes = ['extralarge', 'large', 'medium', 'small']; | ||
export * from './album.type.js'; | ||
export * from './artist.type.js'; | ||
export * from './chart.type.js'; | ||
export * from './geo.type.js'; | ||
export * from './tag.type.js'; | ||
export * from './track.type.js'; | ||
export * from './user.type.js'; | ||
export * from '../responses/index.js'; |
{ | ||
"name": "@solely/simple-fm", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"license": "Zlib", | ||
@@ -5,0 +5,0 @@ "type": "module", |
166
README.md
@@ -44,3 +44,3 @@ <div align="center"> | ||
console.log(json); | ||
// => { currentlyPlaying: true, name: 'Dark World', artist: 'Mikel', album: 'Zelda & Chill', ...} | ||
// => { search: { user: 'solelychloe', nowPlaying: true, ... }, tracks: [...] } | ||
``` | ||
@@ -51,3 +51,3 @@ | ||
```ts | ||
import client from 'https://esm.sh/@solely/simple-fm'; | ||
import simpleFM from 'https://esm.sh/@solely/simple-fm'; | ||
``` | ||
@@ -63,5 +63,5 @@ | ||
- #### `artistName`: The name of the artist. | ||
- #### `albumName`: The name of the album. | ||
- #### `userName?`: The username for the context of the request. If supplied, the user's playcount for this artist's album is included in the response. | ||
- #### `artistName` (string): The name of the artist. | ||
- #### `albumName` (string): The name of the album. | ||
- #### `userName?` (string): The username for the context of the request. If supplied, the user's playcount for this artist's album is included in the response. | ||
@@ -72,4 +72,4 @@ ### album.fetchTopTags(artistName, albumName) | ||
- #### `artistName`: The name of the artist. | ||
- #### `albumName`: The name of the album. | ||
- #### `artistName` (string): The name of the artist. | ||
- #### `albumName` (string): The name of the album. | ||
@@ -80,5 +80,5 @@ ### album.search(albumName, limit?, page?) | ||
- #### `albumName`: The name of the album. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 30. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `albumName` (string): The name of the album. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 30. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -91,4 +91,4 @@ ## artist | ||
- #### `artistName`: The artist's name. | ||
- #### `userName?`: The username for the context of the request. If supplied, the user's playcount for this artist is included in the response. | ||
- #### `artistName` (string): The artist's name. | ||
- #### `userName?` (string): The username for the context of the request. If supplied, the user's playcount for this artist is included in the response. | ||
@@ -99,4 +99,4 @@ ### artist.fetchSimilar(artistName, limit?) | ||
- #### `artistName`: The artist's name. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 30. | ||
- #### `artistName` (string): The artist's name. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 30. | ||
@@ -107,5 +107,5 @@ ### artist.fetchTopAlbums(artistName, limit?, page?) | ||
- #### `artistName`: The artist's name. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `artistName` (string): The artist's name. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -116,3 +116,3 @@ ### artist.fetchTopTags(artistName) | ||
- #### `artistName`: The artist's name. | ||
- #### `artistName` (string): The artist's name. | ||
@@ -123,5 +123,5 @@ ### artist.fetchTopTracks(artistName, limit?, page?) | ||
- #### `artistName`: The artist's name. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `artistName` (string): The artist's name. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -132,5 +132,5 @@ ### artist.search(artistName, limit?, page?) | ||
- #### `artistName`: The artist's name. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 30. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `artistName` (string): The artist's name. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 30. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -143,4 +143,4 @@ ## chart | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 30. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 30. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -151,4 +151,4 @@ ### chart.fetchTopTags(limit?, page?) | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 30. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 30. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -159,4 +159,4 @@ ### chart.fetchTopTracks(limit?, page?) | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 30. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 30. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -169,8 +169,6 @@ ## geo | ||
_Ordered by relevance._ | ||
- #### `country` (string): The name of the country. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
- #### `country`: The name of the country. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
### geo.fetchTopTracks(country, limit?, page?) | ||
@@ -180,8 +178,6 @@ | ||
Ordered by relevance. | ||
- #### `country` (string): The name of the country. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
- #### `country`: The name of the country. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
## tag | ||
@@ -193,15 +189,15 @@ | ||
- #### `tagName`: The name of the tag. | ||
- #### `tagName` (string): The name of the tag. | ||
### tag.fetchTopAlbums(tagName, limit?, page?) | ||
- #### `tagName`: The name of the tag. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `tagName` (string): The name of the tag. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
### tag.fetchTopArtists(tagName, limit?, page?) | ||
- #### `tagName`: The name of the tag. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `tagName` (string): The name of the tag. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -212,5 +208,5 @@ ### tag.fetchTopTracks(tagName, limit?, page?) | ||
- #### `tagName`: The name of the tag. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `tagName` (string): The name of the tag. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -221,3 +217,3 @@ ### tag.fetchWeeklyChartList(tagName) | ||
- #### `tagName`: The name of the tag. | ||
- #### `tagName` (string): The name of the tag. | ||
@@ -230,4 +226,4 @@ ## track | ||
- #### `artistName`: The name of the artist. | ||
- #### `trackName`: The name of the track. | ||
- #### `artistName` (string): The name of the artist. | ||
- #### `trackName` (string): The name of the track. | ||
@@ -238,5 +234,5 @@ ### track.fetchSimilar(artistName, trackName, limit?) | ||
- #### `artistName`: The name of the artist. | ||
- #### `trackName`: The name of the track. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 30. | ||
- #### `artistName` (string): The name of the artist. | ||
- #### `trackName` (string): The name of the track. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 30. | ||
@@ -247,4 +243,4 @@ ### track.fetchTopTags(artistName, trackName) | ||
- #### `artistName`: The name of the artist. | ||
- #### `trackName`: The name of the track. | ||
- #### `artistName` (string): The name of the artist. | ||
- #### `trackName` (string): The name of the track. | ||
@@ -255,5 +251,5 @@ ### track.search(trackName, limit?, page?) | ||
- #### `trackName`: The name of the track. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 30. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `trackName` (string): The name of the track. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 30. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -266,3 +262,3 @@ ## user | ||
- #### `userName`: The name of the user. | ||
- #### `userName` (string): The name of the user. | ||
@@ -273,5 +269,5 @@ ### user.fetchAllArtists(userName, limit?, page?) | ||
- #### `userName`: The name of the user. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `userName` (string): The name of the user. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -282,5 +278,5 @@ ### user.fetchFriends(userName, limit?, page?) | ||
- #### `userName`: The name of the user. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `userName` (string): The name of the user. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -291,5 +287,5 @@ ### user.fetchLovedTracks(userName, limit?, page?) | ||
- #### `userName`: The name of the user. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `userName` (string): The name of the user. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -300,5 +296,5 @@ ### user.fetchPersonalTags(userName, tagName, tagType) | ||
- #### `userName`: The name of the user. | ||
- #### `tagName`: The name of the tag. | ||
- #### `tagType`: The type of items which have been tagged. Accepted options: `album`, `artist`, `track` | ||
- #### `userName` (string): The name of the user. | ||
- #### `tagName` (string): The name of the tag. | ||
- #### `tagType` (album, artist, track): The type of items which have been tagged. | ||
@@ -309,5 +305,5 @@ ### user.fetchRecentTracks(userName, limit?, page?) | ||
- #### `userName`: The name of the user. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. Maximum is 200. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `userName` (string): The name of the user. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. Maximum is 200. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -318,10 +314,10 @@ ### user.fetchTopAlbums | ||
- #### `userName`: The name of the user. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `userName` (string): The name of the user. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
### user.fetchTopTags(userName, limit?) | ||
- #### `userName`: The name of the user. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `userName` (string): The name of the user. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
@@ -332,5 +328,5 @@ ### user.fetchTopTracks(userName, limit?, page?) | ||
- #### `userName`: The name of the user. | ||
- #### `limit?`: The number of results to fetch per page. Defaults to 50. | ||
- #### `page?`: The page number to fetch. Defaults to the first page. | ||
- #### `userName` (string): The name of the user. | ||
- #### `limit?` (number): The number of results to fetch per page. Defaults to 50. | ||
- #### `page?` (number): The page number to fetch. Defaults to the first page. | ||
@@ -337,0 +333,0 @@ # License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93306
2580
319