❗ THIS REPO IS NO LONGER KEPT UP TO DATE. Use https://github.com/recallfuture/furaffinity-api instead! ❗
The orginal repository is made by insert and can be found here. This is simply a fix to still get images after some website changes (ex. shinies) and is only here t 6F0F o be used in a discord bot.
FurAffinity wrapper for Node.js
To get the most recent content:
import { Recent, Type, Login } from 'furaffinity';
// or
let { Recent, Type, Login } = require('furaffinity');
// to allow all results to be accessible, add your cookies
Login("cookie_a", "cookie_b");
Recent(Type.Artwork).then(res => {
// res is an array of Result(s)
res[0].getSubmission().then(submission => {
// submission is a Submission
});
});
Searching for content:
import { Search, Type } from 'furaffinity';
Search('search query', { /** SearchOptions */ type?, rating? }).then(res => {
// res is an array of Result(s)
res[0].getSubmission().then(submission => {
// submission is a Submission
});
});
Looking up a specific submission:
import { Submission } from 'furaffinity';
Submission('1234567890').then(res => {
// res is a Submission
});