furry-wrapper
Advanced tools
| import { AxiosRequestConfig, AxiosResponse } from 'axios'; | ||
| export interface Options { | ||
| agent?: string; | ||
| token?: string; | ||
| auth?: string; | ||
| axiosOptions?: AxiosRequestConfig; | ||
| } | ||
| interface BundleOptions { | ||
| default?: (name: string) => Function; | ||
| } | ||
| export declare type APIResponse = Promise<Record<string, unknown> | Error | null>; | ||
| export default class Base { | ||
| options: Options; | ||
| token: string | undefined; | ||
| constructor(options?: Options); | ||
| static get defaultAgent(): string; | ||
| get agent(): string; | ||
| query(url: string, cb?: ((r: AxiosResponse) => Promise<Record<string, unknown>>)): APIResponse; | ||
| static bundle(base: Function, items: Record<string, string>, options?: BundleOptions): (options?: Options) => APIResponse; | ||
| } | ||
| export {}; |
| import { Options, APIResponse } from './Base'; | ||
| export declare type Query = Array<string> | string; | ||
| export interface E6Options extends Options { | ||
| noCub?: boolean; | ||
| overrideTags?: string; | ||
| } | ||
| /** | ||
| * Uses the E621 API to retrieve data of a random post {@link https://e621.net} | ||
| * @param options - Library options | ||
| * @returns - The response from the API | ||
| */ | ||
| declare function E621(options?: Options): APIResponse; | ||
| /** | ||
| * Uses the E926 API to retrieve data of a random post {@link https://e926.net} | ||
| * @param options - Library options | ||
| * @returns - The response from the API | ||
| */ | ||
| declare function E926(options?: Options): APIResponse; | ||
| export declare interface E6 { | ||
| /** | ||
| * Uses the E621 API to retrieve data of a random post {@link https://e621.net} | ||
| * @param options - Library options | ||
| * @returns - The response from the API | ||
| */ | ||
| (options?: Options): APIResponse; | ||
| nsfw: typeof E621; | ||
| sfw: typeof E926; | ||
| } | ||
| declare const _default: E6; | ||
| export default _default; |
| import { Options, APIResponse } from './Base'; | ||
| /** | ||
| * Uses the RandomFox API to retrieve an image of a fox {@link https://randomfox.ca} | ||
| * @param options - Library options | ||
| * @returns - A random fox image | ||
| */ | ||
| declare function Fox(options?: Options): APIResponse; | ||
| export default Fox; |
| import { Options, APIResponse } from './Base'; | ||
| declare function FBAnimals(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random bird image | ||
| */ | ||
| declare function FBAnimalsBirb(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random blep image | ||
| */ | ||
| declare function FBAnimalsBlep(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random cheeta image | ||
| */ | ||
| declare function FBAnimalsCheeta(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random fox image | ||
| */ | ||
| declare function FBAnimalsFox(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random lynx image | ||
| */ | ||
| declare function FBAnimalsLynx(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random wolf image | ||
| */ | ||
| declare function FBAnimalsWolf(options?: Options): APIResponse; | ||
| declare function FBFurry(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random furry boop image | ||
| */ | ||
| declare function FBFurryBoop(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random cuddle image | ||
| */ | ||
| declare function FBFurryCuddle(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random furry flop image | ||
| */ | ||
| declare function FBFurryFlop(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random fursuit image | ||
| */ | ||
| declare function FBFurryFursuit(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random furry hold image | ||
| */ | ||
| declare function FBFurryHold(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random furry howl image | ||
| */ | ||
| declare function FBFurryHowl(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random furry hug image | ||
| */ | ||
| declare function FBFurryHug(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random furry kiss image | ||
| */ | ||
| declare function FBFurryKiss(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random furry lick image | ||
| */ | ||
| declare function FBFurryLick(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random furry propose image | ||
| */ | ||
| declare function FBFurryPropose(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random furry bulge image (NSFW) | ||
| */ | ||
| declare function FBFurryBulge(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random yiff gay image | ||
| */ | ||
| declare function FBFurryYiffGay(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random yiff straight image | ||
| */ | ||
| declare function FBFurryYiffStraight(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random yiff lesbian image | ||
| */ | ||
| declare function FBFurryYiffLesbian(options?: Options): APIResponse; | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random yiff gynomorph image | ||
| */ | ||
| declare function FBFurryYiffGynomorph(options?: Options): APIResponse; | ||
| interface FBAnimals { | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random animal image | ||
| */ | ||
| (options?: Options): APIResponse; | ||
| bird: typeof FBAnimalsBirb; | ||
| blep: typeof FBAnimalsBlep; | ||
| cheeta: typeof FBAnimalsCheeta; | ||
| fox: typeof FBAnimalsFox; | ||
| lynx: typeof FBAnimalsLynx; | ||
| wolf: typeof FBAnimalsWolf; | ||
| } | ||
| interface FBFurry { | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random (sfw) furry image | ||
| */ | ||
| (options?: Options): APIResponse; | ||
| yiff: FBYiff; | ||
| boop: typeof FBFurryBoop; | ||
| cuddle: typeof FBFurryCuddle; | ||
| flop: typeof FBFurryFlop; | ||
| fursuit: typeof FBFurryFursuit; | ||
| hold: typeof FBFurryHold; | ||
| howl: typeof FBFurryHowl; | ||
| hug: typeof FBFurryHug; | ||
| kiss: typeof FBFurryKiss; | ||
| lick: typeof FBFurryLick; | ||
| propose: typeof FBFurryPropose; | ||
| bulge: typeof FBFurryBulge; | ||
| } | ||
| interface FBYiff { | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random yiff image | ||
| */ | ||
| (options?: Options): APIResponse; | ||
| gay: typeof FBFurryYiffGay; | ||
| straight: typeof FBFurryYiffStraight; | ||
| lesbian: typeof FBFurryYiffLesbian; | ||
| gynomorph: typeof FBFurryYiffGynomorph; | ||
| } | ||
| export declare interface FB { | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random (sfw) image | ||
| */ | ||
| (options?: Options): APIResponse; | ||
| animals: FBAnimals; | ||
| furry: FBFurry; | ||
| yiff: FBYiff; | ||
| } | ||
| declare const _default: FB; | ||
| export default _default; |
| import Sheri from "./sheri"; | ||
| import Fox from "./fox"; | ||
| import Base from "./Base"; | ||
| declare const _default: { | ||
| E6: import("./e6").E6; | ||
| Shibe: import("./shibe").Shibes; | ||
| FurryBot: import("./furrybot").FB; | ||
| Sheri: typeof Sheri; | ||
| Fox: typeof Fox; | ||
| Base: typeof Base; | ||
| }; | ||
| export = _default; |
| import { Options, APIResponse } from './Base'; | ||
| /** | ||
| * There's simply too many sheri endpoints to optimally use them all. | ||
| * Check out {@link https://sheri.bot/api/urls} for endpoint names. | ||
| * @param endpoint - The endpoint to use - i.e. `cat`, `yeen`, etc | ||
| * @param options - Library options | ||
| * @returns - Returns the associated information with that endpoint | ||
| */ | ||
| export default function Sheri(endpoint: string, options?: Options): APIResponse; |
| import { Options, APIResponse } from './Base'; | ||
| /** | ||
| * Uses the Shibe API to retrieve an image of a shibe {@link https://shibe.online} | ||
| * @param options - Library options | ||
| * @returns - The response from the API | ||
| */ | ||
| declare function shibe(options?: Options): APIResponse; | ||
| /** | ||
| * Uses the Shibe API to retrieve an image of a cat {@link https://shibe.online} | ||
| * @param options - Library options | ||
| * @returns - The response from the API | ||
| */ | ||
| declare function cat(options?: Options): APIResponse; | ||
| /** | ||
| * Uses the Shibe API to retrieve an image of a bird {@link https://shibe.online} | ||
| * @param options - Library options | ||
| * @returns - The response from the API | ||
| */ | ||
| declare function bird(options?: Options): APIResponse; | ||
| export declare interface Shibes { | ||
| /** | ||
| * Uses the Shibe API to retrieve an image of a shibe {@link https://shibe.online} | ||
| * @param options - Library options | ||
| * @returns - The response from the API | ||
| */ | ||
| (options?: Options): APIResponse; | ||
| shibe: typeof shibe; | ||
| cat: typeof cat; | ||
| bird: typeof bird; | ||
| } | ||
| declare const _default: Shibes; | ||
| export default _default; |
+2
-0
@@ -22,2 +22,4 @@ "use strict"; | ||
| ops.headers['User-Agent'] = this.options?.agent || Base.defaultAgent; | ||
| if (!ops.timeout) | ||
| ops.timeout = 10000; | ||
| if (this.token) | ||
@@ -24,0 +26,0 @@ ops.headers['Authorization'] = `Bearer ${this.token}`; |
+5
-0
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| const Base_1 = require("./Base"); | ||
| /** | ||
| * Uses the RandomFox API to retrieve an image of a fox {@link https://randomfox.ca} | ||
| * @param options - Library options | ||
| * @returns - A random fox image | ||
| */ | ||
| async function Fox(options) { | ||
@@ -5,0 +10,0 @@ const base = new Base_1.default(options); |
+0
-20
@@ -34,7 +34,2 @@ "use strict"; | ||
| // I'm too lazy to do these automatically | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random (sfw) image | ||
| */ | ||
| async function FB(options) { | ||
@@ -44,7 +39,2 @@ const props = Object.keys(Container.valid).slice(0, 16); | ||
| } | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random animal image | ||
| */ | ||
| async function FBAnimals(options) { | ||
@@ -102,7 +92,2 @@ const props = Object.keys(Container.valid).slice(0, 16); | ||
| } | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random (sfw) furry image | ||
| */ | ||
| async function FBFurry(options) { | ||
@@ -200,7 +185,2 @@ const props = Object.keys(Container.valid).slice(6, 16); | ||
| } | ||
| /** | ||
| * | ||
| * @param options - Library options | ||
| * @returns - A random yiff image | ||
| */ | ||
| async function FBFurryYiff(options) { | ||
@@ -207,0 +187,0 @@ const props = Object.keys(Container.valid).slice(3); |
+9
-1
@@ -7,2 +7,10 @@ "use strict"; | ||
| const fox_1 = require("./fox"); | ||
| module.exports = { E6: e6_1.default, Shibe: shibe_1.default, FurryBot: furrybot_1.default, Sheri: sheri_1.default, Fox: fox_1.default }; | ||
| const Base_1 = require("./Base"); | ||
| module.exports = { | ||
| E6: e6_1.default, | ||
| Shibe: shibe_1.default, | ||
| FurryBot: furrybot_1.default, | ||
| Sheri: sheri_1.default, | ||
| Fox: fox_1.default, | ||
| Base: Base_1.default | ||
| }; |
+1
-1
@@ -9,3 +9,3 @@ "use strict"; | ||
| * @param options - Library options | ||
| * @returns {Promise<QueryReturns>} - Returns the associated information with that endpoint | ||
| * @returns - Returns the associated information with that endpoint | ||
| */ | ||
@@ -12,0 +12,0 @@ async function Sheri(endpoint, options) { |
+3
-3
| { | ||
| "name": "furry-wrapper", | ||
| "version": "0.0.3", | ||
| "version": "0.0.4", | ||
| "description": "A rewrite of hokkqi's furry API wrapper", | ||
| "main": "dist/index.js", | ||
| "types": "index.d.ts", | ||
| "types": "dist/@types/index.d.ts", | ||
| "files": [ | ||
@@ -38,3 +38,3 @@ "dist/**/*" | ||
| "api", "wrapper", "e621", | ||
| "e926", "furry", | ||
| "e926", "image", "furry", | ||
| "axios", "javascript" | ||
@@ -41,0 +41,0 @@ ], |
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
63996
16.15%17
70%678
77.02%