# menudocs-applications-api

> A simple wrapper to fetch the status of a MenuDocs application.

Latest version **2.0.1** (published 2020-08-15) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install menudocs-applications-api
pnpm add menudocs-applications-api
yarn add menudocs-applications-api
bun add menudocs-applications-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2020-08-15 |
| First published | 2020-08-15 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | MenuDocs |
| Maintainers | t3ned |

## Links

- npm: https://www.npmjs.com/package/menudocs-applications-api
- Repository: https://github.com/T3NED/MenuDocs-Applications-API
- Homepage: https://github.com/T3NED/MenuDocs-Applications-API#readme
- Issues: https://github.com/T3NED/MenuDocs-Applications-API/issues
- npm.io page: https://npm.io/package/menudocs-applications-api

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0

## Recent versions

- 2.0.1 (latest) — 2020-08-15
- 2.0.0 — 2020-08-15

## README

# 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

```bash
$ npm i menudocs-applications-api
```

### Methods

```js
// Check the status of a Moderator application
import { checkStaffApplication } from "menudocs-applications-api";
checkStaffApplication("Discord User ID").then(console.log);
```

```js
// Check the status of a Helper application
import { checkHelperApplication } from "menudocs-applications-api";
checkHelperApplication("Discord User ID").then(console.log);
```

```js
// Check the status of a Content Creator application
import { checkCreatorApplication } from "menudocs-applications-api";
checkCreatorApplication("Discord User ID").then(console.log);
```

```js
// Check the status of a Ban Appeal application
import { checkBanAppeal } from "menudocs-applications-api";
checkBanAppeal("Discord User ID").then(console.log);
```

### Response

```ts
type ApplicationType = "STAFF" | "HELPER" | "CREATOR" | "BANAPPEAL";
```

```ts
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.

---
_Source: https://npm.io/package/menudocs-applications-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
