Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
fix: update README remove dosth() and display()
Browse files Browse the repository at this point in the history
closes #118
  • Loading branch information
TimeForANinja authored Aug 4, 2021
1 parent dcc2686 commit 495a7e5
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ You can contact us for support on our [chat server](https://discord.gg/V3vSCs7)
# Usage

```js
var ytpl = require('ytpl');
const ytpl = require('ytpl');

const playlist = await ytpl('UU_aEa8K-EOJ3D6gOs7HcyNg');
dosth(playlist);
```


Expand Down Expand Up @@ -49,14 +48,16 @@ The previous request had to be done using `pages` limitation.

#### Usage
```js
var ytpl = require('ytpl');

const playlist = await ytpl('UU_aEa8K-EOJ3D6gOs7HcyNg', { pages: 1 });
display(playlist.items);
const r2 = ytpl.continueReq(playlist.continuation);
display(r2.items);
const r3 = ytpl.continueReq(r2.continuation);
display(r3.items);
const ytpl = require('ytpl');

const firstResultBatch = await ytpl('UU_aEa8K-EOJ3D6gOs7HcyNg', { pages: 1 });
const secondResultBatch = ytpl.continueReq(firstResultBatch.continuation);
const thirdResultBatch = ytpl.continueReq(secondResultBatch.continuation);

// You can now use the .items property of all result batches e.g.:
console.log(firstResultBatch.items);
console.log(secondResultBatch.items);
console.log(thirdResultBatch.items);
```

* returns a Promise resolving into `{ continuation, items }`
Expand Down

0 comments on commit 495a7e5

Please sign in to comment.