mirror of
https://gitlab.com/vyla-entertainment/documentation.git
synced 2026-11-14 22:47:26 -05:00
65 lines
2.1 KiB
Markdown
65 lines
2.1 KiB
Markdown
# 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>
|
|
|
|
<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.
|
|
|
|
---
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
npm install @vyla-entertainment/sdk
|
|
```
|
|
|
|
**Requirements:**
|
|
- Node.js v20+ (ES Modules)
|
|
- Optional: TMDB API key for title metadata
|
|
|
|
---
|
|
|
|
## Capabilities
|
|
|
|
- **Streaming**: Resolve direct MP4 and adaptive HLS (`.m3u8`) links with `getStream()`, `getSources()`, and `probeSource()`.
|
|
- **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()`.
|
|
|
|
---
|
|
|
|
## Quick Example
|
|
|
|
```javascript
|
|
import VylaSDK from '@vyla-entertainment/sdk';
|
|
|
|
const sdk = new VylaSDK({
|
|
tmdbApiKey: process.env.TMDB_API_KEY
|
|
});
|
|
|
|
const sources = sdk.getSources(true);
|
|
console.log(`Active sources: ${sources.length}`);
|
|
|
|
try {
|
|
const stream = await sdk.getStream('vidlink', 155);
|
|
console.log(stream.url, stream.type);
|
|
} catch (err) {
|
|
console.error(err.message);
|
|
}
|
|
|
|
const subtitles = await sdk.getSubtitles(155);
|
|
console.log(`Subtitles found: ${subtitles.length}`);
|
|
```
|
|
|
|
---
|
|
|
|
## Documentation Sections
|
|
|
|
- **[Quickstart](/sdk/vyla-sdk/quickstart)** — Step-by-step tutorial for movies, TV episodes, and error handling.
|
|
- **[API Reference](/sdk/vyla-sdk/reference)** — Complete methods, arguments, return shapes, and TypeScript types.
|
|
- **[Manga Module](/sdk/vyla-sdk/manga)** — Manga search, chapter indexes, and page loading.
|
|
- **[Contributing Scrapers](/sdk/vyla-sdk/contributing)** — How to write and test new source scrapers.
|