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

beekeeper

v0.15.2

Published

A library wrapping requests to the Beekeeper API for easy access

Downloads

418

Readme

Beekeeper JavaScript SDK

An API wrapper for Beekeeper to give easy access to services from the ecosystem. This library can be used on the client and server. Please see required adoption below.

Beekeeper is a mobile-first communication platform that reaches every shift, location, and language through real-time messaging and targeted streams. Managers keep frontline teams productive and turnover low by automating workflows, while leveraging an analytics dashboard to measure engagement. Beekeeper integrates with existing operational systems and makes them accessible in one central portal.

Learn more about Beekeeper at https://beekeeper.io.

Installation

Install NPM package with:

$ yarn add beekeeper // npm install --save beekeeper

Optional dependencies

Some features require additional dependencies:

If you are using this package with Node.js, please also add the optional dependency node-fetch:

$ yarn add node-fetch

If you want to use the realtime capabilities (e.g. Chatbots), please also add the optional dependency pubnub;

$ yarn add pubnub

If you need to upload files, please also add the optional dependency axios:

$ yarn add axios

If you need to upload files and the project is running on Node.js form-data is required in addition to axios:

$ yarn add form-data

Tenant Access

In order to use this package on a tenant, you will need to gather two pieces of information:

  • Tenant URL e.g. https://tenant.beekeeper.io
  • Bot Access Key e.g. fae00bbc-b0f6-4ace-8e13-7d53b58076e1

Read more about it in the Help Center.

SDK API

The SDK gives access to multiple domains at Beekeeper. Here are the different resources.

General

sdk.getMe() gets information about the current user

Messages

sdk.Messages.create(message) creates a new message

Profiles

sdk.Profiles.get(username) gets a profile by username
sdk.Profiles.list(filter) returns a list of users with optional filter that can be {limit: 50}. This is an ADMIN resource.

Conversations

sdk.Conversations.byProfile(profile) gets a conversation by username

Posts

sdk.Posts.create(post) create a new post

Streams

sdk.Streams.list() gets a list of streams

Files

sdk.Files.create() uploads a file

Artifacts

sdk.Artifacts.get(query) returns a root artifact with optional query that can be { expand: 'children' | 'breadcrumbs' | 'acl', visibility: 'read' | 'manage' }

sdk.Artifacts.getById(artifactId, query) gets the artifact by artifactId with optional query that can be { expand: 'children' | 'breadcrumbs' | 'acl', visibility: 'read' | 'manage' }

sdk.Artifacts.getAclById(artifactId) gets the Acl by artifactId

sdk.Artifacts.create(artifactId, body, query) creates a new artifact by artifactId with optional query that can be { expand: 'children' | 'breadcrumbs' | 'acl' }

sdk.Artifacts.update(artifactId, body, query) updates an existing artifact with optional query that can be { expand: 'children' | 'breadcrumbs' | 'acl' }

sdk.Artifacts.updateAcl(artifactId, body) updates existing acl on an artifact

sdk.Artifacts.delete(artifactId) deletes an existing artifact

ChatBot

An easy way to get started with the Beekeeper SDK is a chatbot. An example is shown below:

const { ChatBot } = require('beekeeper');

const credentials = {
    tenantURL: 'https://<tenant>.beekeeper.io',
    token: '540a254c-ea8b-4ae7-a456-d8437b7314d6',
};

const bot = ChatBot.withCredentials(credentials);

bot.on('message', (message, ctx) => {
    // Listen to new messages and reply with received text
    ctx.replyWithText(message.text);
});

bot.on('started', () => {
    // Listen for started event and indicate readiness
    console.log('Bot is started!');
});

// Start listening for events
bot.start();

More examples can be found in the examples folder.