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

bbb-api-ts

v1.0.0

Published

JavaScript wrapper for BigBlueButton API

Downloads

117

Readme

BigBlueButton js UPDATED

This library is based on the original bigbluebutton-js, providing updates for deprecated packages and full TypeScript typing for a more robust and modern development experience. This is a layer to interact with BigBlueButton API.

Features

  • Supports BBB API
  • Provides methods to construct URLs, and calculate SHA checksum
  • Provides HTTP client that converts XML responses to JS objects

Installation

npm i bbb-api-ts

Usage

You will need to provide BigBlueButton URL and secret to the script. You can obtain them by logging into you BBB server, and running:

bbb-conf --secret

Use the obtained values in your script:

const bbb = require('bigbluebutton-js')
let api = bbb.api(process.env.BBB_URL, process.env.BBB_SECRET)

Examples

The following example shows how to create a room, and links for moderator and attendee to join:

const bbb = require('bigbluebutton-js')

// BBB_URL and BBB_SECRET can be obtained
// by running bbb-conf --secret on your BBB server
// refer to Getting Started for more information
let api = bbb.api(process.env.BBB_URL, process.env.BBB_SECRET)
let http = bbb.http

// api module itself is responsible for constructing URLs
let meetingCreateUrl = api.administration.create('My Meeting', '1', {
  duration: 2,
  attendeePW: 'secret',
  moderatorPW: 'supersecret',
})

// http method should be used in order to make calls
http(meetingCreateUrl).then((result) => {
  console.log(result)

  let moderatorUrl = api.administration.join('moderator', '1', 'supersecret')
  let attendeeUrl = api.administration.join('attendee', '1', 'secret')
  console.log(`Moderator link: ${moderatorUrl}\nAttendee link: ${attendeeUrl}`)

  let meetingEndUrl = api.administration.end('1', 'supersecret')
  console.log(`End meeting link: ${meetingEndUrl}`)
})

a

Tests

To run the test suites some prior configuration is required. First, create a .env file in library root. The file should have the following content:

BBB_URL=https://mysite.com/bigbluebutton
BBB_SECRET=MySuperSecretSharedToken

Make sure, you installed development dependencies (vitest, and dotenv). Now you can run npm run test:

npm run test

Acknowledgments