Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Latest commit

 

History

History
104 lines (62 loc) · 2.35 KB

resource.mdx

File metadata and controls

104 lines (62 loc) · 2.35 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 Initial support for en and it values
1.1.5 Added support for pl value

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

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' } ];