Skip to content

Latest commit

 

History

History
136 lines (79 loc) · 2.93 KB

resource.mdx

File metadata and controls

136 lines (79 loc) · 2.93 KB
sidebar_position
4

Resource

import ApiCodeBlock from '../../src/components/ApiCodeBlock'; import Highlight from '../../src/components/Highlight'; import ApiTryIt from '../../src/components/ApiTryIt';

export const endpoints = [ { method: 'GET', uri: '/v1/resources' }, { method: 'GET', uri: '/v1/resources/:version/:type' }, ];

AniAPI provides an endpoint to retrieve general purpose content, most of them utils. The API allows you to retrieve the last available Resources' version and retrieve individual Resource providing a version and a type.

Genres

This is an array of strings containing all the availables genre value across AniAPI.

Changelog

Version Description
1.0 Default values

Localizations

This is an array of objects containing all the possible locale values inside AniAPI.

Attributes


i18n

The locale's ISO 639‑1 language code.


label

The locale's description.


Changelog

Version Description
1.0 Intial support for en and it values

Sources

This is an array of objects containing all the supported sources for episodes in AniAPI.

Attributes


i18n

The source's ISO 639‑1 language code.


name

The source's name inside Episode.


format

The source's video encoding format.


Changelog

Version Description
1.0 Default values

Retrieve last Resources' version

Parameters

No parameters.

Returns

Returns a string which identifies the latest available Resources' version.

:::caution

Older Resources' versions will be available forever, in order to serve also external services that don't follow our updates.

:::

Try it

Retrieve a specific Resource

Type

"GENRES": 0,
"LOCALIZATIONS": 1,
"SOURCES": 2

Returns

Returns a Resource object according to the version and type values provided.

Try it

export const getResourceParams = [ { name: ':version', type: 'text', placeholder: ':version', value: '1.0' }, { name: ':type', type: 'number', placeholder: ':type', value: '0' } ];