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

@hopin.com/integrations-sdk

v0.5.2

Published

Javascript SDK for built in-event apps on Hopin

Downloads

73

Readme

Hopin Integrations SDK

Build apps on Hopin. Grow your business.

The Integrations SDK gives you, the developer, a way to build apps using common web technologies which can interact with parts of Hopin not otherwise exposed via our public APIs. In practical terms, that means being able to read and control state which only exists within the browser.

The SDK is currently an invite-only program. For further details and to express your interest, please visit https://hopin.com/developers.

Geting Started

Add the NPM package to your project (npm i @hopin.com/integrations-sdk), then:

import { connectToHost } from '@hopin.com/integrations-sdk';

// Setup the SDK (only do this once) 
const sdk = await connectToHost();

// sdk.user is a SyncMapItem, we can retrieve it directly...
const user = sdk.user.get();

// ... and listen changes to it's value
sdk.user.listen(updatedUser => {
  console.log(updatedUser);
});

// We can also invoke methods that affect behaviour in Hopin.
await sdk.media.mute();

Async Methods

All methods called on an instance of the SDK are async -

// If we care about success/error or need a return value, we must await the result.
await sdk.media.mute();

// or equivalently using Promises 
sdk.media.mute().then(() => {
  // done
})

SyncMapItem

Where data is exposed into your app from Hopin, it is provided via an instance of SyncMapItem. This wrapper boxes the underlying value with some methods which make it easier to listen to updates over time. It's interface is simple:

const user = sdk.user;

user.get(); // Retrieves the current user.
user.listen(updatedUser => {
  // Our callback is fired with the latest value each time the user is updated.
});

Sandboxing

Apps run within Hopin inside a iframe which is sandboxed. In practice, this is similar to fairly strict Content Security Policy - your app will not have access to many browser APIs. At the time of writing, these include:

  • Cookies & Local/Session Storage
  • window.open
  • Synchronous modals (alert / confirm etc)
  • Form submissions
  • File downloads
  • Pointer Lock
  • PresentationRequest

More Docs

Further documentation is currently provided within the package (see the docs) folder.

Other Useful Packages

We strive to maintain impartiality from view libraries in this package, however if you're using React, you may find @hopin.com/integrations-sdk-react useful.