mirror of
https://gitlab.com/vyla-entertainment/documentation.git
synced 2026-11-20 01:17:23 -05:00
made sdk docs up to date
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# Vyla SDK (`@vyla-entertainment/sdk`)
|
||||
|
||||
<p class="page-description">The official Node.js scraping and resolver library for movies, television series, subtitles, downloads, and manga.</p>
|
||||
<p class="page-description">The official Node.js scraping and resolver library for movies, television series, embed configurations, subtitles, downloads, and manga.</p>
|
||||
|
||||
<img class="vyla-banner" src="/src/assets/images/devices.webp" alt="Vyla SDK developer tools" loading="lazy" decoding="async" fetchpriority="low" />
|
||||
|
||||
## Overview
|
||||
|
||||
`@vyla-entertainment/sdk` is the core media resolver engine for Vyla. It runs in Node.js (ES Modules) to query 60+ streaming scrapers, extract subtitles, find media downloads, and browse manga archives.
|
||||
`@vyla-entertainment/sdk` is the core media resolver engine for Vyla. It runs in Node.js (ES Modules) to query 65+ streaming scrapers, expose dedicated vs. aggregator source lists, provide pre-configured embed player URL templates, extract subtitles, find media downloads, and browse manga archives.
|
||||
|
||||
---
|
||||
|
||||
@@ -24,10 +24,12 @@ npm install @vyla-entertainment/sdk
|
||||
|
||||
## Capabilities
|
||||
|
||||
- **Streaming**: Resolve direct MP4 and adaptive HLS (`.m3u8`) links with `getStream()`, `getSources()`, and `probeSource()`.
|
||||
- **Streaming**: Resolve direct MP4, MKV, DASH (`.mpd`), and adaptive HLS (`.m3u8`) links with `getStream()`, `getSources()`, and `probeSource()`.
|
||||
- **Source Categorization**: Separate single-host providers (`DEDICATED_SOURCES`) from multi-provider scrapers (`AGGREGATOR_SOURCES`) via `config.js`.
|
||||
- **Embed Configuration**: Pre-mapped movie and TV embed URL templates with `ads: false` tagging in `embed_config.js` (`EMBEDS` / `EMBED_MAP`).
|
||||
- **Subtitles**: Fetch `.vtt` and `.srt` subtitle tracks with `getSubtitles()`.
|
||||
- **Downloads**: Find direct video files with file size metadata using `getDownloads()`.
|
||||
- **Manga**: Search titles, list chapters, and fetch page images with `searchManga()` and `getMangaChapter()`.
|
||||
- **Downloads**: Find direct `.mp4` download links using `getDownloads()`.
|
||||
- **Manga**: Search titles, list chapters, and fetch page images with `searchManga()`, `getManga()`, and `getMangaChapter()`.
|
||||
|
||||
---
|
||||
|
||||
@@ -35,21 +37,26 @@ npm install @vyla-entertainment/sdk
|
||||
|
||||
```javascript
|
||||
import VylaSDK from '@vyla-entertainment/sdk';
|
||||
import EMBEDS from '@vyla-entertainment/sdk/src/embed_config.js';
|
||||
|
||||
const sdk = new VylaSDK({
|
||||
tmdbApiKey: process.env.TMDB_API_KEY
|
||||
});
|
||||
|
||||
const sources = sdk.getSources(true);
|
||||
console.log(`Active sources: ${sources.length}`);
|
||||
const dedicated = sources.filter(s => s.dedicated);
|
||||
console.log(`Active sources: ${sources.length} (${dedicated.length} dedicated)`);
|
||||
|
||||
try {
|
||||
const stream = await sdk.getStream('vidlink', 155);
|
||||
console.log(stream.url, stream.type);
|
||||
console.log(stream.url, stream.allUrls);
|
||||
} catch (err) {
|
||||
console.error(err.message);
|
||||
}
|
||||
|
||||
const adFreeEmbeds = EMBEDS.filter(e => e.ads === false);
|
||||
console.log(`Ad-free embeds: ${adFreeEmbeds.length}`);
|
||||
|
||||
const subtitles = await sdk.getSubtitles(155);
|
||||
console.log(`Subtitles found: ${subtitles.length}`);
|
||||
```
|
||||
@@ -58,7 +65,7 @@ console.log(`Subtitles found: ${subtitles.length}`);
|
||||
|
||||
## Documentation Sections
|
||||
|
||||
- **[Quickstart](quickstart.md)** — Step-by-step tutorial for movies, TV episodes, and error handling.
|
||||
- **[API Reference](reference.md)** — Complete methods, arguments, return shapes, and TypeScript types.
|
||||
- **[Quickstart](quickstart.md)** — Step-by-step tutorial for movies, TV episodes, embeds, and error handling.
|
||||
- **[API Reference](reference.md)** — Complete methods, config exports, return shapes, and TypeScript types.
|
||||
- **[Manga Module](manga.md)** — Manga search, chapter indexes, and page loading.
|
||||
- **[Contributing Scrapers](contributing.md)** — How to write and test new source scrapers.
|
||||
- **[Contributing Scrapers](contributing.md)** — How to write and register new source and embed scrapers.
|
||||
Reference in New Issue
Block a user