Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👋 Welcome Anix #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pages/list-of-providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Consumet supports a wealth of API providers, which can be categorized into the f

[Animepahe:](https://animepahe.com) Often provides high quality anime streaming links.

[Anix:](https://anix.sh) A semi-new provider with high quality hard sub and dub streaming links.

[BiliBili:](https://bilibili.tv) 🇨🇳 Chinese video streaming platform that provides anime for free.

[Crunchyroll:](https://crunchyroll.com) Where anime meets the west.
Expand Down
4 changes: 4 additions & 0 deletions pages/rest-api/Anime/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"title": "Animepahe",
"theme": { "collapsed": true }
},
"anix": {
"title": "Anix",
"theme": { "collapsed": true }
},
"bilibili": {
"title": "BiliBili",
"theme": { "collapsed": true }
Expand Down
7 changes: 7 additions & 0 deletions pages/rest-api/Anime/anix/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"search": "Search",
"get-recent-episodes": "Get Recent Episodes",
"get-anime-info": "Get Anime Info",
"get-anime-episode-streaming-links": "Get Anime Episode Streaming Links",
"get-anime-episode-available-servers": "Get Anime Episode Available Servers"
}
100 changes: 100 additions & 0 deletions pages/rest-api/Anime/anix/get-anime-episode-available-servers.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
title: Anix | Available Servers
---

import { Tab, Tabs } from "nextra-theme-docs";

# Get Anime Episode Available Servers

Technical details regarding the usage of the get available servers function for the Anix provider can be found below. Example code is provided for both JavaScript and Python, along with a response schema.

## Route Schema (URL)

```
https://api.consumet.org/anime/anix/servers/{id}/{episodeId}?type={type}
```

## Path Parameters

| Parameter | Type | Description | Required? | Default |
| :-------: | :----: | --------------------------------------------------- | :-------: | :-----: |
| id | string | The ID of the anime which the episodeId belongs to. | Yes | |
| episodeId | string | The episodeId. Usually in the format: `ep-1`, etc. | Yes | |

## Query Parameters

| Parameter | Type | Description | Required? | Default |
| :-------: | :---------------------------: | --------------------------------- | :-------: | :-----------: |
| type | Enum: `"sub"` `"dub"` `"raw"` | The type. Either sub, dub or raw. | No | `"sub"` |

## Request Samples

<Tabs items={["JavaScript", "Python"]}>
<Tab>
<>
```js
import axios from "axios";

// Using the example episode ID of 'darling-in-the-franxx' with episode ID 'ep-1'.
const url = "https://api.consumet.org/anime/anix/servers/darling-in-the-franxx/ep-1?type=sub";
const data = async () => {
try {
const { data } = await axios.get(url, { params: {
"type": "sub"
} });
} catch (err) {
throw new Error(err.message);
}
};

console.log(data);
```
</>

</Tab>
<Tab>
<>
```python
import requests

# Using the example episode ID of 'darling-in-the-franxx' with episode ID 'ep-1'.
url = "https://api.consumet.org/anime/anix/servers/darling-in-the-franxx/ep-1?type=sub"
response = requests.get(url, params={
"type": "sub"
})
data = response.json()

print(data)
```
</>

</Tab>
</Tabs>

## Response Schema

<Tabs items={["200 OK", "404 Not Found", "500 Internal Server Error"]}>
<Tab>
**MIME Type:** `application/json`
```json copy=false
[
{
"name": "string",
"url": "string"
}
]
```
</Tab>
<Tab>
**MIME Type:** `application/json`
```json copy=false
"message": {}
```
</Tab>
<Tab>
**MIME Type:** `application/json`
```json copy=false
"message": {}
```
</Tab>
</Tabs>
118 changes: 118 additions & 0 deletions pages/rest-api/Anime/anix/get-anime-episode-streaming-links.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
title: Anix | Streaming Links
---

import { Tab, Tabs } from "nextra-theme-docs";

# Get Anime Episode Streaming Links

Technical details regarding the usage of the get anime streaming links function for the Anix provider can be found below. Example code is provided for both JavaScript and Python, along with a response schema.

## Route Schema (URL)

```
https://api.consumet.org/anime/anix/watch/{id}/{episodeId}?server={serverName}&type={type}
```

## Path Parameters

| Parameter | Type | Description | Required? | Default |
| :-------: | :----: | --------------------------------------------------- | :-------: | :-----: |
| id | string | The ID of the anime which the episodeId belongs to. | Yes | |
| episodeId | string | The episodeId. Usually in the format: `ep-1`, etc. | Yes | |

## Query Parameters

| Parameter | Type | Description | Required? | Default |
| :-------: | :----------------------------------------------------------: | ----------------------------------------------------------------- | :-------: | :-----------: |
| server | Enum: `"vidstream"` `"vidhide"` `"streamwish"` `"mp4upload"` | The server from which to extract streaming links. | No | `"vidstream"` |
| type | Enum: `"sub"` `"dub"` `"raw"` | The type. Either sub, dub or raw. | No | `"sub"` |

## Request Samples

<Tabs items={["JavaScript", "Python"]}>
<Tab>
<>
```js
import axios from "axios";

/*
Using the example episode ID of 'darling-in-the-franxx'
and the example episode ID `ep-1`,
explicitly defining default server for demostrative purposes.
*/
const url = "https://api.consumet.org/anime/anix/watch/darling-in-the-franxx/ep-1?server=vidstream&type=sub"
const data = async () => {
try {
const { data } = await axios.get(url, { params: {
"server": "vidstream",
"type": "sub"
} });
return data;
} catch (err) {
throw new Error(err.message);
}
};

console.log(data);
```
</>

</Tab>
<Tab>
<>
```python
import requests

"""
Using the example episode ID of 'darling-in-the-franxx'
and the example episode ID `ep-1`,
explicitly defining default server for demostrative purposes.
"""
url = "https://api.consumet.org/anime/anix/watch/darling-in-the-franxx/ep-1?server=vidstream&type=sub"
response = requests.get(url, params={
"server": "vidstream",
"type": "sub"
})
data = response.json()

print(data)
```
</>

</Tab>
</Tabs>

## Response Schema

<Tabs items={["200 OK", "404 Not Found", "500 Internal Server Error"]}>
<Tab>
**MIME Type:** `application/json`
```json copy=false
{
"headers": {
"Referer": "string"
},
"sources": [
{
"url": "string",
"quality": "string",
"isM3U8": true
}
]
}
```
</Tab>
<Tab>
**MIME Type:** `application/json`
```json copy=false
"message": {}
```
</Tab>
<Tab>
**MIME Type:** `application/json`
```json copy=false
"message": {}
```
</Tab>
</Tabs>
106 changes: 106 additions & 0 deletions pages/rest-api/Anime/anix/get-anime-info.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
title: Anix | Anime Info
---

import { Tab, Tabs } from "nextra-theme-docs";

# Get Anime Info

Technical details regarding the usage of the get anime info function for the Anix provider can be found below. Example code is provided for both JavaScript and Python, along with a response schema.

## Route Schema (URL)

```
https://api.consumet.org/anime/anix/info/{id}
```

## Path Parameters

| Parameter | Type | Description | Required? | Default |
| :-------: | :----: | -------------------------------------------------------------------------------------------------- | :-------: | :-----: |
| id | string | The Anix ID of the anime; i.e. provided by searching for said anime and selecting the correct one. | Yes | |

## Request Samples

<Tabs items={["JavaScript", "Python"]}>
<Tab>
<>
```js
import axios from "axios";

// Using the example ID of "darling-in-the-franxx".
const url = "https://api.consumet.org/anime/anix/info/darling-in-the-franxx";
const data = async () => {
try {
const { data } = await axios.get(url);
return data;
} catch (err) {
throw new Error(err.message);
}
};

console.log(data);
```
</>

</Tab>
<Tab>
<>
```python
import requests

# Using the example ID of "darling-in-the-franxx".
url = "https://api.consumet.org/anime/zoro/anix/info/darling-in-the-franxx"
response = requests.get(url)
data = response.json()

print(data)
```
</>

</Tab>
</Tabs>

## Response Schema

<Tabs items={["200 OK", "404 Not Found", "500 Internal Server Error"]}>
<Tab>
**MIME Type:** `application/json`
```json copy=false
{
"id": "string",
"title": "string",
"englishTitle": "string",
"url": "string",
"image": "string",
"description": "string",
"episodes": [
{
"id": "string",
"number": 0,
"url": "string"
}
],
"countryOfOrigin": "string",
"genres": [
"string"
],
"totalEpisodes": 0, // or null
"status": "string",
"type": "string"
}
```
</Tab>
<Tab>
**MIME Type:** `application/json`
```json copy=false
"message": {}
```
</Tab>
<Tab>
**MIME Type:** `application/json`
```json copy=false
"message": {}
```
</Tab>
</Tabs>
Loading