General changes to docs
This commit is contained in:
parent
76312f8eb4
commit
58e70e6c08
|
|
@ -4,6 +4,9 @@ actions:
|
||||||
- text: Get Started
|
- text: Get Started
|
||||||
link: /docs/getting-started.html
|
link: /docs/getting-started.html
|
||||||
type: primary
|
type: primary
|
||||||
|
- text: NPM Registry
|
||||||
|
link: https://npmjs.org/package/ytmusic-api
|
||||||
|
type: secondary
|
||||||
features:
|
features:
|
||||||
- title: YouTube Music Scraper
|
- title: YouTube Music Scraper
|
||||||
details: YTMusic API scrapes https://music.youtube.com for results and formats it for you
|
details: YTMusic API scrapes https://music.youtube.com for results and formats it for you
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,7 @@ pnpm i ytmusic-api
|
||||||
</CodeGroupItem>
|
</CodeGroupItem>
|
||||||
</CodeGroup>
|
</CodeGroup>
|
||||||
|
|
||||||
## Usage
|
## Importing
|
||||||
|
|
||||||
Import YTMusic from the npm package
|
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
// ES6 Import
|
// ES6 Import
|
||||||
|
|
@ -41,13 +39,3 @@ import YTMusic from "ytmusic-api"
|
||||||
// Node Require
|
// Node Require
|
||||||
const YTMusic = require("ytmusic-api")
|
const YTMusic = require("ytmusic-api")
|
||||||
```
|
```
|
||||||
|
|
||||||
Create an instance of the class `YTMusic`.
|
|
||||||
Then, call the `initialize()` to initialize the API before using the API anywhere
|
|
||||||
|
|
||||||
```ts
|
|
||||||
const ytmusic = new YTMusic()
|
|
||||||
ytmusic.initialize().then(() => {
|
|
||||||
// Use API here
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue