Comparing version 0.0.1 to 0.0.2
274
index.js
@@ -1,105 +0,231 @@ | ||
let api = "https://api.becoditive.xyz" | ||
let api = "https://api.becoditive.xyz/" | ||
let verison = "v2/" | ||
let fetch = require('node-fetch') | ||
module.exports = { | ||
// Animal Endpoints // | ||
cat: async function() { | ||
let url = `${api}/v1/animals/cat` | ||
let data = await fetch(url) | ||
let nokey = { | ||
message : "No API Key was provided!", | ||
code : 401 | ||
} | ||
class API { | ||
constructor(){ | ||
this.apikey = null | ||
} | ||
login(apikey){ | ||
this.apikey = apikey | ||
} | ||
async cat() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}animals/cat?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
dog: async function() { | ||
let url = `${api}/v1/animals/dog` | ||
let data = await fetch(url) | ||
} | ||
async dog() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}animals/dog?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
panda: async function() { | ||
let url = `${api}/v1/animals/panda` | ||
let data = await fetch(url) | ||
} | ||
async panda() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}animals/panda?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
// Other Endpoint // | ||
joke: async function() { | ||
let url = `${api}/v1/others/joke` | ||
let data = await fetch(url) | ||
} | ||
async bird() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}animals/bird?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
insults: async function() { | ||
let url = `${api}/v1/others/insults` | ||
let data = await fetch(url) | ||
} | ||
async uuid() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/uuid?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
flirt: async function() { | ||
let url = `${api}/v1/others/flirt` | ||
let data = await fetch(url) | ||
} | ||
async joke() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/joke?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
word: async function() { | ||
let url = `${api}/v1/others/word` | ||
let data = await fetch(url) | ||
} | ||
async puns() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/puns?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
doesnotexists: async function() { | ||
let url = `${api}/v1/others/doesnotexists` | ||
let data = await fetch(url) | ||
} | ||
async hug() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/hug?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
quote: async function() { | ||
let url = `${api}/v1/others/quote` | ||
let data = await fetch(url) | ||
} | ||
async kiss() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/kiss?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
uselessweb: async function() { | ||
let url = `${api}/v1/others/uselessweb` | ||
let data = await fetch(url) | ||
} | ||
async insults() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/insults?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
truth: async function() { | ||
let url = `${api}/v1/others/truth` | ||
let data = await fetch(url) | ||
} | ||
async flirt() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/flirt?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
dare: async function() { | ||
let url = `${api}/v1/others/dare` | ||
let data = await fetch(url) | ||
} | ||
async word() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/word?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
number: async function() { | ||
let url = `${api}/v1/others/number` | ||
let data = await fetch(url) | ||
} | ||
async doesnotexists() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/doesnotexists?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
password: async function() { | ||
let url = `${api}/v1/others/password` | ||
let data = await fetch(url) | ||
} | ||
async quote() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/quote?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { return json }); | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
}, | ||
} | ||
async uselessweb() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/uselessweb?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
} | ||
async truth() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/truth?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
} | ||
async dare() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/dare?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
} | ||
async number() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/number?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
} | ||
async password() { | ||
if(this.apikey === null) return nokey | ||
let data = await fetch(`${api}${verison}others/password?apikey=${this.apikey}`) | ||
.then(res => res.json()) | ||
.then(json => { | ||
return json | ||
}) | ||
return data | ||
} | ||
} | ||
module.exports = { | ||
API : API | ||
} |
{ | ||
"name": "becoditive", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "a nodejs wrapper for becoditive api", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "nodemon ." | ||
}, | ||
"repository": { | ||
@@ -10,0 +7,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
7964
3
188
1
82
20