ins

instagood

A simple library with actions that instagram API don't have.

Showing:

Popularity

Downloads/wk

1

GitHub Stars

7

Maintenance

Last Commit

2yrs ago

Contributors

2

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Readme

instagood

A simple library with actions that instagram API don't have.

NPM

Maintainability Build Status Dependencies Status

Install via Package Managers

$ npm i instagood

Dependencies

Tests

Tutorial

First of all, if you want to use instagood, you need to get some infos manually (at this moment):

  1. Login to instagram web
  2. Open devtools
  3. Enable log requests (network tab)
  4. Follow someone
  5. In network tab, open 'follow/' request log
  6. Get what you need in 'Request Headers' section

How to get csrftoken and session id

Save x-csrftoken and sessionid (note that sessionid is inside a parameter string, so copy the code after = until ;).

Usage

Import instagood

const instagood = require('instagood');

Instance a new user (for csrftoken and sessionid see Tutorial section)

Note: user must be the logged one (the one who you got csrftoken and sessionid). If you logout, your csrftoken and sessionid will be removed from instagram auth.

const user = new instagood('user', 'csrftoken', 'sessionid');

Get user information

user.getUserInfo('reidarking').then((response) => console.log(response), (err) => console.log(err));

Get user followers

user.getFriendships('followers', 'reidarking', 20).then((response) => console.log(response.followers), (err) => console.log(err));

Get user following

user.getFriendships('following', 'reidarking', 20).then((response) => console.log(response.followers), (err) => console.log(err));

Follow someone (in this case, me)

user.friendships('follow', 'reidarking').then((response) => console.log(response), (err) => console.log(err));

Unfollow someone

user.friendships('unfollow', 'reidarking').then((response) => console.log(response), (err) => console.log(err));

Like any media

user.likes('like', '1973268968068413381').then((response) => console.log(response), (err) => console.log(err));

Unlike any media

user.likes('unlike', '1973268968068413381').then((response) => console.log(response), (err) => console.log(err));

Comment any media

user.comments('1973450160415933226', 'I liked!').then((response) => console.log(response), (err) => console.log(err));

Problems, bugs or questions?

Open a new issue.

Roadmap

  • Improve 'Usage' section
  • Implement more methods (list all medias from the user, sugest)
  • Write some tests

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Tutorials

No tutorials found
Add a tutorial