npm.io
2.0.1 • Published 6 years ago

menudocs-applications-api

Licence
Apache-2.0
Version
2.0.1
Deps
1
Size
20 kB
Vulns
0
Weekly
0

MenuDocs Applications API

MenuDocs Application API is available to check the status of the various application forms at MenuDocs. We support the staff, helper, creator and ban appeal applications.

Installation

$ npm i menudocs-applications-api

Methods

// Check the status of a Moderator application
import { checkStaffApplication } from "menudocs-applications-api";
checkStaffApplication("Discord User ID").then(console.log);
// Check the status of a Helper application
import { checkHelperApplication } from "menudocs-applications-api";
checkHelperApplication("Discord User ID").then(console.log);
// Check the status of a Content Creator application
import { checkCreatorApplication } from "menudocs-applications-api";
checkCreatorApplication("Discord User ID").then(console.log);
// Check the status of a Ban Appeal application
import { checkBanAppeal } from "menudocs-applications-api";
checkBanAppeal("Discord User ID").then(console.log);
Response
type ApplicationType = "STAFF" | "HELPER" | "CREATOR" | "BANAPPEAL";
interface Application {
    id: number; // The unique application ID
    uid: string; // The Discord user ID of candidate
    accepted: boolean | null; // true - accepted, false - denied, null - no response yet
    application_type: ApplicationType; // The type of application
    created_at: Date; // The date the application was created
    updated_at: Date; // The date the application was last updated
}
Notes
  • All methods (checkStaffApplication, checkHelperApplication, checkCreatorApplication, checkBanAppeal) will return an Application (see above) or undefined.
  • A reponse is undefined when the provided candidate user ID is either invalid or they do not have an application.
  • You are free to use this API to get the status of an application. However, you may not mock candidates based on their application's status.
  • This package provides typings for endpoints and their responses.