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

blimp

v0.0.1

Published

Node Library for the Blimp API.

Downloads

3

Readme

blimp-node

This library allows you to interact with the Blimp API using Node. You can find more information about Blimp's Public API documentation at http://dev.getblimp.com/. If you have any problems or requests please contact [support](mailto:[email protected]?subject=Blimp API Python library).

License

Licensed under the MIT License.

Install

npm install blimp

Pre-Usage

Before we begin using the library you need to signup to Blimp and generate a new API Key if you don't have one in your settings as well as an Application ID and Secret in your applications.

Usage

var Blimp = require('blimp');

var blimp = new Blimp({
    username: 'username',
    apiKey: 'apikey',
    appId: 'appid',
    secret: 'secret'
});

// get all companies that I'm part of
blimp.get('company', function(results) {
    console.log(results);
});

// get one company by id
blimp.get('company', 1, function(results) {
    console.log(results);
});

// get all projects for one company
blimp.get('company', {company: 1}, function(results) {
    console.log(results);
});

// get count of total projects
blimp.get('project', function(results) {
    console.log(JSON.parse(results).meta.total_count);
});

// Loop through all projects and print their name
blimp.get('project', function(results) {
    JSON.parse(results).objects.forEach(function(project) {
        console.log(project.name);
    });
});

// Get all goals for a project
blimp.get('goal', {project: 1}, function(results) {
    console.log(results);
});

// Get all tasks for a goal
blimp.get('task', {goal: 1}, function(results) {
    console.log(results);
});

// Get all comments for a task
blimp.get('comment', {content_type: 'todo', object_pk: 1}, function(results) {
    console.log(results);
});

// Get schema for company endpoint
blimp.schema('company', function(schema) {
    console.log(schema);
});

// All available methods per endpoint
// blimp.get(resource, [id], [params], callback)
// blimp.post(resource, data, [params], callback)
// blimp.put(resource, id, [params], data, callback)
// blimp.del(resource, id, callback)
// blimp.schema(resource, callback)

Example response of all companies I'm part of

{
    "meta": {
        "limit": 20,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 1
    },
    "objects": [
        {
            "company_users": [
                {
                    "accepted_invitation": true,
                    "date_created": "2012-11-01T00:00:00",
                    "date_modified": "2012-11-27T02:22:09.817265",
                    "id": 38,
                    "is_active": true,
                    "role": "admin",
                    "user": "/api/v2/user/3/"
                },
                {
                    "accepted_invitation": true,
                    "date_created": "2012-11-01T00:00:00",
                    "date_modified": "2012-11-27T02:22:09.705959",
                    "id": 37,
                    "is_active": true,
                    "role": "admin",
                    "user": "/api/v2/user/2/"
                },
                {
                    "accepted_invitation": true,
                    "date_created": "2012-11-01T00:00:00",
                    "date_modified": "2012-11-27T02:22:09.380851",
                    "id": 39,
                    "is_active": true,
                    "role": "owner",
                    "user": "/api/v2/user/1/"
                }
            ],
            "date_created": "2012-11-01T00:00:00",
            "date_modified": "2012-12-21T21:57:09.965247",
            "id": 1,
            "image_url": "",
            "name": "Blimp",
            "resource_uri": "/api/v2/company/1/",
            "slug": "blimp",
            "used_projects": 0,
            "used_storage": "4929882"
        }
    ]
}

Improvements

What else would you like this library to do? Let me know. Feel free to send pull requests for any improvements you make.

Todo

  • Tests