General changes to docs

This commit is contained in:
Zechariah Tan 2022-03-29 16:45:39 +08:00
parent 76312f8eb4
commit 58e70e6c08
2 changed files with 4 additions and 13 deletions

View File

@ -4,6 +4,9 @@ actions:
- text: Get Started
link: /docs/getting-started.html
type: primary
- text: NPM Registry
link: https://npmjs.org/package/ytmusic-api
type: secondary
features:
- title: YouTube Music Scraper
details: YTMusic API scrapes https://music.youtube.com for results and formats it for you

View File

@ -30,9 +30,7 @@ pnpm i ytmusic-api
</CodeGroupItem>
</CodeGroup>
## Usage
Import YTMusic from the npm package
## Importing
```ts
// ES6 Import
@ -41,13 +39,3 @@ import YTMusic from "ytmusic-api"
// Node Require
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
})
```