amvstrm's API V1/V2 is still in developements.
Please read the usage of our API on the documentation page. Usages
This is the comparison list of V1 and V2...
-
V2 (In Development)
- Using ModuleJS
- Anilist Info Based
- 2 Fast Server and better cache system to save loading times (Redis/Memory)
- api.amvstr.ml
- s2-api.amvstr.ml (api-server-2 wont be updated)
- More Route and Feature
- Faster than V1 (fetch from official Anilist API / Consumet for fetching video/info backup source)
- Compatible with amvstrm V2 (SOON)
- Swagger Documentation
-
V1 (✔)
- Using CommonJS
- Gogoanime Info Based (Low Info)
- 2 Normal Server (Vercel)
- api.amvstr.ml
- api-server-2.amvstr.ml
- Slower (Web Scraping)
- Compatible with amvstrm V1
For normal API with memory caching, please click here...
If you want to cache the API with Redis :
-
Create your own free account on upstash to create your own redis : UPSTASH
-
After you done click here :
- When you done creating your own account on Upstash :
-
Create a database
Choose any server location near you but for this ill go with global. -
After you done copy your redis URL, PORT and PASSWORD credential.
- When you done deploying, go to your github repo and modify the routes/api.js and routes/apiv2.js code and uncomment the redisClient const
const cache = apicache.middleware;
// IF YOU HAVE REDIS DB YOU CAN USE IT TO CACHE THE DATA
// const redisClient = createClient({
// host: process.env.REDIS_URL,
// port: process.env.REDIS_PORT,
// password: process.env.REDIS_PASSWORD,
// legacyMode: true
// });
// const cache = apicache.options({
// redisClient,
// }).middleware;
Comment back the const cache and it should look like this
// const cache = apicache.middleware;
// IF YOU HAVE REDIS DB YOU CAN USE IT TO CACHE THE DATA
const redisClient = createClient({
host: process.env.REDIS_URL,
port: process.env.REDIS_PORT,
password: process.env.REDIS_PASSWORD,
legacyMode: true
});
const cache = apicache.options({
redisClient,
}).middleware;
And Then you are done...
Our API source code is distributed under the terms of the GPL v3.0 license. See LICENSE for details. You are free to use our API source code in any way you want.