2.0.0-alpha6 • Published 2 years ago
@dpongimo/async-hydrus.js v2.0.0-alpha6
hydrus.js
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.
FUNCTION | API | |
---|---|---|
API_VERSION | 1 | ✔️ |
SESSION_KEY | 8 | ✔️ |
REQUEST_NEW_PERMISSIONS | 1 | ✔️ |
VERIFY_ACCESS_KEY | 1 | ✔️ |
ADD_FILE | 1 | ❌ |
CLEAN_TAGS | 2 | ✔️ |
GET_TAG_SERVICES | 1 | ✔️ |
ADD_TAGS | 2 | ✔️ |
GET_URL_FILES | 1 | ✔️ |
GET_URL_INFO | 1 | ✔️ |
ADD_URL | 1 | ❌ |
ASSOCIATE_URL | 2 | ️️️️️❌ |
GET_COOKIES | 10 | ️️️️️✔️ |
SET_COOKIES | 10 | ️️️️️✔️ |
GET_PAGES | 7 | ️️️️️✔️ |
GET_PAGE_INFO | 11 | ️️️️️✔️ |
FOCUS_PAGE | 9 | ️️️️️✔️ |
SEARCH_FILES | 3 | ️️️️️✔️ |
FILE_METADATA | 4 | ️️️️️✔️ |
FILE | 4 | ️️️️️✔️ |
THUMBNAIL | 4 | ️️️️️✔️ |
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
2.0.0-alpha6
2 years ago
2.0.0-alpha5
2 years ago
2.0.0-alpha4
2 years ago
2.0.0-alpha3
2 years ago
2.0.0-alpha2
2 years ago
2.0.0-alpha1
2 years ago