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

rubiconproject-api-node

v1.0.1

Published

Rubicon Project API module

Downloads

175

Readme

rubiconproject-api-node

Rubicon api node

Simple rubicon api module.

Initialization

npm install --save rubiconproject-api-node;

let  rbc  =  new (require('rubiconproject-api-node'))(
    { 
	    auth: {
		    endpoint:  'api.rubiconproject.com',
		    key:  'YOUR API KEY',
		    secret:  'YOUR API SECRET',
		    accountId:  YOUR ACCOUNT ID
		}
	}
);

Inventory

Sites

List sites
rbc.inventory.getSites((err, response) => {
	console.dir(err);
	console.dir(response);
});
Get site details
rbc.inventory.getSite(SITE_ID, (err, response) => {
	console.dir(err);
	console.dir(response);
});
Update site
rbc.inventory.updateSite(SITE, (err, response) => {
	console.dir(err);
	console.dir(response);
});
Create site
rbc.inventory.createSite(SITE, (err, response) => {
	console.dir(err);
	console.dir(response);
});

Zones

List zones

rbc.inventory.getZones((err, response) => {
	console.dir(err);
	console.dir(response);
});
Get zone details
rbc.inventory.getZone(ZONE_ID, (err, response) => {
	console.dir(err);
	console.dir(response);
});
Update zone
rbc.inventory.updateZone(ZONE, (err, response) => {
	console.dir(err);
	console.dir(response);
});
Create zone
rbc.inventory.createZone(ZONE, (err, response) => {
	console.dir(err);
	console.dir(response);
});

Objects

Site

{ 
	siteId: Number,
	name: String,
	displayName: String,
	domain: String,
	inventoryTypeId: Number,
	contentCategoryIds: Array<String>,
	sizeIds: Array<Number>,
	groups: Array<String>
}

Site Object

| Field | Required | Type | Details | Example | | --- | --- | --- | --- | --- | | siteId | Put, Get | Integer | The unique identifier of the site. | 1234 | | name | Post, Put | String | The name of the site or inventory source | Fishing News | | domain | Post, Put | String | the primary domain of the site or inventory source (or reverse domain for mobile applications) | http://www.fishingnews.com | | displayName | Post, Put | String | The name of the inventory as it should be presented in UIs and 3rd parties | Fishing News | | invetoryTypeId | No | Integer | The inventory type:
108721 = Standard Web, 108723 = Mobile Optimized Web, 108725 = Mobile Application | 108721 | | contentCategoryIds | No | Array of Strings | A list of the IAB content categories for the site (see: IAB Content Categories) | ["IAB1"] | | sizeIds | No | Array of Integers | A list of the IDs of the sizes that the inventory source will support (Supported Ad Formats) | [2,9,12]|

Zone

{
	zoneId: Number,
	name: String,
	siteId: Number,
	contentCategoryIds: Array<String>,
	sizeIds: Array<Number>,
	inheritSiteSizes: Boolean
}

Zone Object

| Field | Required | Type | Details | Example | | --- | --- | --- | --- | --- | | zoneId | Put, Get | Integer | The unique identifier of the zone. | 4567 | | siteId | Post, Put | Integer | The unique identifier of the site with which the zone is associated. | 1234 | | name | Post, Put | String | The name of the zone | ATF | | contentCategoryIds | No | Array of Strings | A list of the IAB content categories for the zone (see: IAB Content Categories) | ["IAB3"] | | inheritSiteSizes | No | Boolean | True or false value indicated whether or not to inherit the sizeIds configured on the site. | false | | sizeIds | No | Array of Integers | A list of the IDs of the sizes that the zone will support (Supported Ad Formats) | [2,9,15]|

#WIP...