mirror of
https://github.com/d-fi/d-fi-core.git
synced 2025-07-22 21:24:58 +02:00
add parse docs
This commit is contained in:
parent
11900bda8b
commit
af63785642
17
docs/parse.md
Normal file
17
docs/parse.md
Normal file
@ -0,0 +1,17 @@
|
||||
## Parse
|
||||
|
||||
Parse Deezer, Spotify and Tidal URLs to downloadable data.
|
||||
|
||||
## Usage
|
||||
|
||||
`parseInfo` parses information as json data. Throws `Error`, make sure to catch error on your side.
|
||||
|
||||
```ts
|
||||
import {parseInfo} from 'd-fi-core';
|
||||
|
||||
// Get link information
|
||||
const info = await parseInfo(url);
|
||||
console.log(info);
|
||||
```
|
||||
|
||||
Please take a look at [`src/converter/parse.ts`](https://github.com/d-fi/d-fi-core/blob/master/src/converter/parse.ts) and [`__tests__/converter/parse.ts`](https://github.com/d-fi/d-fi-core/blob/master/__tests__/converter/parse.ts) to understand more.
|
Loading…
x
Reference in New Issue
Block a user