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

nodestagram

v0.1.1

Published

Instagram API wrapper for node.

Downloads

4

Readme

Nodestagram

FORK VERSION 2016 - Bugs solved

This project started because I wanted to use instagram's API in node.js and there were no libraries yet.

Since everything is so fresh spanking new, forks/pull-requests much appreciated.

Usage

The library is intended to be used as a thin wrapper over the basic Instagram API, so the idea is to keep everything as similar to the original as possible.

Every method should be passed some parameters if needed and a callback function. The callback should accept a result and an error argument.

The convention being that when the error is null, the result contains media as returnd from the API, and when something goes wrong error is the status code as returned by the API and the result is the meta info the API returned.

For example:

var instagram = require('instagram').createClient('<client_id>', '<client_secret>');

// fetch media by id
instagram.media.id('<id>', function (images, error) { ... });

// fetch popular media
instagram.media.popular(function (images, error) { ... });

// search media
instagram.media.popular({lat: <some latitude>,
		             lng: <some longitude>},
		    function (images, error) { ... });


// get info about a tag
instagram.tags.tag('snow', function (tag, error) { ... });

// get recent media for a tag
instagram.tags.media('snow', function (tag, error) { ... });
instagram.tags.media('snow', {max_id: 5}, function (tag, error) { ... });
instagram.tags.media('snow', {min_id: 5}, function (tag, error) { ... });
instagram.tags.media('snow', {max_id: 5, min_id: 0}, function (tag, error) { ... });

// search for a tag
instagram.tags.search('snow', function (tags, error) { ... });


// get info about a location
instagram.tags.tag(1, function (tag, error) { ... });

// get recent media for a location
instagram.tags.media(1, function (tag, error) { ... });
instagram.tags.media(1, {max_id: 5}, function (tag, error) { ... });
instagram.tags.media(1, {min_id: 5}, function (tag, error) { ... });
instagram.tags.media(1, {max_id: 5, min_id: 0}, function (tag, error) { ... });

// search for a location
instagram.tags.search({lat: ..., lng: ..., distance: ...}, function (tags, error) { ... });


// get info about a specific user
instagram.users.id(1234, function (user, error) { ... });

// get recent media for a user
instagram.users.media(1234, {count: 12}, function (images, error, pagination) { ... });

// getting own media, according to given *access_token* which is a required parameter
instagram.users.self({access_token: "1337", count: 12}, function (images, error, pagination) { ... });

// search for usernames
instagram.users.search("Jack", function (users, error) { ... });
instagram.users.search({q: "John", count: 1}, function (users, error) { ... });
 	

License

Some sort of BSD or MIT license, the general idea being:

  • this is open source
  • you must give credit where credit is due
  • not viral such as GPL
  • you still can't change the license though