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

shitgram

v1.4.2

Published

A JavaScript library to make requests to Instagram

Downloads

22

Readme

Contents

Installation

$ yarn add shitgram

Example

const Shitgram = require('shitgram');

const shitgram = new Shitgram();

shitgram.user('tenasatupitsyn')
	.then(function(user) {
		// Handle success
		console.log(data);

		/*
			{	id: '7661979279',
			 	url: 'https://www.instagram.com/tenasatupitsyn',
			 	avatarURL: 'https://instagram.frec8-1.fna.fbcdn.net/vp/d5...',
				isPrivate: false,
				isVerified: false,
				isBusiness: true,
				businessCategory: 'Creators & Celebrities',
				username: 'tenasatupitsyn',
				fullName: 'Tenasa M. Tupitsyn',
				biography: 'YuGi TeNaSa 1010.\nLara/VE 🇻🇪',
				email: null,
				website: null,
				followers: 0,
				following: 0,
				posts: 0	}
		 */

	})
	.catch(function(error) {
		// Handle error
		console.log(error);
	});

Documentation

new Shitgram(credentials) ⇒ Constructor

  • credentials : Object (Optional)
    • username        Instagram account username
    • password        Instagram account password
    • sessionID        An instagram session id. Will be used if you have not set username and password.

You will not need to set a session id if you have already set username and password.

getSessionID ⇒ Promise

Generate a new session id or return a defined sessionID

If username and password are set, a new session id will always be generated. So that a unique session id will be returned set property sessionID in the credentials.

It is possible to get the session ID without the builder by using plug-in.

Returns:    Promise — Returned promise

getUserDataWithSession(params) ⇒ Promise

Get user data that is only available with a session id

  • params

Returns:    Promise — Returned promise

getUserStoriesWithSession(params) ⇒ Promise

Get user stories that is only available with a session id

  • params

Returns:    Promise — Returned promise

getUserHighlightsWithSession(params) ⇒ Promise

Get user highlight that is only available with a session id

  • params

Returns:    Promise — Returned promise

user(param, options) ⇒ Promise

Get user details

  • param : String (Required)        Username or link for the user profile you want details about
  • options : Object (Optional)
    • defaultResponse        Set true to return instagram default response, false is set to default.

Returns:    Promise — Returned promise

story(param, options) ⇒ Promise

Get story details

  • param : String (Required)        Username or link for the user stories you want details about
  • options : Object (Optional)
    • defaultResponse        Set true to return default response from storiesig.com or if you have set credentials the response will be from instagram.com, false is set to default.
    • exclude        The file type to exclude from the response, will not exclude if defaultResponse is true.

Returns:    Promise — Returned promise

highlight(param, options) ⇒ Promise

Get highlight details

  • param : String (Required)        Highlight id or link to it
  • options : Object (Optional)
    • defaultResponse        Set true to return instagram default response, false is set to default.
    • exclude        The file type to exclude from the response, will not exclude if defaultResponse is true.

Highlights will be returned if they have been set by the author to be shared, check availability of highlights in the canReshare property; if null, highlights will be an empty array.

Returns:    Promise — Returned promise

image(param, options) ⇒ Promise

Get image post details

  • param : String (Required)        Post code or link to it
  • options : Object (Optional)
    • defaultResponse        Set true to return instagram default response, false is set to default.

Returns:    Promise — Returned promise

video(param, options) ⇒ Promise

Get video post details

  • param : String (Required)        Post code or link to it
  • options : Object (Optional)
    • defaultResponse        Set true to return instagram default response, false is set to default.

Returns:    Promise — Returned promise

album(param, options) ⇒ Promise

Get album post details

  • param : String (Required)        Album post code or link to it
  • options : Object (Optional)
    • defaultResponse        Set true to return instagram default response, false is set to default.
    • exclude        The file type to exclude from the response, will not exclude if defaultResponse is true.

Returns:    Promise — Returned promise

ExcludeType : enum<String>

File type to exclude from response

Available properties: IMAGE - VIDEO

Plugins

Session(params) ⇒ Promise

Generate a new csrfToken and sessionID from Instagram username and password

  • params
    • username : String (Required)        Instagram account username
    • password : String (Required)        Instagram account password

A brief example of use here

Returns:    Promise — Returned promise

BACK TO TOP