
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
A minimal wrapper for interfacing with the Gizmo API.
npm i gizmo-api
<script src="https://cdn.gizmo.moe/scripts/gizmo-api@1.2.7.bundle.js"></script>
<script>
// Module will then be exposed under the variable 'gizmo'
</script>
If you want to build the module and bundle from source, use the following command:
npm run build
Or alternatively, you can either build the browser bundle or node module separately.
npm run build:node
npm run build:browser
(CommonJS)const gizmo = require("gizmo-api");
(ESM)import gizmo from "gizmo-api";
Simple user search:
import { searchForUser } from "gizmo-api";
searchForUser("tja").then(user => {
console.log(user);
});
This will log the following:
{
"id": 1,
"username": "Tjaz",
"badges": [ "DEVELOPER", "MODERATOR" ],
"avatar_url": "https://cdn.gizmo.moe/uploads/avatars/...",
"banner_url": "https://cdn.gizmo.moe/uploads/banners/...",
"about_me": "...",
"created_at": 1534514387
}
You are limited to 1 request per 0.1 seconds!
A base user.
import type { User } from "gizmo-api"
interface User {
id: number;
username: string;
badges: Badge[];
avatar_url: string | null;
banner_url: string | null;
about_me: string;
created_at: number;
}
The badge union.
import type { Badge } from "gizmo-api"
type Badge = "DEVELOPER" | "MODERATOR";
To check for whether a user has a certain badge, use the provided enum and method:
import { userHasBadge, BADGES } from "gizmo-api"
const BADGES = {
DEVELOPER: "DEVELOPER",
MODERATOR: "MODERATOR"
};
userHasBadge(user, BADGES.DEVELOPER);
Or alternatively, you can do the checking manually:
import { BADGES } from "gizmo-api"
user.badges.includes(BADGES.DEVELOPER);
interface AuthenticatedUser extends User {
token: string;
}
function getUserById (id: number): Promise<User>;
function getAuthenticatedUser (token: string): Promise<User>;
type UserID = number;
type Username = string;
type SearchQuery = UserID | Username;
function searchForUser (query: SearchQuery): Promise<User>;
function login (username: string, password: string): Promise<AuthenticatedUser>;
function userHasBadge (user: User | AuthenticatedUser, badge: Badge): boolean;
FAQs
A minimal wrapper for interfacing with the Gizmo API.
We found that gizmo-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.