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

@illustrative-mathematics/zoom-node

v2.1.1

Published

Node.js client library for the Zoom API

Downloads

5

Readme

Zoom Node.js Library

The Zoom Node.js library provides convenient access to Zoom's Meeting API. This client library assumes usage of the Server-to-Server OAuth authentication flow.

Note: This library is a work-in-progress and does not exhaustively cover the API. Additionally, it's only been used in production with Node.js version 16.15.1.

Documentation

This library is based on the Zoom Meeting API 2.0.0 REST API. More details can be found there.

This library's API can be found here.

Installation

Install via npm:

npm install @illustrative-mathematics/zoom-node

Requirements

This library uses ES6 modules and has only been tested with Node.js version 16.15.1. Be sure to set the type property in package.json to "module" to use this module:

 {
   "name": "my-zoom-app",
+  "type": "module",
   "version": "1.0.0",
   "description": "",
   "main": "index.js",

Usage

Initialize client:

import Zoom from "@illustrative-mathematics/zoom-node";

// Provide your unique values here.
const client = new Zoom({
  accountId: "xxxxx",
  clientId: "xxxxx",
  clientSecret: "xxxxx",
});

This library attempts to mirror the namespacing used in the Zoom API documentation. For example, Meetings is a separate section, so this library nests methods under meetings in the client instance. To fetch a specific meeting:

const meetingId = 12345;
// Use `client` instance from initialization above.
const data = await client.meetings.getAMeeting(meetingId);
console.log(data);

Endpoints with list/collection responses behave similarly. To fetch a list of participants using Dashboards:

const meetingId = 12345;
// Use `client` instance from initialization above.
const response = await client.dashboards.listMeetingParticipants(meetingId, {
  type: "past",
});
console.log(data.participants);

The above example demonstrates passing query string arguments.

Pagination

This library offers a couple ways to paginate endpoints with list/collection responses. To manually paginate Dashboards participants:

const meetingId = 12345;
// Use `client` instance from initialization above.
const firstPage = await client.dashboards.listMeetingParticipants(meetingId, {
  type: "past",
});
console.log(firstPage.participants);

const nextPage = await client.dashboards.listMeetingParticipants(meetingId, {
  type: "past",
  // Use `firstPage` token provided by Zoom to fetch next page.
  next_page_token: firstPage.next_page_token,
});
console.log(nextPage.participants);

List/collection items can also be paginated without manually refetching the endpoint using the for await...of statement:

const meetingId = 12345;
// Use `client` instance from initialization above.
for await (const participant of client.dashboards.listMeetingParticipants(
  meetingId,
  {
    type: "past",
  }
)) {
  // Note that this is an individual item in the list/collection response.
  console.log(participant);
}

Similarly, this can also be done for individual pages:

const meetingId = 12345;
// Use `client` instance from initialization above.
for await (const page of client.dashboards
  .listMeetingParticipants(meetingId, {
    type: "past",
  })
  .pages()) {
  // <-- Note the `.pages` call here.
  // Note that this is a page of items.
  console.log(page.participants);
}

There is also a nextPage helper:

const meetingId = 12345;
// Use `client` instance from initialization above.
const pager = client.dashboards.listMeetingParticipants(meetingId, {
  type: "past",
});
while (true) {
  const page = await pager.nextPage();
  if (!page) {
    break;
  }

  console.log(page.participants);
}

License

See the LICENSE file for license rights and limitations (MIT).