Imageapi.js
The fast way of grabbing random images from subreddits.
Install / Use
/learn @Milo123459/Imageapi.jsREADME
ImageAPI.JS
What?
ImageAPI is a wrapper for ImageAPI.fionn.live - a fast API for fetching a random post from a subreddit.
How?
The main API is just fetching random data from the reddit API allowing for us to send the data we think is valid back to the user making the request.
Is it fast?
The API is as fast as the Reddit API is. We can't speed it up, but, we have optimized the code on the backend to make it as fast as possible.
Examples:
<details> <summary>✌ JS example</summary>const api = require('imageapi.js');
(async () => {
const img = await api('subreddit');
console.log(img); // Logs the image
const advanced = await api.advanced('subreddit');
console.log(advanced); // Logs an object. Not all data may be present.
const stats = await api.stats();
console.log(stats); // Logs an object.
})();
</details>
<details>
<summary>😎 TS example</summary>
import api, { stats, advanced } from 'imageapi';
(async () => {
const img = await api('subreddit');
console.log(img); // Logs the image
const advanced = await api.advanced('subreddit');
console.log(advanced); // Logs an object. Not all data may be present.
const stats = await api.stats();
console.log(stats); // Logs an object.
})();
</details>
Sort types, top & new.
If you want to get a 'new' or 'top' post, you can specify a sort type. The valid ones are top & new.
You specify this as a second paramter in the advanced & default function. For example:
api.advanced('meme', 'top'); // Gets a 'top' meme
api.advanced('meme', 'new'); // Gets a 'new' meme
api.advanced('meme', 'this-is-invalid'); // Errors, returns a rejected promise
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
