some-random-cat
Advanced tools
Comparing version
{ | ||
"name": "some-random-cat", | ||
"version": "2.2.3", | ||
"version": "2.3.0", | ||
"description": "A very suitable API to generate random images of cats, dogs and random jokes, facts... A lot more!", | ||
@@ -5,0 +5,0 @@ "main": "build/src/index.js", |
@@ -42,3 +42,3 @@ export interface Advice { | ||
*/ | ||
static getAdvice(): Promise<Advice | void>; | ||
static getAdvice(): Promise<Advice | null>; | ||
/** | ||
@@ -48,3 +48,3 @@ * Get a random cat. | ||
*/ | ||
static getCat(): Promise<Cat>; | ||
static getCat(): Promise<Cat | null>; | ||
/** | ||
@@ -54,3 +54,3 @@ * Get a random dog. | ||
*/ | ||
static getDog(): Promise<string | void>; | ||
static getDog(): Promise<string | null>; | ||
/** | ||
@@ -60,3 +60,3 @@ * Get a random fact. | ||
*/ | ||
static getFact(): Promise<string | void>; | ||
static getFact(): Promise<string | null>; | ||
/** | ||
@@ -66,23 +66,23 @@ * Get a random joke. | ||
*/ | ||
static getJoke(): Promise<Joke | void>; | ||
static getJoke(): Promise<Joke | null>; | ||
/** | ||
* | ||
* Get a random meme. | ||
* @type {object} | ||
* @type {Meme} | ||
* @param {string} sub The subreddit's name. | ||
* @returns {Promise<object | void>} Returns an object with a promise. | ||
* @returns {Promise<Meme | null>} Returns an object with a promise. | ||
*/ | ||
static getMeme(sub: string): Promise<Meme | void>; | ||
static getMeme(sub: string): Promise<Meme | null>; | ||
/** | ||
* Get a string. | ||
* @param {number} number The length of the string | ||
* @returns {Promise<string | void>} Returns a string. | ||
* @returns {Promise<string | null>} Returns a string. | ||
*/ | ||
static getString(number: number): Promise<string | void>; | ||
static getString(number: number): Promise<string | null>; | ||
/** | ||
* Get a topic. | ||
* @returns {Promise<string | void>} Returns a string with the topic. | ||
* @returns {Promise<string | null>} Returns a string with the topic. | ||
*/ | ||
static getTopic(): Promise<string | void>; | ||
static getTopic(): Promise<string | null>; | ||
} | ||
//# sourceMappingURL=Random.d.ts.map |
@@ -95,5 +95,5 @@ "use strict"; | ||
* Get a random meme. | ||
* @type {object} | ||
* @type {Meme} | ||
* @param {string} sub The subreddit's name. | ||
* @returns {Promise<object | void>} Returns an object with a promise. | ||
* @returns {Promise<Meme | null>} Returns an object with a promise. | ||
*/ | ||
@@ -113,3 +113,3 @@ static async getMeme(sub) { | ||
* @param {number} number The length of the string | ||
* @returns {Promise<string | void>} Returns a string. | ||
* @returns {Promise<string | null>} Returns a string. | ||
*/ | ||
@@ -127,7 +127,7 @@ static async getString(number) { | ||
* Get a topic. | ||
* @returns {Promise<string | void>} Returns a string with the topic. | ||
* @returns {Promise<string | null>} Returns a string with the topic. | ||
*/ | ||
static async getTopic() { | ||
try { | ||
const main = await defaultAxios.get("http://bruhapi.xyz/topic"); | ||
const main = await defaultAxios.get("https://bruhapi.syntaxpwn.repl.co/topic"); | ||
let content = main.data.res; | ||
@@ -139,4 +139,5 @@ return content; | ||
} | ||
return null; | ||
} | ||
} | ||
exports.Random = Random; |
{ | ||
"name": "some-random-cat", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "A very suitable API to generate random images of cats, dogs and random jokes, facts... A lot more!", | ||
@@ -5,0 +5,0 @@ "main": "build/src/index.js", |
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
34009
0.14%734
0.14%