UNPKG

booru

Version:

Search (and do other things) on a bunch of different boorus!

51 lines 1.57 kB
"use strict"; /** * @packageDocumentation * @module Structures */ Object.defineProperty(exports, "__esModule", { value: true }); /** * Represents a site, mostly used for JSDoc */ class Site { /** The domain of the Site (the "google.com" part of "https://google.com/foo") */ domain; /** The type of this site (json/xml/derpi) */ type; /** The aliases of this site */ aliases; /** If this site serves NSFW posts or not */ nsfw; /** An object representing the api of this site */ api; /** The url query param to paginate on the site */ paginate; /** * If the site supports `order:random`. * If a string, this means a custom random system is used :/ */ random; /** The url query param for tags */ tagQuery; /** The character to use to join tags when creating the search url */ tagJoin; /** If this site supports only http:// */ insecure; /** Tags to add to every request, if not included */ defaultTags; constructor(data) { this.domain = data.domain; this.type = data.type ?? 'json'; this.aliases = data.aliases ?? []; this.nsfw = data.nsfw; this.api = data.api ?? {}; this.paginate = data.paginate ?? 'page'; this.random = data.random ?? false; this.tagQuery = data.tagQuery ?? 'tags'; this.tagJoin = data.tagJoin ?? '+'; this.insecure = data.insecure ?? false; this.defaultTags = data.defaultTags ?? []; } } exports.default = Site; //# sourceMappingURL=Site.js.map