@musicorum/lastfm
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -0,0 +0,0 @@ import { LastfmErrorResponse } from '../types/responses'; |
@@ -0,0 +0,0 @@ export class LastfmError extends Error { |
@@ -0,0 +0,0 @@ import { User } from './packages/User.js'; |
@@ -0,0 +0,0 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ |
@@ -0,0 +0,0 @@ import { LastClient } from '../LastClient.js'; |
@@ -0,0 +0,0 @@ import { parseLastfmImages } from '../utils.js'; |
@@ -0,0 +0,0 @@ import { LastClient } from '../LastClient.js'; |
@@ -0,0 +0,0 @@ import { parseLastfmImages } from '../utils.js'; |
@@ -0,0 +0,0 @@ import type { LastClient } from '../LastClient'; |
@@ -0,0 +0,0 @@ export class Auth { |
@@ -0,0 +0,0 @@ import { LastClient } from '../LastClient.js'; |
@@ -0,0 +0,0 @@ import { parseLastfmImages } from '../utils.js'; |
@@ -0,0 +0,0 @@ import type { LastClient } from '../LastClient'; |
@@ -0,0 +0,0 @@ import PaginatedResult from '../PaginatedResource.js'; |
@@ -0,0 +0,0 @@ import type { LastClient } from '../LastClient'; |
@@ -0,0 +0,0 @@ export class Utilities { |
import { PaginatedResponseAttributes } from './types/packages/common'; | ||
export declare type RequesterFn<R> = (page: number) => Promise<R[]>; | ||
export type RequesterFn<R> = (page: number) => Promise<R[]>; | ||
/** | ||
@@ -4,0 +4,0 @@ * Paginated results for a resource. This can be used to get specific pages or multiple pages |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import type { LastfmImage, LastfmRawImage, LastfmRawWikiData, LastfmTag, LastfmWikiData, StringRecord } from './common'; |
export {}; |
@@ -0,0 +0,0 @@ import type { LastfmImage, LastfmRawImage, LastfmRawWikiData, LastfmTag, LastfmWikiData } from './common'; |
export {}; |
@@ -0,0 +0,0 @@ export interface LastfmAuthGetTokenResponse { |
export {}; |
@@ -1,3 +0,3 @@ | ||
export declare type StringRecord<K extends string> = Record<K, string>; | ||
export declare type LastfmImageSize = 'small' | 'medium' | 'large' | 'extralarge' | 'mega'; | ||
export type StringRecord<K extends string> = Record<K, string>; | ||
export type LastfmImageSize = 'small' | 'medium' | 'large' | 'extralarge' | 'mega'; | ||
export interface LastfmRawImage { | ||
@@ -21,3 +21,3 @@ size: LastfmImageSize; | ||
} | ||
export declare type PaginatedResponseAttributes<EXTRA extends string = never> = { | ||
export type PaginatedResponseAttributes<EXTRA extends string = never> = { | ||
totalPages: string; | ||
@@ -30,3 +30,3 @@ page: string; | ||
}; | ||
export declare type LastfmDate = StringRecord<'uts' | '#text'>; | ||
export declare type LastfmTag = StringRecord<'name' | 'url'>; | ||
export type LastfmDate = StringRecord<'uts' | '#text'>; | ||
export type LastfmTag = StringRecord<'name' | 'url'>; |
export {}; |
@@ -0,0 +0,0 @@ import type { LastfmImage, LastfmRawImage, LastfmRawWikiData, LastfmTag, LastfmWikiData, StringRecord } from './common'; |
export {}; |
@@ -81,3 +81,3 @@ import type { LastfmDate, LastfmImage, LastfmRawImage, PaginatedResponseAttributes, StringRecord } from './common'; | ||
} | ||
export declare type LastfmUserRecentTrackResponseResource<EXTENDED extends boolean> = EXTENDED extends true ? LastfmUserRecentTracksResponseTrackExtended : LastfmUserRecentTracksResponseTrack; | ||
export type LastfmUserRecentTrackResponseResource<EXTENDED extends boolean> = EXTENDED extends true ? LastfmUserRecentTracksResponseTrackExtended : LastfmUserRecentTracksResponseTrack; | ||
export interface LastfmOriginalUserRecentTracksResponse<EXTENDED extends boolean> { | ||
@@ -109,3 +109,3 @@ recenttracks: { | ||
} | ||
export declare type LastfmRecentTracksTrackResource<EXTENDED extends boolean> = EXTENDED extends true ? LastfmRecentTracksTrackExtended : LastfmRecentTracksTrack; | ||
export type LastfmRecentTracksTrackResource<EXTENDED extends boolean> = EXTENDED extends true ? LastfmRecentTracksTrackExtended : LastfmRecentTracksTrack; | ||
export interface LastfmRecentTracksResponse<EXTENDED extends boolean> { | ||
@@ -112,0 +112,0 @@ tracks: LastfmRecentTracksTrackResource<EXTENDED>[]; |
export {}; |
@@ -10,9 +10,9 @@ import type { LastfmOriginalUserInfoResponse, LastfmOriginalUserRecentTracksResponse, LastfmOriginalUserTopArtistsResponse, LastfmUserInfo } from './packages/user'; | ||
} | ||
export declare type LastfmResponse<ORIGINAL, FORMATTED = ORIGINAL> = { | ||
export type LastfmResponse<ORIGINAL, FORMATTED = ORIGINAL> = { | ||
original: ORIGINAL; | ||
formatted: FORMATTED; | ||
}; | ||
export declare type GetOriginalResponse<R extends LastfmResponse<unknown, unknown>> = R['original']; | ||
export declare type GetFormattedResponse<R extends LastfmResponse<unknown, unknown>> = R['formatted']; | ||
export declare type LastfmResponses = { | ||
export type GetOriginalResponse<R extends LastfmResponse<unknown, unknown>> = R['original']; | ||
export type GetFormattedResponse<R extends LastfmResponse<unknown, unknown>> = R['formatted']; | ||
export type LastfmResponses = { | ||
'user.getInfo': LastfmResponse<LastfmOriginalUserInfoResponse, LastfmUserInfo>; | ||
@@ -27,2 +27,2 @@ 'user.getRecentTracks': LastfmResponse<LastfmOriginalUserRecentTracksResponse<true | false>>; | ||
}; | ||
export declare type LastfmApiMethod = keyof LastfmResponses; | ||
export type LastfmApiMethod = keyof LastfmResponses; |
export {}; |
import { LastfmImage, LastfmRawImage } from './types/packages/common'; | ||
export declare function parseLastfmImages(images: LastfmRawImage[]): LastfmImage[]; |
@@ -0,0 +0,0 @@ export function parseLastfmImages(images) { |
{ | ||
"name": "@musicorum/lastfm", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "", | ||
@@ -11,3 +11,3 @@ "main": "dist/LastClient.js", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"prepublish": "tsc && cp ../README.md ./README.md" | ||
"prepublish": "tsc" | ||
}, | ||
@@ -40,6 +40,6 @@ "engines": { | ||
"devDependencies": { | ||
"@types/node": "^18.13.0", | ||
"@typescript-eslint/eslint-plugin": "^5.51.0", | ||
"@typescript-eslint/parser": "^5.51.0", | ||
"eslint": "^8.33.0", | ||
"@types/node": "^18.14.0", | ||
"@typescript-eslint/eslint-plugin": "^5.52.0", | ||
"@typescript-eslint/parser": "^5.52.0", | ||
"eslint": "^8.34.0", | ||
"eslint-config-prettier": "^8.6.0", | ||
@@ -46,0 +46,0 @@ "eslint-plugin-prettier": "^4.2.1", |
@@ -0,0 +0,0 @@ # @musicorum/lastfm |
@@ -0,0 +0,0 @@ import { LastfmErrorResponse } from '../types/responses' |
@@ -0,0 +0,0 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ |
@@ -0,0 +0,0 @@ import { LastClient } from '../LastClient.js' |
@@ -0,0 +0,0 @@ import { LastClient } from '../LastClient.js' |
@@ -0,0 +0,0 @@ import type { LastClient } from '../LastClient' |
@@ -0,0 +0,0 @@ import { LastClient } from '../LastClient.js' |
@@ -0,0 +0,0 @@ import type { LastClient } from '../LastClient' |
@@ -0,0 +0,0 @@ import { PaginatedResponseAttributes } from './types/packages/common' |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ export interface LastfmAuthGetTokenResponse { |
@@ -0,0 +0,0 @@ export type StringRecord<K extends string> = Record<K, string> |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import type { |
@@ -0,0 +0,0 @@ import { LastfmImage, LastfmRawImage } from './types/packages/common' |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
182340
56
5066
2