0.1.0 • Published 8 years ago

@wrapi/instagram v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

Instagram API Wrapper

Client interface for accessing Instagram API.

Installation

Install via npm

npm install @wrapi/instagram --save

Usage

Create a client object to connect to Instagram API endpoints.

var instagramWrapi = require('@wrapi/instagram');

var client = new instagramWrapi(INSTAGRAM_ACCESS_TOKEN);

// Now you are ready to make API calls to Instagram.

Provide parameters and a callback.

API calls follow this syntax:

client.apigroup.action(param1, ..., queryString, callback);

  • param - (if required) url parameters - eg: For users.get the value for :user-id.
  • queryString - (as required) API method parameters as key-value pairs.

Examples

Get information about the user of the access_token.

client.users.self(function(err, data) {
  if (!err) {
    console.log(data);
  } 
});

Get the most recent media published by a user.

client.users.media.recent('1574083', function(err, data) {
  if (!err) {
    console.log(data);
  }	
});

List of media recently tagged as spring.

client.tags.media.recent('spring', function(err, data) {
  if (!err) {
    console.log(data);
  } 
});

Search for recent media in a given location within 5km range. (What's happening in your area)

client.media.search({lat:'48.858844', lng:'2.294351', distance:5000}, function(err, data) {
  if (!err) {
    console.log(data);
  } 
});

API Functions

User Endpoints

Relationship Endpoints

Media Endpoints

Comment Endpoints

Like Endpoints

Tag Endpoints

Location Endpoints

License

MIT