stackexchange-api
Version:
A Node.js wrapper for the StackExchange API
26 lines (25 loc) • 1.02 kB
TypeScript
import { ShallowUser } from './ShallowUser';
import { TypeBadge } from '../interfaces/result-types/TypeBadge';
/**
* The equivalent of [Type badge](https://api.stackexchange.com/docs/types/badge).<br>
* This object represents a Badge on a [Stack Exchange site](https://stackexchange.com/sites).<br>
* Some Badges, like "Autobiographer", are held in common across all Stack Exchange sites. Others, like most tag badges, vary on a site by site basis.<br>
* Remember that ids are never guaranteed to be the same between sites, even if a Badge exists on both sites.
*/
export declare class Badge {
awardCount: number | null;
/**
* Refers to a [[Badge]]
*/
badgeId: number | null;
badgeType: 'named' | 'tag_based' | null;
description: string | null;
link: string | null;
name: string | null;
rank: 'gold' | 'silver' | 'bronze' | null;
/**
* *May be absent, in which case it is set to `null`*
*/
user: ShallowUser | null;
constructor(badge?: TypeBadge);
}