apollo-datasource-spotify
Advanced tools
Comparing version 0.0.1 to 0.0.2
interface Params { | ||
limit?: number; | ||
offset?: number; | ||
limit?: number; | ||
offset?: number; | ||
} | ||
interface Data { | ||
total: number; | ||
total: number; | ||
} | ||
interface Options<D> { | ||
size?: number; | ||
waitForCallback?: boolean; | ||
limit?: number; | ||
offset?: number; | ||
request: (params: Params) => Promise<D>; | ||
callback: (data: D) => Promise<void>; | ||
size?: number; | ||
waitForCallback?: boolean; | ||
limit?: number; | ||
offset?: number; | ||
request: (params: Params) => Promise<D>; | ||
callback: (data: D) => Promise<void>; | ||
} | ||
export declare const batch: <D extends Data>({ size, waitForCallback, limit, offset, request, callback, }: Options<D>) => Promise<void>; | ||
export declare const batch: <D extends Data>({ | ||
size, | ||
waitForCallback, | ||
limit, | ||
offset, | ||
request, | ||
callback, | ||
}: Options<D>) => Promise<void>; | ||
export {}; | ||
//# sourceMappingURL=batch.d.ts.map | ||
//# sourceMappingURL=batch.d.ts.map |
export { SpotifyAPI, Context } from './spotify-api'; | ||
export { batch } from './batch'; | ||
//# sourceMappingURL=index.d.ts.map | ||
//# sourceMappingURL=index.d.ts.map |
export interface Params { | ||
[key: string]: any; | ||
[key: string]: any; | ||
} | ||
export interface Page { | ||
limit?: number; | ||
offset?: number; | ||
limit?: number; | ||
offset?: number; | ||
} | ||
export interface Cursor { | ||
limit?: number; | ||
after?: number; | ||
before?: number; | ||
limit?: number; | ||
after?: number; | ||
before?: number; | ||
} | ||
export interface AlbumTracks extends Params, Page { | ||
} | ||
export interface AlbumTracks extends Params, Page {} | ||
export interface ArtistAlbums extends Params, Page { | ||
include_groups?: 'album' | 'single' | 'appears_on' | 'compilation'; | ||
include_groups?: 'album' | 'single' | 'appears_on' | 'compilation'; | ||
} | ||
export interface Saved extends Params, Page { | ||
} | ||
export interface Saved extends Params, Page {} | ||
export interface Top extends Params, Page { | ||
time_range?: 'short_term' | 'medium_term' | 'long_term'; | ||
time_range?: 'short_term' | 'medium_term' | 'long_term'; | ||
} | ||
export interface AddTracksToPlaylist extends Params { | ||
uris?: string[]; | ||
position?: number; | ||
uris?: string[]; | ||
position?: number; | ||
} | ||
export interface UpdatePlaylist extends Params { | ||
name?: string; | ||
public?: boolean; | ||
collaborative?: boolean; | ||
description?: string; | ||
name?: string; | ||
public?: boolean; | ||
collaborative?: boolean; | ||
description?: string; | ||
} | ||
export interface CreatePlaylist extends Params { | ||
name?: string; | ||
public?: boolean; | ||
collaborative?: boolean; | ||
description?: string; | ||
name?: string; | ||
public?: boolean; | ||
collaborative?: boolean; | ||
description?: string; | ||
} | ||
export interface Playlists extends Params, Page { | ||
} | ||
export interface UsersPlaylists extends Params, Page { | ||
} | ||
export interface Playlists extends Params, Page {} | ||
export interface UsersPlaylists extends Params, Page {} | ||
export interface Playlist extends Params { | ||
fields?: string; | ||
fields?: string; | ||
} | ||
export interface PlaylistTracks extends Params, Page { | ||
fields?: string; | ||
fields?: string; | ||
} | ||
export interface RemovePlaylistTracks extends Params { | ||
snapshot_id?: string; | ||
tracks: [{ | ||
uri: string; | ||
positions: string[]; | ||
}]; | ||
snapshot_id?: string; | ||
tracks: [ | ||
{ | ||
uri: string; | ||
positions: string[]; | ||
} | ||
]; | ||
} | ||
export interface ReorderPlaylistTracks extends Params { | ||
range_start: number; | ||
range_length?: number; | ||
insert_before: number; | ||
snapshot_id?: string; | ||
range_start: number; | ||
range_length?: number; | ||
insert_before: number; | ||
snapshot_id?: string; | ||
} | ||
export interface ReplacePlaylistTracks extends Params { | ||
uris?: string[]; | ||
uris?: string[]; | ||
} | ||
export interface Search extends Params, Page { | ||
q: string; | ||
type: string; | ||
include_external?: 'audio'; | ||
q: string; | ||
type: string; | ||
include_external?: 'audio'; | ||
} | ||
export interface RecentTracks extends Params, Cursor { | ||
} | ||
//# sourceMappingURL=params.d.ts.map | ||
export interface RecentTracks extends Params, Cursor {} | ||
//# sourceMappingURL=params.d.ts.map |
import { RequestOptions, RESTDataSource } from 'apollo-datasource-rest'; | ||
import * as p from './params'; | ||
export interface Context { | ||
token?: string; | ||
authorization?: string; | ||
token?: string; | ||
authorization?: string; | ||
} | ||
export declare class SpotifyAPI extends RESTDataSource<Context> { | ||
baseURL: string; | ||
private limiter; | ||
private albumLoader; | ||
private artistLoader; | ||
private trackLoader; | ||
constructor(); | ||
album(id: string): Promise<unknown>; | ||
albumTracks(id: string, params: p.AlbumTracks): Promise<any>; | ||
albums(ids: string[]): Promise<unknown[]>; | ||
artist(id: string): Promise<unknown>; | ||
artistAlbums(id: string, params: p.ArtistAlbums): Promise<any>; | ||
artistTopTracks(id: string): Promise<any>; | ||
artistRelatedArtists(id: string): Promise<any>; | ||
artists(ids: string[]): Promise<unknown[]>; | ||
track(id: string): Promise<unknown>; | ||
tracks(ids: string[]): Promise<unknown[]>; | ||
savedAlbums(params: p.Saved): Promise<any>; | ||
savedTracks(params: p.Saved): Promise<any>; | ||
removeAlbums(ids: string[]): Promise<any>; | ||
removeTracks(ids: string[]): Promise<any>; | ||
saveAlbums(ids: string[]): Promise<any>; | ||
saveTracks(ids: string[]): Promise<any>; | ||
topArtists(params: p.Top): Promise<any>; | ||
topTracks(params: p.Top): Promise<any>; | ||
addTracksToPlaylist(id: string, params: p.AddTracksToPlaylist): Promise<any>; | ||
updatePlaylist(id: string, params: p.UpdatePlaylist): Promise<any>; | ||
createPlaylist(userId: string, params: p.CreatePlaylist): Promise<any>; | ||
playlists(params: p.Playlists): Promise<any>; | ||
usersPlaylists(id: string, params: p.UsersPlaylists): Promise<any>; | ||
playlist(id: string, params: p.Playlist): Promise<any>; | ||
playlistCoverImage(id: string): Promise<any>; | ||
playlistTracks(id: string, params: p.PlaylistTracks): Promise<any>; | ||
removePlaylistTracks(id: string, params: p.RemovePlaylistTracks): Promise<any>; | ||
reorderPlaylistTracks(id: string, params: p.ReorderPlaylistTracks): Promise<any>; | ||
replacePlaylistTracks(id: string, params: p.ReorderPlaylistTracks): Promise<any>; | ||
search(params: p.Search): Promise<any>; | ||
me(): Promise<any>; | ||
user(id: string): Promise<any>; | ||
recentlyPlayed(params: p.RecentTracks): Promise<any>; | ||
protected willSendRequest(request: RequestOptions): void; | ||
baseURL: string; | ||
private limiter; | ||
private albumLoader; | ||
private artistLoader; | ||
private trackLoader; | ||
constructor(); | ||
album(id: string): Promise<unknown>; | ||
albumTracks(id: string, params: p.AlbumTracks): Promise<any>; | ||
albums(ids: string[]): Promise<unknown[]>; | ||
artist(id: string): Promise<unknown>; | ||
artistAlbums(id: string, params: p.ArtistAlbums): Promise<any>; | ||
artistTopTracks(id: string): Promise<any>; | ||
artistRelatedArtists(id: string): Promise<any>; | ||
artists(ids: string[]): Promise<unknown[]>; | ||
track(id: string): Promise<unknown>; | ||
tracks(ids: string[]): Promise<unknown[]>; | ||
savedAlbums(params: p.Saved): Promise<any>; | ||
savedTracks(params: p.Saved): Promise<any>; | ||
removeAlbums(ids: string[]): Promise<any>; | ||
removeTracks(ids: string[]): Promise<any>; | ||
saveAlbums(ids: string[]): Promise<any>; | ||
saveTracks(ids: string[]): Promise<any>; | ||
topArtists(params: p.Top): Promise<any>; | ||
topTracks(params: p.Top): Promise<any>; | ||
addTracksToPlaylist(id: string, params: p.AddTracksToPlaylist): Promise<any>; | ||
updatePlaylist(id: string, params: p.UpdatePlaylist): Promise<any>; | ||
createPlaylist(userId: string, params: p.CreatePlaylist): Promise<any>; | ||
playlists(params: p.Playlists): Promise<any>; | ||
usersPlaylists(id: string, params: p.UsersPlaylists): Promise<any>; | ||
playlist(id: string, params: p.Playlist): Promise<any>; | ||
playlistCoverImage(id: string): Promise<any>; | ||
playlistTracks(id: string, params: p.PlaylistTracks): Promise<any>; | ||
removePlaylistTracks( | ||
id: string, | ||
params: p.RemovePlaylistTracks | ||
): Promise<any>; | ||
reorderPlaylistTracks( | ||
id: string, | ||
params: p.ReorderPlaylistTracks | ||
): Promise<any>; | ||
replacePlaylistTracks( | ||
id: string, | ||
params: p.ReorderPlaylistTracks | ||
): Promise<any>; | ||
search(params: p.Search): Promise<any>; | ||
me(): Promise<any>; | ||
user(id: string): Promise<any>; | ||
recentlyPlayed(params: p.RecentTracks): Promise<any>; | ||
protected willSendRequest(request: RequestOptions): void; | ||
} | ||
//# sourceMappingURL=spotify-api.d.ts.map | ||
//# sourceMappingURL=spotify-api.d.ts.map |
{ | ||
"name": "apollo-datasource-spotify", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "RESTDataSource wrapper for the Spotify API", | ||
@@ -20,3 +20,4 @@ "author": "Jamal Carvalho <jamal.a.carvalho@gmail.com>", | ||
"develop": "tsc -w", | ||
"lint": "eslint . --ext .ts" | ||
"lint": "eslint . --ext .ts", | ||
"graphql": "graphql-codegen" | ||
}, | ||
@@ -42,24 +43,26 @@ "husky": { | ||
"devDependencies": { | ||
"@types/lodash": "^4.14.157", | ||
"@typescript-eslint/eslint-plugin": "^2.34.0", | ||
"@typescript-eslint/parser": "^2.34.0", | ||
"apollo-datasource-rest": "^0.7.0", | ||
"@graphql-codegen/cli": "^1.17.7", | ||
"@graphql-codegen/typescript": "^1.17.7", | ||
"@types/lodash": "^4.14.159", | ||
"@typescript-eslint/eslint-plugin": "^3.8.0", | ||
"@typescript-eslint/parser": "^3.8.0", | ||
"apollo-datasource-rest": "^0.9.3", | ||
"dataloader": "^2.0.0", | ||
"eslint": "^6.8.0", | ||
"eslint": "^7.6.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"graphql": "^14.6.0", | ||
"graphql": "^15.3.0", | ||
"husky": "^4.2.5", | ||
"lint-staged": "^10.2.11", | ||
"prettier": "^1.19.1", | ||
"typescript": "^3.9.6" | ||
"prettier": "^2.0.5", | ||
"typescript": "^3.9.7" | ||
}, | ||
"dependencies": { | ||
"bottleneck": "^2.15.3" | ||
"bottleneck": "^2.19.5" | ||
}, | ||
"peerDependencies": { | ||
"apollo-datasource-rest": "^0.7.0", | ||
"apollo-datasource-rest": "^0.9.3", | ||
"dataloader": "^2.0.0", | ||
"graphql": "^14.6.0" | ||
"graphql": "^15.3.0" | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
23724
325
0
15
+ Addedapollo-datasource-rest@0.9.7(transitive)
+ Addedgraphql@15.8.0(transitive)
- Removedapollo-datasource-rest@0.7.0(transitive)
- Removedapollo-server-env@2.4.5(transitive)
- Removedgraphql@14.7.0(transitive)
- Removediterall@1.3.0(transitive)
Updatedbottleneck@^2.19.5