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 🙏

© 2026 – Pkg Stats / Ryan Hefner

streamlive-api

v0.5.2

Published

an implementation of the streamlive (caldera) api in nodeJS

Readme

streamlive-api

An implementation of the StreamLive (Caldera) API calls in nodeJS

It aims to help integrators to code the StreamLive connectors properly, and to match the API requirements. Typically, the bleeding-edge version of the API should match with the this connector master branch.

modularity

a big change from the old streamlive-sdk-js is that this implementation is modular. that means you can choose to use different modules, config files, logging system for each part of your application, depending on the need. and everything is configurable, with no default value.

the reason to do this is that we the connector's implementation shouldn't be entirely based on other peoples project that can trap us in law/technical problems in the long term.

in practice we use widely used open-source tools (nconf, nedb, bunyan, express to develop the connectors, but with this technique we might develop our own modules.

WARNING This may change soon

promises

like in the old streamlive-sdk-js, javascript promises are used to return asynchronously values from the api. the q module is used to manage this. this is not the best solution but for the moment it does the work, i don't think the module will be abandoned soon.

WARNING This may change soon

external usage

the main usage is to be required by other connectors by installing

npm install -P streamlive-api

(note that this wrapper around the API doesn't serve a connector, you should also manage this by your own ways)

instantiate the api

var config = {
    'SL_API_URL': 'http://api.linux-malves.caldera.com',
    'SL_API_ID': '5a8c336f86a2ef6b1bcabb28',
    'SL_API_SECRET': '595d44e295e8b8e2a8f8d08822056d895a8c3370006374.63342540'
    'logger': bunyan({
        name: 'Streamlive Connector - Export - API'
    });
};

// You can also use a file and parse it's content in a json object.

var api = require('streamlive-api')(config);

use the api

api.requestToken()

.then(function () {

  return api.getTemplates();
  
})
.then(function (templates) {
  // do something with the result of your call
})
.catch(function (err) {
  // handle errors
  // in most case the errors will be HTTP errors sent back by the API,
  // a good practice is to make a switch like this :
  switch (err.code) {
  	case 404:
		logger.error('Error 404', err);
		break;
  	case 500:
		logger.error('Error 500', err);
		break;
	// and so on...
  }
});

development usage

just clone the repo and get into it

create a generic connector in streamlive, copy connector id and secret into the config.json variables (connector_id, connector_secret) and specify the correct URL and ports so the connector can access to your API

then make a npm install to install requirements

and grunt to compile files and run tests

tests

a non-technician should be able to run the tests when the API gets updated, so it will be a TODO to create an environment where the connectors compability with the API can be tested. of course this is maintenance work and should be included in a long term development process. tests results are stored as xml files in the "report" folder

logs

the logs are stored in "logs", the files prefixed by "test-" are the test logs, that will be done after each run of the test suite. this is useful to have a return on the API return values the API logs are all bunyan format every API call is logged verbosely by default, if you write a production connector you may configure it for less verbosity in logs

doc

run grunt doc to generate html documentation in the doc folder. the documentation is specified directly in the slapi source with the JSDoc syntax. you can access the documentation via CURRENT_FOLDER/doc/global.html

TODO reliability of the info should be improved TODO check token returned by requestToken