2.0.0-alpha6 • Published 2 years ago

@dpongimo/async-hydrus.js v2.0.0-alpha6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

hydrus.js

NPM

hydrus api hydrus

ESM Module for interacting with the Hydrus Client HTTP API.

Originally created and maintained by cravxx, this variant attempts to provide Typescript annotations for all covered endpoints and is designed to allow for use in Node.js and in the Browser.

FUNCTIONAPI
API_VERSION1✔️
SESSION_KEY8✔️
REQUEST_NEW_PERMISSIONS1✔️
VERIFY_ACCESS_KEY1✔️
ADD_FILE1
CLEAN_TAGS2✔️
GET_TAG_SERVICES1✔️
ADD_TAGS2✔️
GET_URL_FILES1✔️
GET_URL_INFO1✔️
ADD_URL1
ASSOCIATE_URL2️️️️️❌
GET_COOKIES10️️️️️✔️
SET_COOKIES10️️️️️✔️
GET_PAGES7️️️️️✔️
GET_PAGE_INFO11️️️️️✔️
FOCUS_PAGE9️️️️️✔️
SEARCH_FILES3️️️️️✔️
FILE_METADATA4️️️️️✔️
FILE4️️️️️✔️
THUMBNAIL4️️️️️✔️

Example

ESM import in the browser

import { Hydrus } from "@dpongimo/async-hydrus.js";

const client = new Hydrus({
	access_key: "eb79e9e2a40dddd159299408db072ed6e6573d488b50db499f70a211ba1fa1da",
	fetch: window.fetch,
});

console.info(await client.getVersion());

CommonJS import in NodeJs:

const { Hydrus } = require("@dpongimo/async-hydrus.js");
const fetch = require("node-fetch");

const client = new Hydrus({
	access_key: "eb79e9e2a40dddd159299408db072ed6e6573d488b50db499f70a211ba1fa1da",
	fetch,
});

console.info(await client.getVersion());

Usage

const client = new Hydrus({
	address: URL, // URL to your Hydrus Client's HTTP API endpoint (default "http://127.0.0.1:45869")
	access_key: string, // Hydrus Access Key (can be provided later)
	fetch,
});

Authentication

Files

Pages