Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)