@sequel.io/api
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

@sequel.io/api

Description

Sequel JavaScript API SDK for Node.js

With Sequel APIs, you get access to pre-built audio, video and chat components with complete customization and a user experience that takes years to build in-house. Build your live video platform in minutes, not months.

Installing

To install the this package, simply type add or install @sequel.io/api using your favorite package manager:

  • npm install @sequel.io/api
  • yarn add @sequel.io/api
  • pnpm add @sequel.io/api

Support for Browser and React Native coming soon

Getting Started

Credentials

  • In order to benefit from the SDK, you should have an account at Sequel, if you don't have it already, you can create your free trial account.

  • Once you have your account, go to the admin panel and click on the Integrations menu on the left sidebar.

  • Copy the Client ID and Client Secret values from the Sequel API integration box to be used in the next step.

Usage

The Sequel API SDK is structured in modules, please take a look at the following examples on how to use them:

Example 1: Utilizing the global sequel SDK object:

import { sequel } from "@sequel.io/api";

// Initiate the API SDK with your credentials
const sdk = sequel.configure({ 
  clientId: 'client-id',
  clientSecret: 'client-secret'
})

// Start using the available methods of the SDK
sdk.company.getCompanyById(/** input parameter */)
sdk.networking.addNetworkingHub(/** input parameters */);
sdk.event.addEvent(/** input parameters */);

Example 2: Importing the modules individually as needed:

import { sequel, event, networking, company } from "@sequel.io/api";

// Initiate the API SDK with your credentials or
// you can skip this step by setting the environment variables
// SEQUEL_API_CLIENT_ID and SEQUEL_API_SECRET_ID
sequel.configure({ 
  clientId: 'client-id',
  clientSecret: 'client-secret'
})

// Start using the available methods of the SDK
company.getCompanyById(/** input parameter */)
networking.addNetworkingHub(/** input parameters */);
event.addEvent(/** input parameters */);

The list of available modules and respective methods can be found in the Reference section.

Async/await

We recommend using await operator to wait for the promise returned by send operation as follows:

// async/await.
try {
  const event = await eventService.addEvent(newEvent);
  // process data.
} catch (error) {
  // error handling.
} finally {
  // finally.
}

Async-await is clean, concise, intuitive, easy to debug and has better error handling as compared to using Promise chains or callbacks.

Promises

You can also use Promise chaining to execute send operation.

eventService.addEvent(newEvent).then(
  (data) => {
    // process data.
  },
  (error) => {
    // error handling.
  }
);

Reference

networking

Create a new networking hub

networking.addNetworkingHub()

Return a list of participants

networking.getNetworkingHubParticipants()

Clear all networking hub chat channels with the option to clear individual circles

networking.clearChat()

Set a user profile

networking.setUserProfile()

Invite another user to join a conversation

networking.inviteUser()

Register a user for the networking hub

networking.registerUser()

Delete a registered user from the networking hub

networking.deleteRegistrantById()

Return the embed code for the Networking hub component

networking.getEmbedNetworkingHubById()

Find NetworkingHub by ID

networking.getNetworkingHubById()

Updates a NetworkingHub details

networking.updateNetworkingHub()

Retrieves the download URL for the MP4 recording for the specified circle id and recording id

networking.getNetworkingHubCircleRecordingDownloadUrl()

company

Find company by ID

company.getCompanyById()

Updates a company details

company.updateCompany()

List all companies under a parent company

company.listChildCompanies()

List all events under a parent company

company.listCompanyEvents()

Create a new company under a parent company

company.addCompanyToParent()

Update metadata for the company

company.updateCompanyMetadata()

event

Create a new event

event.addEvent()

Return the embed code for the event component

event.getEmbedEventById()

Return a list of all registered users

event.getRegisteredUsers()

Register a user for the event

event.registerUser()

Delete a registered user from the event

event.deleteRegistrantById()

Delete a presenter id from the event

event.deletePresenterById()

Add a presenter id to the event

event.addPresenterById()

Delete an organizer id from the event

event.deleteHostById()

Add an organizer id to the event

event.addHostById()

Return a list of replays for this event

event.getAvailableReplays()

Find event by ID

event.getEventById()

Updates an event details

event.updateEvent()

Delete an event

event.deleteEvent()

_Create a new event based on source event _

event.cloneEvent()

customization

Returns the event customization theme for all events for the company based on the business rules.

customization.getCompanyTheme()

Returns the event customization theme for the event based on the business rules.

customization.getEventTheme()

Returns the default event customization theme that applies to all events, unless overridden at the company and event level. This endpoint can be used for clients which update to theme or for preview. The default theme can be used as a starting point to edit new themes.

customization.getDefaultEventTheme()

Returns an array of color pallets (with primary, secondary and tertiary colors) that can be used in the editor. This endpoint can be used for clients which update to theme or for preview.

customization.getSuggestedColorPallets()

Returns the event customization theme overrides over the platform event customization theme that applies to all events for the company, unless overridden at the event level. This endpoint can be used for clients which update to theme or for preview.

customization.getCompanyEventsCustomization()

Adds or updates event customization theme overrides that will be applied to the all events for the company. This endpoint can be used by clients which update to theme or for preview.

customization.updateCompanyEventsCustomization()

Deletes the event customization theme for company. The events without their own customization will use the default Sequel Platform theme, after deletion.

customization.deleteCompanyEventsCustomization()

Returns the event customization theme overrides over the platform and event company customization theme for the event. This endpoint can be used for clients which update to theme or for preview.

customization.getEventCustomization()

Adds or updates event customization theme overrides that will be applied for the event. This endpoint can be used by clients which update to theme or for preview.

customization.updateEventCustomization()

Deletes the event customization theme overrides for the event. All events default to company specific event customization theme, if it exists or the default platform theme, after deletion.

customization.deleteEventCustomization()

Returns list of customized fonts associated with the company

customization.getCompanyCustomizedFonts()

Add new fonts for the company. The value is stored at the company level, but can be used by customization themes on both event and company levels. If the name of the font, matches the existing font, it will update the font URL.

customization.updateCompanyCustomizedFonts()

Unregister the specified font associated with the specified company.

customization.deleteCompanyCustomizedFonts()

usage

Participant List with engaged minutes

usage.getParticipantListWithEngagedMinutesByEvent()

Live video watched over time

usage.getLiveVideoWatchedOverTime()

Top participants by event type

usage.getTopParticipantsByEventType()

Events summary and average engagement time

usage.getEventsSummaryAndAverageEngagementTime()

Lifetime usage for a company

usage.getLifetimeUsageForACompany()

Usage for a company in a date range

usage.getCompanyUsageByPeriod()

Daily minutes in a date range

usage.getDailyMinutesByPeriod()

Virtual stage usage by the day in a date range

usage.getDailyVirtualStageUsageByPeriod()

Networking usage by the day in a date range

usage.getNetworkingUsageByPeriod()

Get poll results

usage.getEventPollsResults()

Get Q&A results

usage.getEventQuestionsResults()

Get chat transcripts

usage.getChatTranscripts()

webhooks

Creates a webhook subscription for the company or a particular event

webhooks.registerWebhook()

Deletes the webhook subscription based on the unique ID

webhooks.unregisterWebhook()

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.

Readme

Keywords

none

Package Sidebar

Install

npm i @sequel.io/api

Weekly Downloads

2,552

Version

0.1.6

License

none

Unpacked Size

153 kB

Total Files

119

Last publish

Collaborators

  • rorysequel
  • sequelmike
  • andreiermilov