Options
All
  • Public
  • Public/Protected
  • All
Menu

node-derpi - v1.0.5

Index

Variables

Private Const COMMENTS_URL

COMMENTS_URL: string = URL_BASE_PHILOMENA + '/search/comments'

Represents the URL for image comments PHILOMENA: /api/v1/json/search/comments?q=image_id:{}

Private Const DEFAULT_DATE

DEFAULT_DATE: Date = new Date(0)

Represents the Unix epoch

Private Const HTTP_200_OK

HTTP_200_OK: 200 = 200

Represents an HTTP 200 OK response code

Private Const HTTP_301_MOVED_PERMANENTLY

HTTP_301_MOVED_PERMANENTLY: 301 = 301

Represents an HTTP 301 Moved Permanently response code

Private Const IMAGE_URL

IMAGE_URL: string = URL_BASE_PHILOMENA + '/images/{}'

Represents the URL for image details

Private Const MAXIUMUM_ID_FETCH_RETRIES

MAXIUMUM_ID_FETCH_RETRIES: 10 = 10

Represents the maximum number of retries for ID fetching

Private Const REVERSE_IMAGE_SEARCH_URL

REVERSE_IMAGE_SEARCH_URL: string = URL_BASE_PHILOMENA + '/search/reverse'

Represents the URL for reverse image searches PHILOMENA: /api/v1/json/search/reverse

Private Const SEARCH_URL

SEARCH_URL: string = URL_BASE_PHILOMENA + '/search/images'

Represents the URL for searches PHILOMENA: /api/v1/json/search/images

Const TAG_SEARCH_URL

TAG_SEARCH_URL: string = URL_BASE_PHILOMENA + '/search/tags'

Represents the URL for tag searches

Private Const TAG_URL

TAG_URL: string = URL_BASE_PHILOMENA + '/tags/{}'

Represents the URL for tag details

Private Const URL_BASE

URL_BASE: "https://derpibooru.org" = "https://derpibooru.org"

Represents the base URL for all API requests

Const URL_BASE_PHILOMENA

URL_BASE_PHILOMENA: "https://derpibooru.org/api/v1/json" = "https://derpibooru.org/api/v1/json"

Private Const USER_AGENT

USER_AGENT: string = 'node-derpi/' + require('../../package.json').version

Represents the user agent used for requests from this package

Private Const USER_URL

USER_URL: string = URL_BASE + '/profiles/{}.json'

Represents the URL for user profiles

Functions

Private slugify

  • slugify(param: string): string
  • Slugifies a URL parameter in the same way Derpibooru does, for fetching tags

    export

    Parameters

    • param: string

      The parameter to slugify

    Returns string

Object literals

Private Const DEFAULT_REQUEST_OPTS

DEFAULT_REQUEST_OPTS: object

Represents the default request options used for HTTP requests

json

json: boolean = true

headers

headers: object

User-Agent

User-Agent: string = USER_AGENT

Generated using TypeDoc