# cardinaljs

> A library to interact with Cardinal API

Latest version **1.3.0** (published 2022-05-13) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install cardinaljs
pnpm add cardinaljs
yarn add cardinaljs
bun add cardinaljs
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2022-05-13 |
| First published | 2021-07-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 72.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Baptiste Nehmé |
| Maintainers | gyroskan |
| Keywords | api, node, cardinal |

## Links

- npm: https://www.npmjs.com/package/cardinaljs
- Repository: https://github.com/gyroskan/cardinaljs
- Homepage: https://github.com/gyroskan/cardinaljs#readme
- Issues: https://github.com/gyroskan/cardinaljs/issues
- npm.io page: https://npm.io/package/cardinaljs

## Dependencies (2)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [discord-api-types](https://npm.io/package/discord-api-types.md) ^0.20.2

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2022-05-13
- 1.2.39 — 2021-08-04
- 1.2.38 — 2021-08-04
- 1.2.37 — 2021-08-03
- 1.2.36 — 2021-08-03
- 1.2.35 — 2021-08-03
- 1.2.34 — 2021-07-28
- 1.2.33 — 2021-07-28
- 1.2.32 — 2021-07-28
- 1.2.31 — 2021-07-27
- 1.2.30 — 2021-07-27
- 1.2.201 — 2021-07-26
- 1.2.2 — 2021-07-26
- 1.2.1 — 2021-07-26
- 1.2.0 — 2021-07-22
- … 4 more at https://npm.io/package/cardinaljs/versions

## README

# cardinaljs
The javascript library to interact with cardinal API.

## About
cardinaljs is a [Node.js](https://nodejs.org/) module that allows you to interact with [Cardinal API](https://cardinal.gyroskan.com/swagger/index.html).

## Installation
  With the [npm](https://www.npmjs.com/package/cardinaljs) package:
  ```sh-session
  npm install cardinaljs
  ```

## Usage

```javascript
const { Client } = require('cardinaljs');
const client = new Client();

//check the token validity
client.login('token')
  .then(token => console.log('Connected!'))
  .catch(err => console.error('Unable to connect: ' + err));

// Fetch a guild
client.guilds.resolve('guildID')
  .then(guild => {
    if (guild != undefined)
      console.log('Fetched guild ' + guild.guildName );
    else
      console.log('Guild wiht id guildID is not in Cardinal database.');
  })
  .catch(err => console.error('Could not resolve guild guildID: ' + err));
```

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