2.0.1 • Published 4 years ago
menudocs-applications-api v2.0.1
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 anApplication
(see above) orundefined
. - 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.