## Description
npm install @sequel.io/apiSequel 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.
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_
- 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.
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:
``ts
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:
`ts
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:
`js`
// 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.
`js`
eventService.addEvent(newEvent).then(
(data) => {
// process data.
},
(error) => {
// error handling.
}
);
networking
_Create a new networking hub_
`ts`
networking.addNetworkingHub()`
_Return a list of participants_ts`
networking.getNetworkingHubParticipants()`
_Clear all networking hub chat channels with the option to clear individual circles_ts`
networking.clearChat()`
_Set a user profile_ts`
networking.setUserProfile()`
_Invite another user to join a conversation_ts`
networking.inviteUser()`
_Register a user for the networking hub_ts`
networking.registerUser()`
_Delete a registered user from the networking hub_ts`
networking.deleteRegistrantById()`
_Return the embed code for the Networking hub component_ts`
networking.getEmbedNetworkingHubById()`
_Find NetworkingHub by ID_ts`
networking.getNetworkingHubById()`
_Updates a NetworkingHub details_ts`
networking.updateNetworkingHub()`
_Retrieves the download URL for the MP4 recording for the specified circle id and recording id_ts`
networking.getNetworkingHubCircleRecordingDownloadUrl()
company
_Find company by ID_
`ts`
company.getCompanyById()`
_Updates a company details_ts`
company.updateCompany()`
_List all companies under a parent company_ts`
company.listChildCompanies()`
_List all events under a parent company_ts`
company.listCompanyEvents()`
_Create a new company under a parent company_ts`
company.addCompanyToParent()`
_Update metadata for the company_ts`
company.updateCompanyMetadata()
event
_Create a new event_
`ts`
event.addEvent()`
_Return the embed code for the event component_ts`
event.getEmbedEventById()`
_Return a list of all registered users_ts`
event.getRegisteredUsers()`
_Register a user for the event_ts`
event.registerUser()`
_Delete a registered user from the event_ts`
event.deleteRegistrantById()`
_Delete a presenter id from the event_ts`
event.deletePresenterById()`
_Add a presenter id to the event_ts`
event.addPresenterById()`
_Delete an organizer id from the event_ts`
event.deleteHostById()`
_Add an organizer id to the event_ts`
event.addHostById()`
_Return a list of replays for this event_ts`
event.getAvailableReplays()`
_Find event by ID_ts`
event.getEventById()`
_Updates an event details_ts`
event.updateEvent()`
_Delete an event_ts`
event.deleteEvent()`
_Create a new event based on source event _ts`
event.cloneEvent()
customization
_Returns the event customization theme for all events for the company based on the business rules._
`ts`
customization.getCompanyTheme()`
_Returns the event customization theme for the event based on the business rules._ts`
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._ts`
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._ts`
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._ts`
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._ts`
customization.updateCompanyEventsCustomization()`
_Deletes the event customization theme for company. The events without their own customization will use the default Sequel Platform theme, after deletion._ts`
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._ts`
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._ts`
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._ts`
customization.deleteEventCustomization()`
_Returns list of customized fonts associated with the company_ts`
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._ts`
customization.updateCompanyCustomizedFonts()`
_Unregister the specified font associated with the specified company._ts`
customization.deleteCompanyCustomizedFonts()
usage
_Participant List with engaged minutes_
`ts`
usage.getParticipantListWithEngagedMinutesByEvent()`
_Live video watched over time_ts`
usage.getLiveVideoWatchedOverTime()`
_Top participants by event type_ts`
usage.getTopParticipantsByEventType()`
_Events summary and average engagement time_ts`
usage.getEventsSummaryAndAverageEngagementTime()`
_Lifetime usage for a company_ts`
usage.getLifetimeUsageForACompany()`
_Usage for a company in a date range_ts`
usage.getCompanyUsageByPeriod()`
_Daily minutes in a date range_ts`
usage.getDailyMinutesByPeriod()`
_Virtual stage usage by the day in a date range_ts`
usage.getDailyVirtualStageUsageByPeriod()`
_Networking usage by the day in a date range_ts`
usage.getNetworkingUsageByPeriod()`
_Get poll results_ts`
usage.getEventPollsResults()`
_Get Q&A results_ts`
usage.getEventQuestionsResults()`
_Get chat transcripts_ts`
usage.getChatTranscripts()
webhooks
_Creates a webhook subscription for the company or a particular event_
`ts`
webhooks.registerWebhook()`
_Deletes the webhook subscription based on the unique ID_ts``
webhooks.unregisterWebhook()
This SDK is distributed under the
Apache License, Version 2.0,
see LICENSE for more information.