Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crizmo/anyanime_api
AnyAnime Api is an addon api of the original AnyAnime npm package !
https://github.com/crizmo/anyanime_api
anime api discord javascript nodejs pfp
Last synced: about 2 months ago
JSON representation
AnyAnime Api is an addon api of the original AnyAnime npm package !
- Host: GitHub
- URL: https://github.com/crizmo/anyanime_api
- Owner: crizmo
- License: mit
- Created: 2022-03-19T02:32:52.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-16T11:08:32.000Z (10 months ago)
- Last Synced: 2024-03-16T13:35:38.533Z (10 months ago)
- Topics: anime, api, discord, javascript, nodejs, pfp
- Language: JavaScript
- Homepage: https://any-anime-api.vercel.app/
- Size: 594 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Any Anime Api
AnyAnime api is a addon on the original anyanime npm package which works similar to the package
The api & package is made by `kurizu.taz` on discord !
Get a random anime pfp / image per request.
- Reload the site or click the button to get a new image.
- Current db size : 770 png | 185 gifsAnyanime API is a free API that allows you to get a random anime images for your projects.
# Contributing
If you want to contribute to the api you can do so by making a pull request or by making an issue.To add more images to the api you can do so by adding them to the `database/data/url.json` folder.
- Example :-
```json
[
"https://cdn.discordapp.com/attachments/970974282681307187/988501172887363604/favicon.png",
"https://media.discordapp.net/attachments/952764969638834228/969830435444097054/Criz.png",
]
```
Then you can make a pull request and i'll add them to the api.
Try to keep the url type as `png` or `gif`. ( Better if the images are hosted on discord )# Package
If you want to use the package instead of the api here's the link:
- [AnyAnime](https://www.npmjs.com/package/anyanime/)
- [Github](https://github.com/crizmo/AnyAnime)# Discord implementation
```javascript
const { MessageEmbed } = require('discord.js');
const fetch = require("node-fetch");let ani = await fetch(`https://any-anime.p.rapidapi.com/v1/anime/gif/2/?rapidapi-key={YOUR_API_KEY}`);
let data = await ani.json();// {
// message: 'Random Anime GIF Images',
// status: '200',
// images: [
// 'https://res.cloudinary.com/anyanime/image/upload/hatsune-miku-animeKurizu16.gif',
// 'https://res.cloudinary.com/anyanime/image/upload/anime-girl-animeKurizu0.gif'
// ]
// }const embed = new MessageEmbed()
.setColor("RANDOM")
.setTitle(`AnyAnime`)
.setDescription(`${data.message} \n Status: ${data.status}`)
.setImage(data.images[0])
.setFooter(`Hope you like it!`);
message.channel.send({ embeds: [embed] });```
# Base endpoints Heroku
- Json response ( Get ) - https://any-anime.p.rapidapi.com/v1/anime/png/1/?rapidapi-key={YOUR_API_KEY} - Shows json data and image.
## Params and query
"/v1/anime/:type/:number"
- "v1" - Version of the api
- "anime" - Type [ default]
- ":type" - Type of image [ png | gif ]
- ":number" - Number of images [ 1 - 10 ] [ default 1 ]## Response
- Gives a json response with the image url and status code.
```json
{
message: 'Random Anime GIF Images',
status: '200',
images: [
'https://res.cloudinary.com/anyanime/image/upload/hatsune-miku-animeKurizu16.gif',
'https://res.cloudinary.com/anyanime/image/upload/anime-girl-animeKurizu0.gif'
]
}
```
for - https://any-anime.p.rapidapi.com/v1/anime/gif/2/?rapidapi-key={YOUR_API_KEY}