# monday-api-client

> Easy to use client for talking to the Monday.com API.

Latest version **1.0.18** (published 2021-02-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install monday-api-client
pnpm add monday-api-client
yarn add monday-api-client
bun add monday-api-client
```

## 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 | 1.0.18 |
| Published | 2021-02-16 |
| First published | 2020-09-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | George Lee |
| Maintainers | general-lee |
| Keywords | monday, monday.com, api, client |

## Links

- npm: https://www.npmjs.com/package/monday-api-client
- npm.io page: https://npm.io/package/monday-api-client

## Dependencies (2)

- [esm](https://npm.io/package/esm.md) ^3.2.25
- [monday-sdk-js](https://npm.io/package/monday-sdk-js.md) ^0.1.1

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.18 (latest) — 2021-02-16
- 1.0.17 — 2021-01-29
- 1.0.16 — 2021-01-29
- 1.0.15 — 2021-01-25
- 1.0.14 — 2021-01-25
- 1.0.13 — 2021-01-10
- 1.0.12 — 2021-01-10
- 1.0.11 — 2020-12-10
- 1.0.10 — 2020-12-04
- 1.0.9 — 2020-09-23
- 1.0.8 — 2020-09-21
- 1.0.7 — 2020-09-18
- 1.0.6 — 2020-09-18
- 1.0.5 — 2020-09-18
- 1.0.4 — 2020-09-18
- … 4 more at https://npm.io/package/monday-api-client/versions

## README

# node-monday-api-client

Created by: https://www.enable.services/

Package allows you to easily
* Retrieve a pulse with a boardId and a pulseId
* Mutate a pulse with a boardId and a pulseId
* Query a column with a boardId, columnId and a column value
* Create a pulse with a boardId, group and an object of column values
* Retrieve all the pulses and pulse data in a group with a boardId and groupId
* Send a notification to monday with a userId and a boardId
* Get basic user data with a userId
* Get all users id, name and email

## Installation

```bash
npm i monday-api-client
```
## Usage

```javascript
mondayApi = require('monday-api-client');

//You can either pass in the boardId and the pulseID manually
const data = {boardId : 123456, pulseId: 654321};

//Or

//You can use the event object within req.body, which come's from the monday.com webhook
const data = JSON.parse(req.body.event);

const token = 'My v2 api token';
```

```javascript
//Returns a callback with the pulseData
mondayApi.pulse.getData(data, token, pulseData => {
     console.log(pulseData);
});
```

```javascript
//The column object must contain the name of the column and the new value for that column under the pulseId provided
//For more info on the values, please goto https://monday.com/developers/v2#column-values-section-status
data.columnObj = {name: 'status', value: `"{\\"label\\":\\"Stuck\\"}"`};

//The data object requires a boardId, a pulseId and a column object
//Mutates an item column and returns the pulse id
mondayApi.pulse.mutate(data, token, pulseData => {
     console.log(pulseData);
});
```

```javascript
const columnQueryData = {boardId, columnId, columnVal};
mondayApi.pulse.queryColumn(columnQueryData, token, pulseData => {
    console.log(pulseData);
});
```

```javascript
//Send a notification to Monday with a userId, boardId, message and token
mondayApi.notification
    .sendProject(
        {userId: 16101106, boardId: 749698622},
        '"Message!"',
        token
    );
```

```javascript
//You can grab all the pulse data under either just one or multiple groupIds
//GroupIds can either just take a string of one id or an array of group ids
mondayApi.group.getPulseData({boardId: "622641507", groupIds: ["group_title", "new_group"]}, token, pulseData => {
    console.log(JSON.stringify(pulseData));
});
```

```javascript
userIds can be just a string of just one userId or an array of userIds
mondayApi.user.getBasicData(userIds, token, userData => {
    console.log(JSON.stringify(userData));
});
```

```javascript
let mondayData ={
    "name" : "George",
    "person" : {"personsAndTeams":[{"id":13983951, "kind":"person"}]},
    "text": "Devloper",
};
const details = {boardId: 123456789, groupId: "group1"};
mondayApi.pulse.create(details, mondayData, token, users => {
    console.log(JSON.stringify(users));
});
```

```javascript
mondayApi.user.getAll(token, users => {
    console.log(JSON.stringify(users));
});
```
## Extra info
This package depends on esm and monday-sdk-js.

Make sure you install the latest version!

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