mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-06 04:32:40 +00:00
Spotify support added
This commit is contained in:
24
docs/Spotify/README.md
Normal file
24
docs/Spotify/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Spotify
|
||||
|
||||
## Validate
|
||||
### sp_validate(url : `string`)
|
||||
*This checks that given url is spotify url or not.*
|
||||
|
||||
**Returns :** `track` | `album` | `playlist` | `false`
|
||||
```js
|
||||
let check = sp_validate(url)
|
||||
|
||||
if(!check) // Invalid Spotify URL
|
||||
|
||||
if(check === 'track') // Spotify Track URL
|
||||
```
|
||||
|
||||
## Main
|
||||
### spotify(url : `string`)
|
||||
*This returns data from a track | playlist | album url.*
|
||||
|
||||
```js
|
||||
let data = spotify(url) //Gets the data
|
||||
|
||||
console.log(data.type) // Console logs the type of data that you got.
|
||||
```
|
||||
Reference in New Issue
Block a user