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

cine-io

v0.2.1

Published

node package for cine.io

Readme

cine.io node pakage

Build Status

The node package for cine.io.

Installation

npm install --save cine-io

Usage

Initialization

CineIO = require('cine-io');
client = CineIO.init({secretKey: 'my secret'});
client = CineIO.init({secretKey: 'my secret', masterKey: 'the account master key'}); //needed for fetching all projects

Functions

Projects

To get data about your projects:

client.projects.index(function(err, projects){});
// projects is an array of simple javascript objects: [{id: 'project id', name: 'project name', …}, …]

Project

To get data about your project:

client.project.get(function(err, project){});
// project is a simple javascript object: {id: 'project id', name: 'project name', …}

To update your project attributes:

// params
//  name: 'a new project name'
client.project.update(params, function(err, project){});
// project is a simple javascript object: {id: 'project id', name: 'a new project name', …}

To delete your project and all associated streams:

client.project.destroy(function(err, project){});
// project is a simple javascript object that will include deletedAt: {id: 'project id', name: 'project name', deletedAt: 'ISO date' …}

Streams

To get all your streams:

client.streams.index(function(err, streams){});
client.streams.index({name: 'my custom name'}, function(err, streams){});
// streams is an array of javascript objects: [{id: 'stream id', play: {rtmp: 'the rtmp url', hls: 'the hls url'}, publish: {stream: 'the stream name', url: 'the publish url'}, …}, …]

To get a specific stream:

client.streams.get('STREAM_ID', function(err, stream){});
// stream is a simple javascript object: {id: 'stream id', …}

To create a new stream:

client.streams.create(function(err, stream){});
// stream is a simple javascript object: {id: 'stream id', …}
// can optionally take params
// params:
//  name: 'an optional stream name'
//  record: true|false (default false). record: true will save recordings of all streaming sessions
client.streams.create(params, function(err, stream){});
// stream is a simple javascript object: {id: 'stream id', name: 'an optional stream name', …}

To update a stream:

// params:
//  name: 'a new stream name'
//  record: true|false (updating a stream from true to false will not delete old stream recordings)
client.streams.update(params, function(err, stream){});
// stream is a simple javascript object: {id: 'stream id', name: 'a new stream name', …}

To delete a specific new stream:

client.streams.destroy('STREAM_ID', function(err, stream){});
// stream is a simple javascript object that will include deletedAt: {id: 'stream id', deletedAt: 'ISO Date', …}

To fetch the Flash Media Live Encoder profile for a stream:

client.streams.fmleProfile('STREAM_ID', function(err, profile){});
// profile is a string of the contents of the Flash Media Live Encoder profile.

Stream Recordings

To get all your stream recordings:

client.streams.recordings('STREAM_ID', function(err, streamRecordings){});
// streamRecordings is an array of javascript objects: [{name: 'stream id', url: 'the playable url', size: size in bytes as integer, date: 'ISO Date of recording'}, …}, …]

To delete a specific new stream:

client.streams.recordings.destroy('STREAM_ID', 'RECORDING_NAME', function(err, stream){});
// streamRecording is a simple javascript object that will include deletedAt: {deletedAt: 'ISO Date'}

Peer

Identity Signature Generation

var identity = "Unique user name to your app";
response = client.peer.generateIdentitySignature(identity);
// response looks like {signature: "sha1-hash", timestamp: 1420258111, identity: "Unique user name to your app"}

Usage

Use these api endpoints to fetch the monthly usage for a project or a stream.

Project Usage

var options = {month: new Date, report: ['bandwidth, 'peer']};
response = client.usage.project(options, function(err, response){});
// response looks like {bandwidth: 12345, storage: 54321, month: "month (ISO 8601 format)", secretKey: "YOUR SECRET KEY"}
// bandwidth and storage are represented in bytes

Stream Usage

var id = 'STREAM_ID';
var options = {month: new Date, report: ['bandwidth, 'peer']};
response = client.usage.stream(id, options, function(err, response){});
// response looks like {bandwidth: 12345, storage: 54321, month: "month (ISO 8601 format)", secretKey: "YOUR SECRET KEY", id: "STREAM_ID"}
// bandwidth and storage are represented in bytes

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request