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

scribblelive

v0.1.4

Published

A node.js library for ScribbleLive

Downloads

5

Readme

scribblelive-node

A node.js library for ScribbleLive

##Install npm install scribblelive

##Objects

###Post { id: 1234, content: 'Hello world', creator: { id: 1234, name: 'Jonathan Keebler', avatar: '' }, is: { comment: false, deleted: false, stuck: false, approved: true }, source: '', type: 'TEXT', date: { created: "Wed Jan 21 2015 22:50:36 GMT-0500 (EST)", modified: "Wed Jan 21 2015 22:50:36 GMT-0500 (EST)" } }

###Event { count: { comments: 0, posts: 0, syndicated_comments: 0 }, creator: { name: 'Jonathan Keebler' }, date: { created: Thursday, January 22, 2015 00:57:57.000 GMT-0500, end: Thursday, January 22, 2015 03:57:57.000 GMT-0500, modified: Thursday, January 22, 2015 00:57:57.000 GMT-0500, start: Thursday, January 22, 2015 00:57:57.000 GMT-0500 }, description: 'DESCRIPTION', id: 1234, is: { commenting: false, deleted: false, discussion: false, hidden: false, live: true, moderated: false, syndicatable: false, syndicated: false }, language: 'en', title: 'TITLE' }

###Article { creator: { avatar: 'http://avatars.scribblelive.com/2014/3/6/0383af1d-1146-4fa5-af0f-840ec1905384.jpg', id: 1, name: 'Jonathan Keebler' }, date: { created: Wednesday, January 07, 2015 14:11:59.000 GMT-0500 }, id: 7890, is: { active: true, draft: true, published: false }, title: 'TITLE', snippet: 'BODY TEXT' }

##Usage

###Setup var ScribbleLive = require("scribblelive"); var scribble = new ScribbleLive({ token: "YOUR_TOKEN", credentials: { email: "[email protected]", password: "YOUR_PASSWORD" } });

###References The following lines are equivalent

scribble.client(1234).event(4567).start();

var client = scribble.client(1234);
client.event(4567).start();

var event = scribble.client(1234).event(4567);
event.start();

###Get an existing event scribble.client(1234).event(5678).get(function(err, event) { ... });

###Create a new event scribble.client(1234).create( { title: "YOUR_TITLE" }, function(err, event) { ... });

###Add a post scribble.client(1234).event(5678).post( { content: "Hello world" }, function(err, post) { ... });

###Get the posts in an event var options = null; // all posts options = {page: 10, size: 50}; // posts on page 10 where each page has 50 posts options = {page: "last", size: 50}; // posts on the last page where each page has 50 posts

scribble.client(1234).event(5678).posts(options).get(function(err, posts)
{
	...
});

###Get a client's events var options = null; // all events options = {live: true}; // just the live events options = {live: true, upcoming: true}; // just the live or upcoming events options = {max: 10}; // return up to a maximum of 10 events

scribble.client(1234).events(options).get(function(err, events)
{
	...
});

###Start an event scribble.client(1234).event(5678).start(function(err, event) { ... });

###End an event scribble.client(1234).event(5678).end(function(err, event) { ... });

###Delete an event scribble.client(1234).event(5678).delete(function(err, success) { ... });

###Get a client's articles scribble.client(1234).articles({max: 10}).get(function(err, articles) { ... });

###Get an article scribble.client(1234).article(7890).get(function(err, article) { ... });

###Get a client's metrics var start = 1411516800000; // supports milliseconds since epoch, date object, "today" var end = new Date(1412121599000); // OPTIONAL returns metrics for all the days between start and end

scribble.client(1234).metrics().date(start, end).get(function(err, metrics)
{
	// metrics[0] = {engagementminutes: 100, pageviews: 10, uniques: 1};
	...
});

scribble.client(1234).metrics("pageviews", "uniques").date(start).get(function(err, metrics)
{
	// metrics = {pageviews: 10, uniques: 1};
	...
});
	

###Get an event's metrics Total metrics over all time:

scribble.client(1234).event(5678).metrics().get(function(err, metrics)
{
	// metrics = {engagementminutes: 100, pageviews: 10, uniques: 1};
	...
});

Metrics over a date range:

scribble.client(1234).event(5678).metrics().date(start, end).get(function(err, metrics)
{
	// metrics[0] = {engagementminutes: 100, pageviews: 10, uniques: 1};
	...
});

Pageviews and uniques on a particular date:

scribble.client(1234).event(5678).metrics("pageviews", "uniques").date(start).get(function(err, metrics)
{
	// metrics = {pageviews: 10, uniques: 1};
	...
});