mirror of
https://gitlab.com/vyla-entertainment/sdk.git
synced 2026-11-14 06:07:34 -05:00
Added Cinejoy, cleaned up README
This commit is contained in:
30
README.md
30
README.md
@@ -11,36 +11,8 @@ npm install @vyla-entertainment/sdk
|
||||
pnpm install @vyla-entertainment/sdk
|
||||
```
|
||||
|
||||
## Usage
|
||||
Start by creating a VylaSDK element with your TMDB api key.
|
||||
```js
|
||||
import VylaSDK from "@vyla-entertainment/sdk";
|
||||
View our full documentation at https://docs.vyla.cc/sdk
|
||||
|
||||
const sdk = new VylaSDK({
|
||||
tmdbApiKey: ...
|
||||
});
|
||||
```
|
||||
|
||||
You can now use this to access Vyla's content.
|
||||
```js
|
||||
// Get sources
|
||||
// Args: excludeDisabled
|
||||
sdk.getSources(false); -> {key, timeout, label, ...}[]
|
||||
|
||||
// Get subtitles
|
||||
// Args: tmdb id, season?, episode?
|
||||
await sdk.getSubtitles('0000000', null, null); -> {label, file, type, source}[]
|
||||
|
||||
// Probe & test a source
|
||||
// Args: source key
|
||||
await sdk.probeSource('nebula'); -> {ok, ms}
|
||||
|
||||
// Probe & test all sources
|
||||
await sdk.probeAllSources(); -> {'key': {ok, ms}, ...}
|
||||
|
||||
// Get HLS streams
|
||||
// Args: source key, tmdb id, season?, episode?, clientIP?
|
||||
await sdk.getStream('nebula', '0000000', null, null, null) -> {allUrls: {url, quality, label?, server?, type?, skipProxy?, skipVerify?, headers? ...}[]}
|
||||
```
|
||||
|
||||
# [DMCA](https://docs.vyla.cc/misc/dmca)
|
||||
|
||||
Reference in New Issue
Block a user