Giter VIP home page Giter VIP logo

ram-api.js's Introduction

ram-api.js

a npm module to connect to ram api easier

About this package

We understand using ram api can be hard as it has alot this package calls the api for you however this wont bypass the ratelimit youll still see the ratelimit error

Install

install axios npm i axios or yarn add axios

install the logs npm i winston-console-format winston or yarn add winston-console-format winston

npm i ram-api.js or yarn add ram-api.js

Update to v2.0.0

remove the code for any custom connections

change apiversion check

const apikey = 'apikey'
(apiv) to (apiv, apikey)

check example for more info

for a api key join the discord and go to #request-api-keys https://discord.gamearoodev.com

Example

const ramapi = require("ram-api");
const apiv = "v4"; //v2 and up are available ram api versions note versions
const apikey = "apikey"; //ask for a key by contacting support

//! note ram api has a 5 calls per 5 seconds

ramapi.apiversion(apiv); // outputs rather the api is outdated or not also this console logs for you

ramapi
	.apihug(apiv, apikey)
	.then(async (data) => {
		console.log(await data.data.url); // logs the url
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.apigm(apiv, apikey)
	.then(async (data) => {
		console.log(data.url); //url
		console.log(data.text); //text
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.apign(apiv, apikey)
	.then(async (data) => {
		console.log(data.url); //url
		console.log(data.text); //text
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.apislap(apiv, apikey, "user1", "user2")
	.then(async (data) => {
		console.log(data.url); //url
		console.log(data.text); //texts (it puts this together so the user1 and user2 would be needed)
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.apikiss(apiv, apikey)
	.then((data) => {
		console.log(data.url); // returns the url
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.api8ball(apiv, apikey)
	.then((data) => {
		console.log(data.text); // text
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.apihello(apiv, apikey)
	.then((data) => {
		console.log(data.text); //text
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.apicuddle(apiv, apikey)
	.then((data) => {
		console.log(data.url); //url
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.apitired(apiv, apikey)
	.then((data) => {
		console.log(data.url); //url
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.apisick(apiv, apikey)
	.then((data) => {
		console.log(data.url); //url
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.apimeme(apiv, apikey)
	.then((data) => {
		let url = data.url;
		let title = data.title;
		let author = data.author;
		let nsfw = data.nsfw;
		let postlink = data.postLink;
		console.log(`${url} \n ${title} \n ${author} \n ${nsfw} \n ${postlink}`);
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.apicry(apiv, apikey)
	.then((data) => {
		console.log(data.url); //url
		console.log(data.text); //text
	})
	.catch((err) => {
		console.log(err);
	});

ramapi
	.apilol(apiv, apikey)
	.then((data) => {
		console.log(data.url); //url
	})
	.catch((err) => {
		console.log(err);
	});

Missing endpoint

current api version is v4 if v5 is out then contact support

ram api endpoints can be found at https://ram.gamearoo.top/api/docs

Support

email : [email protected]

discord: https://discord.gamearoodev.com

ram-api.js's People

Contributors

gamearoocodes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.