Update README.md

This commit is contained in:
Killer069 2021-09-09 16:19:15 +05:30 committed by GitHub
parent 5425e6a788
commit 03f1d9a2d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,7 @@ let data = await spotify(playlist_url)
console.log(data.page(1)) //This will give first 100 tracks in playlist. console.log(data.page(1)) //This will give first 100 tracks in playlist.
``` ```
- total_pages `property` - total_pages `property`
*This give total pages that have been fetched so far.* *This give total pages that have been fetched so far.*
```js ```js
let data = await spotify(playlist_url) let data = await spotify(playlist_url)
@ -89,12 +90,13 @@ console.log(data.page(1)) //This will give first 100 tracks in playlist.
} }
``` ```
- total_tracks `property` - total_tracks `property`
*This give total videos that have been fetched so far.*
```js *This give total videos that have been fetched so far.*
let data = await spotify(playlist_url) ```js
let data = await spotify(playlist_url)
console.log(data.total_tracks) // This will tell no. of videos that have been fetched so far. console.log(data.total_tracks) // This will tell no. of videos that have been fetched so far.
``` ```
##### type `property` ##### type `property`
*This will always return as "playlist" for this class.* *This will always return as "playlist" for this class.*
@ -133,23 +135,25 @@ let data = await spotify(playlist_url)
console.log(data.page(1)) //This will give first 100 tracks in playlist. console.log(data.page(1)) //This will give first 100 tracks in playlist.
``` ```
- total_pages `property` - total_pages `property`
*This give total pages that have been fetched so far.* *This give total pages that have been fetched so far.*
```js ```js
let data = await spotify(playlist_url) let data = await spotify(playlist_url)
console.log(data.total_pages) console.log(data.total_pages) // This will tell no. of pages that have been fetched so far.
for(let i = 1; i <= data.total_pages; i++){ for(let i = 1; i <= data.total_pages; i++){
queue.push(data.page(i)) //This will push all tracks to your queue system queue.push(data.page(i)) //This will push all tracks to your queue system
} }
``` ```
- total_tracks `property` - total_tracks `property`
*This give total videos that have been fetched so far.*
```js *This give total videos that have been fetched so far.*
let data = await spotify(playlist_url) ```js
let data = await spotify(playlist_url)
console.log(data.total_tracks) console.log(data.total_tracks) // This will tell no. of videos that have been fetched so far.
``` ```
##### type `property` ##### type `property`
*This will always return as "album" for this class.* *This will always return as "album" for this class.*