Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

meerkat-api

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meerkat-api

Node.js wrapper for Meerkat API

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Node.js Wrapper for Meerkat API

This is a Node.js implementation of a wrapper for communicating with the Meerkat API.

Installation Instructions

npm install --save meerkat-api

Notes

  • Periodically queries Meerkat's Routing Map and modifies the API endpoints accordingly.
  • You can apply for an API token here: http://developers.meerkatapp.co/api/

Usage

var Meerkat = require('meerkat-api');

// Create an instance.
var meerkat = new Meerkat(API_TOKEN);


/**
 * Clean up when exiting.
 */
process.on('SIGINT', shutdown);
process.on('SIGTERM', shutdown);

function shutdown () {

	// Don't accept any more requests. Finish handling the current requests.
	server.close(function () {
		meerkat.dispose();
	});
}


/**
 * General requests.
 */
meerkat.getAllBroadcasts(function (err, broadcasts) {
    console.log(err || broadcasts);
});

meerkat.getScheduledBroadcasts(function (err, broadcasts) {
    console.log(err || broadcasts);
});


/**
 * Broadcast-specific requests.
 */
var broadcastId = '6a4da7ba-20f5-4f0d-81de-e5cf37b3072b';

meerkat.getBroadcastSummary(broadcastId, function (err, broadcasts) {
    console.log(err || broadcasts);
});

meerkat.getBroadcastActivities(broadcastId, function (err, activities) {
    console.log(err || activities);
});

meerkat.getBroadcastRestreams(broadcastId, function (err, restreams) {
    console.log(err || restreams);
});

meerkat.getBroadcastComments(broadcastId, function (err, comments) {
    console.log(err || comments);
});

meerkat.getBroadcastLikes(broadcastId, function (err, likes) {
    console.log(err || likes);
});

meerkat.getBroadcastWatchers(broadcastId, function (err, watchers) {
    console.log(err || watchers);
});


/**
 * User-specific requests.
 */
var userId = '54fb2e454d0000d23bb9c40f';

meerkat.getUserDetails(userId, function (err, userDetails) {
    console.log(err || userDetails);
});

Keywords

FAQs

Package last updated on 08 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc