npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

monday-api-client

v1.0.18

Published

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

Downloads

10

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

npm i monday-api-client

Usage

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';
//Returns a callback with the pulseData
mondayApi.pulse.getData(data, token, pulseData => {
     console.log(pulseData);
});
//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);
});
const columnQueryData = {boardId, columnId, columnVal};
mondayApi.pulse.queryColumn(columnQueryData, token, pulseData => {
    console.log(pulseData);
});
//Send a notification to Monday with a userId, boardId, message and token
mondayApi.notification
    .sendProject(
        {userId: 16101106, boardId: 749698622},
        '"Message!"',
        token
    );
//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));
});
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));
});
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));
});
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!