1.6.0 • Published 9 years ago

instagram-node-api v1.6.0

Weekly downloads
11
License
ISC
Repository
github
Last release
9 years ago

instagram-node-api Build Status [Depencies status](https://david-dm.org/squidit/instagram-node-api/) Standard - JavaScript Style Guide

BETA - A node wrapper to Instagram API 😄

Status

Another's coming soon.

Usage

npm install --save instagram-node-api

const InstagramNodeApi = require('instagram-node-api');

const instagramNodeApi = new InstagramNodeApi(YOUR_ACCESS_TOKEN);

instagramNodeApi.on('data', ([*]) => { });
instagramNodeApi.on('finish', ([*]) => { });
instagramNodeApi.on('err', (error) => { });

Users

Search users by quering username.

instagramNodeApi.userSearch(username);

instagramNodeApi.on('data', (profiles, meta, remaining, limit, result) => {
});

instagramNodeApi.on('finish', (profiles, meta, remaining, limit, result) => {
});

Get information about the owner of the access_token.

instagramNodeApi.usersSelf();

instagramNodeApi.on('data', (profile, meta, remaining, limit, result) => {
});

instagramNodeApi.on('finish', (profile, meta, remaining, limit, result) => {
});

Get information about the user

instagramNodeApi.user(id);

instagramNodeApi.on('data', (profile, meta, remaining, limit, result) => {
});

instagramNodeApi.on('finish', (profile, meta, remaining, limit, result) => {
});

Get the most recent media published by the id of the user

instagramNodeApi.usersMediaRecent(userid);

instagramNodeApi.on('data', (data, pagination, meta, remaining, limit, result) => {
});

instagramNodeApi.on('finish', (data, pagination, meta, remaining, limit, result) => {
});

instagramNodeApi.on('err', (error) => { });

Get the most recent media published by the owner of the access_token..

instagramNodeApi.usersSelfMediaRecent();

instagramNodeApi.on('data', (data, pagination, meta, remaining, limit, result) => {
});

instagramNodeApi.on('finish', (data, pagination, meta, remaining, limit, result) => {
});

instagramNodeApi.on('err', (error) => { });

Tags

Get the most recent media published by the owner of the access_token..

instagramNodeApi.tagsMediaRecent(tagName, [dateLimit = null], [limit = 0]);

instagramNodeApi.on('data', (data, pagination, meta, remaining, limit, result) => {
});

instagramNodeApi.on('finish', (data, pagination, meta, remaining, limit, result) => {
});

instagramNodeApi.on('err', (error) => { });
  • tagName: String
  • dateLimit: Date
  • limit*: Number

Usage

instagramNodeApi.tagsMediaRecent(tagName); // => Returns last 33 medias from tag
instagramNodeApi.tagsMediaRecent(tagName, new Date()); // => Stop the search when founded some media which is greater than the date informed
instagramNodeApi.tagsMediaRecent(tagName, new Date(), 1000); // => Stop the search when founded some media which is greater than the date informed or the limit
instagramNodeApi.tagsMediaRecent(tagName, 1000); // => Stop the search when the number of founded medias is greater than the limit informed

Tests

Include a .env file with:

TEST_INSTAGRAM_ACCESS_TOKEN=YOUR_ACCESS_TOKEN

And just run npm test

Contributing

Currently this is very basic for my needs, PRs are welcome 🙏

1.6.0

9 years ago

1.5.0

9 years ago

1.4.0

9 years ago

1.3.0

9 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago