mirror of
https://codeberg.org/lucida/lucida.git
synced 2026-11-12 22:57:22 -05:00
add tests
This commit is contained in:
@@ -53,7 +53,20 @@ interface APIMethod {
|
||||
|
||||
export default class Deezer implements StreamerWithLogin {
|
||||
hostnames = ['deezer.com', 'www.deezer.com', 'deezer.page.link']
|
||||
|
||||
testData = {
|
||||
'https://www.deezer.com/us/artist/1194083': {
|
||||
type: 'artist',
|
||||
title: 'Tyler, The Creator'
|
||||
},
|
||||
'https://www.deezer.com/us/track/559711712': {
|
||||
type: 'track',
|
||||
title: 'Potato Salad'
|
||||
},
|
||||
'https://www.deezer.com/us/album/97140952': {
|
||||
type: 'album',
|
||||
title: 'IGOR'
|
||||
}
|
||||
} as const
|
||||
headers: { [header: string]: string } = {
|
||||
Accept: '*/*',
|
||||
'User-Agent':
|
||||
|
||||
@@ -52,6 +52,16 @@ interface LoginResponse {
|
||||
|
||||
export default class Qobuz implements StreamerWithLogin {
|
||||
hostnames = ['play.qobuz.com', 'open.qobuz.com', 'www.qobuz.com', 'qobuz.com']
|
||||
testData = {
|
||||
'https://www.qobuz.com/us-en/interpreter/tyler-the-creator/589771': {
|
||||
title: 'Tyler, The Creator',
|
||||
type: 'artist'
|
||||
},
|
||||
'https://www.qobuz.com/us-en/album/igor-tyler-the-creator/qtz65tw2of0ha': {
|
||||
title: 'IGOR',
|
||||
type: 'album'
|
||||
}
|
||||
} as const
|
||||
token?: string
|
||||
appSecret: string
|
||||
appId: string
|
||||
|
||||
@@ -45,6 +45,16 @@ interface SoundcloudTranscoding {
|
||||
|
||||
export default class Soundcloud implements Streamer {
|
||||
hostnames = ['soundcloud.com', 'm.soundcloud.com', 'www.soundcloud.com']
|
||||
testData = {
|
||||
'https://soundcloud.com/saoirsedream/charlikartlanparty': {
|
||||
type: 'track',
|
||||
title: 'Charli Kart LAN Party'
|
||||
},
|
||||
'https://soundcloud.com/saoirsedream/sets/star': {
|
||||
type: 'album',
|
||||
title: 'star★☆'
|
||||
}
|
||||
} as const
|
||||
oauthToken?: string
|
||||
client?: ScClient
|
||||
constructor(options: SoundcloudOptions) {
|
||||
|
||||
@@ -11,6 +11,21 @@ import {
|
||||
class Spotify implements StreamerWithLogin {
|
||||
client: Librespot
|
||||
hostnames = ['open.spotify.com']
|
||||
testData = {
|
||||
'https://open.spotify.com/track/1jzIJcHCXneHw7ojC6LXiF': {
|
||||
type: 'track',
|
||||
title: 'Potato Salad'
|
||||
},
|
||||
'https://open.spotify.com/album/5zi7WsKlIiUXv09tbGLKsE': {
|
||||
type: 'album',
|
||||
title: 'IGOR'
|
||||
},
|
||||
'https://open.spotify.com/artist/4V8LLVI7PbaPR0K2TGSxFF': {
|
||||
type: 'artist',
|
||||
title: 'Tyler, The Creator'
|
||||
}
|
||||
} as const
|
||||
|
||||
constructor(options: LibrespotOptions) {
|
||||
this.client = new Librespot(options)
|
||||
}
|
||||
|
||||
@@ -70,6 +70,20 @@ export default class Tidal implements Streamer {
|
||||
countryCode: string
|
||||
userId: number | undefined
|
||||
hostnames = ['tidal.com', 'www.tidal.com', 'listen.tidal.com']
|
||||
testData = {
|
||||
'https://tidal.com/browse/artist/3908662': {
|
||||
type: 'artist',
|
||||
title: 'Tyler, The Creator'
|
||||
},
|
||||
'https://tidal.com/browse/album/109485854': {
|
||||
type: 'album',
|
||||
title: 'IGOR'
|
||||
},
|
||||
'https://tidal.com/browse/track/95691774': {
|
||||
type: 'track',
|
||||
title: 'Potato Salad'
|
||||
}
|
||||
} as const
|
||||
failedAuth = false
|
||||
constructor(options: TidalOptions) {
|
||||
this.tvToken = options.tvToken
|
||||
|
||||
Reference in New Issue
Block a user