add library

This commit is contained in:
Kiera Affarantia 2024-03-08 15:50:08 +07:00
parent 90ca909521
commit 33b9c31abf
18 changed files with 302 additions and 4 deletions

23
README.md Normal file
View File

@ -0,0 +1,23 @@
# Nextra Docs Template
This is a template for creating documentation with [Nextra](https://nextra.site).
[**Live Demo →**](https://nextra-docs-template.vercel.app)
[![](.github/screenshot.png)](https://nextra-docs-template.vercel.app)
## Quick Start
Click the button to clone this repository and deploy it on Vercel:
[![](https://vercel.com/button)](https://vercel.com/new/clone?s=https%3A%2F%2Fgithub.com%2Fshuding%2Fnextra-docs-template&showOptionalTeamCreation=false)
## Local Development
First, run `pnpm i` to install the dependencies.
Then, run `pnpm dev` to start the development server and visit localhost:3000.
## License
This project is licensed under the MIT License.

View File

@ -0,0 +1,6 @@
.counter {
border: 1px solid #ccc;
border-radius: 5px;
padding: 2px 6px;
margin: 12px 0 0;
}

24
components/counters.tsx Normal file
View File

@ -0,0 +1,24 @@
// Example from https://beta.reactjs.org/learn
import { useState } from 'react'
import styles from './counters.module.css'
function MyButton() {
const [count, setCount] = useState(0)
function handleClick() {
setCount(count + 1)
}
return (
<div>
<button onClick={handleClick} className={styles.counter}>
Clicked {count} times
</button>
</div>
)
}
export default function MyApp() {
return <MyButton />
}

5
next-env.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

34
package-lock.json generated
View File

@ -7,13 +7,17 @@
"": {
"name": "nganime-docs",
"version": "1.0.0",
"license": "ISC",
"license": "MIT",
"dependencies": {
"next": "^14.1.3",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "20.11.25",
"typescript": "5.4.2"
}
},
"node_modules/@babel/runtime": {
@ -493,6 +497,15 @@
"integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==",
"license": "MIT"
},
"node_modules/@types/node": {
"version": "20.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz",
"integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/@types/prop-types": {
"version": "15.7.11",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz",
@ -4579,6 +4592,25 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/typescript": {
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
},
"node_modules/unified": {
"version": "10.1.2",
"resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz",

View File

@ -8,13 +8,22 @@
"build": "next build",
"start": "next start"
},
"repository": {
"type": "git",
"url": "https://git.serenetia.com/AmaneSerenetia/Nganime.git"
},
"homepage": "https://git.serenetia.com/AmaneSerenetia/Nganime-Docs/#readme",
"author": "Nganime",
"license": "ISC",
"license": "MIT",
"dependencies": {
"next": "^14.1.3",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "20.11.25",
"typescript": "5.4.2"
}
}

20
pages/_meta.json Normal file
View File

@ -0,0 +1,20 @@
{
"index": "Introduction",
"start": "Get Started",
"providers": "Providers",
"rest-api": "API",
"library": "Node Library",
"license": {
"title": "License 📜",
"type": "page",
"href": "https://raw.githubusercontent.com/consumet/consumet.ts/master/LICENSE",
"newWindow": true
},
"contact": {
"title": "Contact ✉️",
"type": "page",
"href": "mailto:copyright@nganime.my.id",
"newWindow": true
},
"faq": "FAQ"
}

23
pages/faq.mdx Normal file
View File

@ -0,0 +1,23 @@
## FREQUENTLY ASKED QUESTIONS
<br />
### How do I fix a source error (503)?
<details>
<summary>Add the relevant ```User-Agent``` header.</summary>
Add the following header to your video player request:
```
{'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36'}
```
</details>
### CORS causing trouble?
<details>
<summary>Use the Nganime CORS proxy.</summary>
Append the source link for the media to `https://cors.nganime.my.id/`, like so:
```
https://cors.nganime.my.id/<SOURCE_LINK>
```
</details>

View File

@ -1,3 +1,9 @@
# Introduction
Welcome to the documentation for Nganime API - a collection of high-level, search engine APIs that provide accurate information about numerous entertainment mediums (such as anime, manga, light novels, movies etc.), along with links to stream these contents from publicly-available online sources.
Welcome to the documentation for Consumet - a collection of high-level, search engine APIs that provide accurate information about numerous entertainment mediums (such as anime, manga, light novels, movies etc.), along with links to stream these contents from publicly-available online sources. This website intends to inform you about how to use both the API ([https://api.consumet.org](https://api.consumet.org)) and the TypeScript library ([@consumet/extensions](https://github.com/consumet/consumet.ts)).
## About
### What is Nganime?
Nganime is a platform where you can watch and stream anime or read manga for free, without any ads or VPNs, You will find a vast collection of anime and manga titles from different genres, including action, adventure, comedy, romance, and more.
### What this documentation for?
The purpose of this documentation is to let other know how to use the Nganime API.

3
pages/library/_meta.json Normal file
View File

@ -0,0 +1,3 @@
{
"start": "Get Started"
}

2
pages/library/start.mdx Normal file
View File

@ -0,0 +1,2 @@
# Getting Started
Coming soon! (maybe)

71
pages/providers.mdx Normal file
View File

@ -0,0 +1,71 @@
# Providers
Nganime supports a lot of API providers, which can be categorized into the following groups:
## Anime
[9Anime:](https://aniwave.to) This provider tends to be more unreliable than most, so please use with care.
[AnimeFox:](https://animefox.tv) Looks & functions similarly to Zoro.
[Animepahe:](https://animepahe.ru) Often provides high quality anime streaming links.
[BiliBili:](https://www.bilibili.tv) 🇨🇳 Chinese video streaming platform that provides anime for free.
[Crunchyroll:](https://www.crunchyroll.com) Where anime meets the west.
[Enime:](https://api.enime.moe) An API that caches anime episodes & their publicly-available, third-party sources.
[GogoAnime:](https://gogoanime3.co) The default provider for anime - one of the more well-known/established providers.
[Zoro:](https://hianime.to) A well-known site named after Roronoa Zoro from ONE PIECE.
## Books
[Libgen:](https://libgen.is) Currently the only provider for books - a vast library of e-books available for download.
## Comics
[GetComics:](https://getcomics.info) Currently the only provider for comics - read & download comics for free online!
## Light Novels
[Read Light Novels:](https://animedaily.net) Currently the only provider for light novels - read your favourite light novel series online here.
## Manga
[Mangadex:](https://mangadex.org) Hosts 10,000s of chapters of scanlated manga.
[Mangahere:](https://mangahere.cc) English-translated manga for free online.
[Mangakakalot:](https://mangakakalot.com) Read manga online in English.
[Mangapark (v2):](https://v2.mangapark.net) The second version of Mangapark - a large collation of manga available for free, in English.
[Mangapill:](https://mangapill.com) Your daily dose of manga!
[Mangareader:](https://mangareader.to) Zoro refers to this site on its information pages. A great provider for manga images.
[Mangasee123:](https://mangasee123.com) The default provider for manga - a large library of over 6,000 manga available in English.
## Meta
[Anilist for Anime:](https://anilist.co) A metadata provider used to aggregate anime data from Anilist, and to accurately map these anime to publicly-available streaming links.
[Anilist for Manga:](https://anilist.co) A metadata provider used to aggregate manga data from Anilist, and to accurately map these manga to publicly-available streaming links.
[MyAnimeList:](https://myanimelist.net) A metadata provider used to aggregate media (primarily anime & manga) data from MyAnimeList, and to accurately map these mediae to publicly-available streaming links.
[The Movie Database (TMDB):](https://www.themoviedb.org) A metadata provider that returns data about current, past & upcoming TV shows/movies, and accurately map these media to publicly-available streaming links.
## Movies
[Dramacool:](https://dramacool.com.pa) Provides mainly K-Dramas & other similar content.
[FlixHQ:](https://flixhq.to) Provides 1,000s of high-quality movies & series in high-definition online for free.
[ViewAsian:](https://viewasian.co) Provides mainly K-Dramas & other media intended primarily for the Asian market.
## News
[AnimeNewsNetwork:](https://animenewsnetwork.com) Serves 10s of stories regarding the latest Japanese media news per day: "The internet's most trusted anime news source."

19
pages/rest-api/_meta.json Normal file
View File

@ -0,0 +1,19 @@
{
"start": "Get Started",
"Anime": { "title": "Anime", "theme": { "collapsed": true } },
"Books": { "title": "Books", "theme": { "collapsed": true } },
"Comics": { "title": "Comics", "theme": { "collapsed": true } },
"Meta": { "title": "Meta", "theme": { "collapsed": true } },
"Light-Novels": { "title": "Light Novels", "theme": { "collapsed": true } },
"Manga": { "title": "Manga", "theme": { "collapsed": true } },
"Movies": { "title": "Movies", "theme": { "collapsed": true } },
"News": { "title": "News", "theme": { "collapsed": true } }
}

8
pages/rest-api/start.mdx Normal file
View File

@ -0,0 +1,8 @@
# Get Started
The base URL for the Consumet REST API is: [`https://api.nganime.my.id`](https://api.nganime.my.id)
## Notes
- Some `GET` request examples displayed throughout these docs are written for use with Node.js - the [`axios`](https://axios-http.com) library may be required.
- Some `GET` request examples displayed throughout these docs are written for use with Python - the [`requests`](https://requests.readthedocs.io) library may be required.

10
pages/start.mdx Normal file
View File

@ -0,0 +1,10 @@
import { Tab, Tabs } from "nextra-theme-docs";
# Getting Started
Nganime API utilizes a REST API which is wildly supported across multiple platforms. Use your code base of choice and send requests to the public API [https://api.nganime.my.id](https://api.nganime.my.id).
Exampe with NodeJS:
```js
const axios = require("axios");
await axios.get("https://api.anify.tv", { headers: {"Content-Type": "application/json" }});
```
Most of this documentation will feature examples in NodeJS and Python, but a lot of them can be easily replicated in other languages.

View File

@ -14,7 +14,7 @@ const config: DocsThemeConfig = {
project: {
link: "https://nganime.my.id",
},
docsRepositoryBase: "https://github.com/Eltik/Anify-Docs",
docsRepositoryBase: "https://git.serenetia.com/AmaneSerenetia/Nganime-Docs",
navbar: {
extraContent: () => {
const theme = useTheme();

20
tsconfig.json Normal file
View File

@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}

View File

@ -216,6 +216,13 @@
resolved "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz"
integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==
"@types/node@20.11.25":
version "20.11.25"
resolved "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz"
integrity sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==
dependencies:
undici-types "~5.26.4"
"@types/prop-types@*":
version "15.7.11"
resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz"
@ -2463,6 +2470,16 @@ type-fest@^1.0.2:
resolved "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz"
integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==
typescript@5.4.2:
version "5.4.2"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz"
integrity sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==
undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
unified@^10.0.0:
version "10.1.2"
resolved "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz"