1.1.1 • Published 5 years ago

corynth-api v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

Corynth API

How to use it

const api = require("corynth-api")

The meme function which grabs a random meme

Input:

api.meme().then(meme => console.log(meme))

or

const meme = await api.meme() 
console.log(meme) 

Output:

{"meme": "image url", "subreddit": "subreddit name"}

The reddit function which grabs an image from a subreddit of your choice

Input:

api.reddit('memes').then(reddit => console.log(reddit))

or

const reddit = await api.reddit('memes')
console.log(reddit)

Output:

{"subreddit": "subreddit name", "image": "image url"}

Coronavirus Class - Powered by corona.lmao.ninja

How to define it

const corona = new api.Corona()

Getting world data

corona.world().then(data=> console.log(data))

or

const data = await corona.world()
console.log(data)

Output:

{
"cases":0,
"recovered":0,
"dead":0,
"critical":0,
"tests":0,
"deaths_today":0,
"cases_today":0 //These would be real numbers
}  

Getting country data

corona.country('country name').then(data=> console.log(data))

or

const data = await corona.country('country name')
console.log(data)

Output:

{
    "country": "country name",
"cases":0,
"recovered":0,
"dead":0,
"critical":0,
"tests":0,
"deaths_today":0,
"cases_today":0 //These would be real numbers
}  
1.1.1

5 years ago

1.0.2

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.1.0-fix

5 years ago

1.0.0

5 years ago

0.2.1

5 years ago

0.1.2

5 years ago

0.2.0

5 years ago

0.1.3

5 years ago

0.1.0

5 years ago

0.1.1

5 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago