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 🙏

© 2025 – Pkg Stats / Ryan Hefner

coviu-js-sdk

v0.1.3

Published

Top level coviu api javascript client library

Downloads

38

Readme

coviu-js-sdk - Top level coviu api javascript client library

Coviu provides a session based API for creating and restricting access to coviu calls. The core concepts exposed are

  • Session: A coviu call that occurs between two or more parties at a specified time, and has a finite duration.
  • Participants: Users who may participate in a coviu call.

Participants join a call by following a session link in their browser, or mobile app. The session link identifies the participant, including their name, optional avatar, and importantly their role. As such, it is important that each person joining the call be issued a different session link, i.e. have a distinct participant created for them. A participant's role identifies whether that user may access the call directly, or if they are required the be let in by an existing participant.

coviu-js-sdk exposes this functionality through a convenient js library.

Installation

npm install --save coviu-js-sdk

Quickstart

Setup the sdk by passing in your api key and key secret

var sdk = require('coviu-js-sdk');

var apiKey = 'my_api_key_from_coviu.com';
var keySecret = 'my_api_key_secret';

var coviu = sdk(apiKey, keySecret);

Schedule a session for the future.


var session =  {
  session_name: "A test session with Dr. Who",
  start_time: 'Wed, 08 Jun 2016 13:34:00 GMT',
  end_time: 'Wed, 08 Jun 2016 13:44:00 GMT',
  picture: 'http://www.fillmurray.com/200/300',
  participants: []
};

coviu.sessions.createSession(session).run().then(console.log);

Example output

{
  team_id: '936c863f-ccff-4775-9011-cd17f4b5ad75',
  client_id: '07c0fdbd-9089-4943-aa0b-2b01754f42e7',
  participants: [],
  session_id: '09ef6778-3714-4dd6-91ec-d2868365c4ef',
  session_name: 'A test session with Dr. Who',
  start_time: 'Wed, 08 Jun 2016 13:34:00 GMT',
  end_time: 'Wed, 08 Jun 2016 13:44:00 GMT',
  picture: 'http://www.fillmurray.com/200/300'
}

coviu.sessions.* is a collection of functions that build requests that can be run against the api. In order to run the request, the .run() method must be called, which returns a promise of the result.

It's important to notice that the string format for start_time and end_time is RFC-1123, which specifies the UTC timezone.

You can now add a participant to the session

var host = {
  display_name: "Dr. Who",
  role: "host", // or "guest"
  picture: "http://fillmurray.com/200/300",
  state: "test-state"
};
var sessionId = '09ef6778-3714-4dd6-91ec-d2868365c4ef';
api.sessions.addParticipant(sessionId, host).run().then(console.log);

Example output

{
  client_id: '07c0fdbd-9089-4943-aa0b-2b01754f42e7',
  display_name: 'Dr. Who',
  entry_url: 'https://coviu.com/session/e3c40e88-2b19-49bd-b687-1c08e4e0e124',
  participant_id: 'e3c40e88-2b19-49bd-b687-1c08e4e0e124',
  picture: 'http://fillmurray.com/200/300',
  role: 'HOST',
  session_id: '09ef6778-3714-4dd6-91ec-d2868365c4ef',
  state: 'test-state'
}

Notice the entry_url for the newly created participant. Following this url in a browser or in one of the coviu mobile between start_time and end_time (while the session is active), will join the participant into the session, assuming the role and identity provided.

We can now read the entire session structure back

api.sessions.getSession('09ef6778-3714-4dd6-91ec-d2868365c4ef').run().then(console.log).catch(console.error);

Example output

{
  team_id: '936c863f-ccff-4775-9011-cd17f4b5ad75',
  client_id: '07c0fdbd-9089-4943-aa0b-2b01754f42e7',
  session_id: '09ef6778-3714-4dd6-91ec-d2868365c4ef',
  session_name: 'A test session with Dr. Who',
  start_time: 'Wed, 08 Jun 2016 13:35:44 GMT',
  end_time: 'Wed, 08 Jun 2016 13:45:44 GMT',
  picture: 'http://www.fillmurray.com/200/300',
  participants:[{
    client_id: '07c0fdbd-9089-4943-aa0b-2b01754f42e7',
    display_name: 'Dr. Who',
    entry_url: 'https://coviu.com/session/e3c40e88-2b19-49bd-b687-1c08e4e0e124',
    participant_id: 'e3c40e88-2b19-49bd-b687-1c08e4e0e124',
    picture: 'http://fillmurray.com/200/300',
    role: 'HOST',
    session_id: '09ef6778-3714-4dd6-91ec-d2868365c4ef',
    state: 'test-state'
  }]
}

There's a full set of api documents provided with api source for the coviu-sdk-api npm module at https://github.com/coviu/coviu-sdk-api/blob/master/libs/sessions.js