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

robin.io-js

v0.4.6

Published

<h1 align="start"> Robin.io-js </h1>

Readme

Table of contents

View Documentation Here

Introduction

Robin.io-js is a Javascript SDK built to communicate with the Robinapp API. Now you can integrate Robin.io with minimal effort and quickly setup a real-time messaging platform in your Web application.

Interactive Demo

Checkout the Interactive Demo here. You can also checkout the sample repository here.

Prerequisites

This library supports the following browsers:

| Browser | Supported versions | | :---------------: | :--------------------- | | Internet Explorer | 10 or higher | | Edge | 13 or higher | | Chrome | 16 or higher | | Firefox | 11 or higher | | Safari | 7 or higher | | Opera | 12.1 or higher | | iOS Safari | 7 or higher | | Android Browswer | 4.4 (Kitkat) or higher |

Getting started

Step 1: Create a Robinapp account

A Robinapp account comprises everything required in a chat service including users, message, and api-keys. To create an application:

  1. Go to the Robinapp Dashboard and enter your email and password, and create a new account.
  2. Navigate to Api Config and copy your API key

Note: All the data is limited to the scope of a single user account, thus the users in different Robinapp accounts are unable to chat with each other.

Step 2: Install the Chat SDK

  ## NPM

  npm install robin.io-js --save

  OR

  ## YARN

  yarn add robinapp.io-js

Sending your first message

Follow the step-by-step instructions below to authenticate and send your first message.

Authentication

To use the features of the Chat SDK in your client app, a robin instance must be initiated in each client app before user authentication with Robin server. These instances communicate and interact with the server based on an authenticated user account, allowing for the client app to use the Chat SDK features.

Step 1: Initialize the Chat SDK

You need to initialize a robin instance before authentication. Initialization binds the Chat SDK to Javascript’s context which allows the Chat SDK to respond to connection, state changes and also enables client apps to use the Chat SDK features.

To initialize a Robin instance, pass the API key as the first argument to in the new Robin() method, You can find your API key in the API Configuration tab in your Robin Account.

Then true or false for as the second parameter as it tells the sdk whether to load with ssl or not. As the new Robin() can only be a single instance, call it only a single time across your Javascript client app. Typically, initialization is implemented in the user login screen.

Note: It is recommended to initialize the Chat SDK at the top of your Javascript file.

const robin = new Robin('<api_key>', true);

Step 2: Connect to Robin server

You'll need a USER_TOKEN to connect to the Robin server.

A. Create User Token

Create user token

const response = await robin.createUserToken({
  meta_data: {
    username: 'elvis',
  },
});

Connect to the Robin server using the USER_TOKEN you just created.

robin.connect(USER_TOKEN);

Step 3: Channels

All messages sent via Robin are sent through channels, you can consider channels as tunnels that relay messages to all connected clients.

Step 4: Create a conversation

Before we can send a message to a channel we first need to create a converstion.

const response = await robin.createConversation({
  sender_name: string,
  sender_token: string,
  receiver_token: string,
  receiver_name: string
})

Step 5: Send a message to a conversation

Finally, send a message to a conversation.

robin.sendMessageToConversation(msg: object, conn: WebSocket, channel:string,conversation_id: string, senderToken?: string);

Options

The following are general attributes used in Robin:

| Attribute | Type | Default | Description | | :------------: | :-------: | :-----: | :------------------------------------------------------- | | Conn | WebSocket | null | Websocket opbject returned after calling robin.connect() | | sender_name | String | '' | Name of the person sending the message | | sender_token | String | '' | USER_TOKEN of the person sending the message | | receiver_name | String | '' | Name of the person receiving the message | | receiver_token | String | '' | USER_TOKEN of the person receiving the message | | msg | Object | {} | Json serializable object containing the message |

If you have any comments or questions regarding bugs and feature requests, visit Robinapp community.

View Documentation Here.

License

Distributed under the MIT License. See LICENSE for more information.