2.2.6 • Published 2 years ago

e621 v2.2.6

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

E621

The most comprehensive wrapper for e621 you'll ever find.

We support almost anything normal users can do, with plans to bring everything else in, and more later in development.

See the Features List for all of the things this module supports, and what is planned.

This module is not officially supported or endorsed by any of the e621 staff. Do not go to them if something does not work.

This module is structured with submodules corresponding to separate areas of the site. All of these modules are on the primary class, which can be constructed like so:

import E621 from "e621"; // or const E621 = require("e621");

// no options are required, see below for the options
const e621 = new E621();

// the options are all an object in the first parameter, e.g.
const e621 = new E621({
	authUser: "",
	authKey:  ""
});

// all of the available modules stem from this main class,
// e.g. use e621.posts.METHOD(), e621.users.METHOD()

Options

Most of these options shouldn't be used unless you know what you're doing (you probably only need authUser and authKey, and you can set userAgent) | Option | Type | Default | Description | |:---:|:---:|:---:|:---:| | authUser | String | None | User for authentication | | authKey | String | None | Token for authentication | | userAgent | String | See Code | UserAgent for requests |

Instance Options

These are set via the setInstance function. | Option | Type | Default | Description | |:---:|:---:|:---:|:---:| | reconstructStaticURL | See Code | See Code | Override default url reconstruction | | imageReconstructionType | "e621" | "yiffy" | "local" | null | See Code | See Code | | ssl | Boolean | ^1 | See Code | | port | Number | ^1 | See Code | | host | String | ^1 | See Code |

^1: This is very dependent on where this function is used. If used on a subclass, like Yiffy or Dev the defaults will be set to something else, but otherwise they are: true, 443, e621.net

Using YiffyAPI or E621 Dev?

We've got built in classes for both. E621 dev assumes you're using e621ng@ce871e4 or later, as they changed where the dev site is accessed in this commit. you can use the built in sub-classes E621.YiffyAPI E621.Dev to access these, and for anything else: there's E621.Custom

import E621 from "e621"; // or import { YiffyAPI, Dev, Custom } from "e621";

// first and only parameter is Options
const yapi = new E621.Yiffy();
const dev = new E621.Dev();
// first parameter is Options, second is InstanceOptions
const custom = new E621.Custom({}, {
	host: "example.com",
	port: 443,
	ssl: true
});
2.2.6

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.2.4

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.4

2 years ago

2.1.3

2 years ago

2.1.6

2 years ago

2.1.5

2 years ago

2.1.8

2 years ago

2.1.7

2 years ago

2.1.0

2 years ago

2.1.9

2 years ago

2.1.10

2 years ago

2.1.11

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.0-dev.11

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

2.0.0-dev.10

3 years ago

1.0.9-hotfix.0

3 years ago

2.0.0-dev.1

3 years ago

2.0.0-dev.0

3 years ago

2.0.0-dev.3

3 years ago

2.0.0-dev.2

3 years ago

2.0.0-dev.5

3 years ago

2.0.0-dev.4

3 years ago

2.0.0-dev.7

3 years ago

2.0.0-dev.6

3 years ago

2.0.0-dev.9

3 years ago

2.0.0-dev.8

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago

0.0.2

3 years ago