Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bilal-08/anilia
Anilist GraphQL client
https://github.com/bilal-08/anilia
Last synced: about 2 months ago
JSON representation
Anilist GraphQL client
- Host: GitHub
- URL: https://github.com/bilal-08/anilia
- Owner: bilal-08
- Created: 2022-04-06T06:17:50.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-23T15:55:46.000Z (12 months ago)
- Last Synced: 2024-10-16T20:25:01.630Z (3 months ago)
- Language: TypeScript
- Size: 17.6 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ANILIA
## Anilist GraphQL Client
[![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)](https://www.typescriptlang.org/) ![NodeJs](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)### Installation
```
npm install anilia
```## โฌ Import in your Project
```js
// commonjs Method
const { AnilistClient } = require('anilia');
//es6 or later
import { AnilistClient } from 'anilia';const Anilia = new AnilistClient();
```
### ๐ค Get a user
```js
(async()=>{
const { id } = await Anilia.getuser("kewlbee");
/* { users: [ { id: 5209602, name: 'kewlbee', avatar: [Object] } ] } */
console.log(id) //id of the user
const userData = await Anilia.getuserdetails(id)
// returns user data
// alternatively can use getUserdetailsByname using the username
})();
```
### ๐ซ Get Anime
```js
await Anilia.searchAnime("jojo") // returns searched anime related data
```
### ๐ Get Manga
```js
await Anilia.searchManga("jojo") // returns searched anime related data
```
### ๐งก Get Character
```js
await Anilia.findCharacter("subaru")
```
### โณ Get AiringTime
```js
// provide anime id
await Anilia.getAiringTime(108556)
// airing time for spyXfamily
```
> Note : Pass number whenever ID is mentioned
## ๐ Useful links### [Anilist Api docs](https://anilist.gitbook.io/anilist-apiv2-docs/overview/graphql)