mirror of
https://gitlab.com/vyla-entertainment/documentation.git
synced 2026-11-14 22:47:26 -05:00
137 lines
3.6 KiB
Markdown
137 lines
3.6 KiB
Markdown
# Manga Integration
|
||
|
||
<p class="page-description">Search manga catalogs, retrieve chapter listings, and resolve reader-ready page images directly with Vyla SDK.</p>
|
||
|
||
Vyla SDK provides built-in manga support to discover titles, fetch full chapter indices, and resolve high-resolution page image URLs with asset dimensions and aspect ratios.
|
||
|
||
---
|
||
|
||
## Manga Methods
|
||
|
||
### `searchManga(query, page?, perPage?)`
|
||
|
||
Searches the manga catalog for titles matching a query string.
|
||
|
||
```javascript
|
||
const searchResults = await sdk.searchManga("Steel Ball Run", 1, 10);
|
||
console.log(searchResults.results[0]);
|
||
```
|
||
|
||
#### Parameters
|
||
|
||
| Parameter | Type | Required | Default | Description |
|
||
| --- | --- | --- | --- | --- |
|
||
| `query` | `string` | **Yes** | - | Title, author, or acronym search query. |
|
||
| `page` | `number` | **No** | `1` | Pagination page number. |
|
||
| `perPage` | `number` | **No** | `12` | Results per page. |
|
||
|
||
#### Response Format
|
||
|
||
```json
|
||
{
|
||
"page": 1,
|
||
"total": 2,
|
||
"results": [
|
||
{
|
||
"id": "aKXN8",
|
||
"title": "JoJo's Bizarre Adventure: Part 7–Steel Ball Run",
|
||
"englishTitle": null,
|
||
"authors": ["ARAKI Hirohiko"],
|
||
"type": "Manga",
|
||
"medium": "Comic",
|
||
"status": "Completed",
|
||
"year": 2004,
|
||
"rating": 9.03681428571429,
|
||
"popularity": "1.6M",
|
||
"poster": "https://cdn.atsu.moe/static/posters/nR3hGYk9GmOqgD52.jpg",
|
||
"posterSmall": "https://cdn.atsu.moe/static/posters/nR3hGYk9GmOqgD52-small.avif",
|
||
"posterMedium": "https://cdn.atsu.moe/static/posters/nR3hGYk9GmOqgD52-medium.avif"
|
||
}
|
||
]
|
||
}
|
||
```
|
||
|
||
---
|
||
|
||
### `getManga(id)`
|
||
|
||
Retrieves comprehensive details for a manga entry, including synopsis, genres, authors, and full chapter list.
|
||
|
||
```javascript
|
||
const manga = await sdk.getManga("aKXN8");
|
||
console.log(manga.title, manga.totalChapters);
|
||
```
|
||
|
||
#### Parameters
|
||
|
||
| Parameter | Type | Required | Default | Description |
|
||
| --- | --- | --- | --- | --- |
|
||
| `id` | `string` | **Yes** | - | Unique manga identifier. |
|
||
|
||
#### Response Format
|
||
|
||
```json
|
||
{
|
||
"id": "aKXN8",
|
||
"title": "JoJo's Bizarre Adventure: Part 7–Steel Ball Run",
|
||
"englishTitle": null,
|
||
"synopsis": "Riders from around the world gather in the Wild West for the race of the century...",
|
||
"status": "Completed",
|
||
"type": "Manga",
|
||
"medium": "Comic",
|
||
"rating": 9.03681428571429,
|
||
"views": "330.5K",
|
||
"authors": ["Hirohiko Araki"],
|
||
"genres": ["Action", "Adventure", "Drama", "Historical", "Supernatural"],
|
||
"tags": ["19th Century", "Horses", "Seinen"],
|
||
"poster": "https://cdn.atsu.moe/static/posters/nR3hGYk9GmOqgD52.jpg",
|
||
"totalChapters": 95,
|
||
"chapters": [
|
||
{
|
||
"id": "8KyKadCx",
|
||
"number": 1,
|
||
"title": "# 1",
|
||
"pageCount": 48,
|
||
"createdAt": "2026-04-18T00:00:00.000Z"
|
||
}
|
||
]
|
||
}
|
||
```
|
||
|
||
---
|
||
|
||
### `getMangaChapter(mangaId, chapterId)`
|
||
|
||
Resolves all page images for a selected chapter, including pixel dimensions and aspect ratios for smooth responsive rendering.
|
||
|
||
```javascript
|
||
const chapter = await sdk.getMangaChapter("aKXN8", "8KyKadCx");
|
||
console.log(chapter.pages[0].url);
|
||
```
|
||
|
||
#### Parameters
|
||
|
||
| Parameter | Type | Required | Default | Description |
|
||
| --- | --- | --- | --- | --- |
|
||
| `mangaId` | `string` | **Yes** | - | Unique manga identifier. |
|
||
| `chapterId` | `string` | **Yes** | - | Unique chapter identifier. |
|
||
|
||
#### Response Format
|
||
|
||
```json
|
||
{
|
||
"id": "8KyKadCx",
|
||
"number": 1,
|
||
"title": "# 1",
|
||
"scanlatorId": "cmo3e2t970003ktp80ip0n5hb",
|
||
"pages": [
|
||
{
|
||
"number": 0,
|
||
"url": "https://cdn.atsu.moe/static/pages/aKXN8/8KyKadCx/0.webp",
|
||
"width": 1200,
|
||
"height": 1722,
|
||
"aspectRatio": 0.6968641114982579
|
||
}
|
||
]
|
||
}
|
||
``` |