A JavaScript library to make requests to Instagram
$ yarn add shitgram
const Shitgram = require('shitgram');
const shitgram = new Shitgram();
shitgram.user('tenasatupitsyn')
.then((data) => {
// 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((error) => {
// Handle error
console.log(error);
});new Shitgram(credentials) ⇒ Constructor
credentials: Object (Optional)
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<String> — Session id generated or returning from credentials
getUserDataWithSession(userID, sessionID) ⇒ Promise
Get user data that is only available with a session id
Returns:   Promise<Object> — User data obtained only in session
getUserStoriesWithSession(userID, sessionID) ⇒ Promise
Get user stories that is only available with a session id
Returns:   Promise<Object> — User story data obtained in one session only
getUserHighlightsWithSession(userID, sessionID) ⇒ Promise
Get user highlight that is only available with a session id
Returns:   Promise<Object> — User Highlight data obtained in one session only
user(param[, options]) ⇒ Promise
Get user details
param: String (Required)
     ÂUsernameorlinkfor the user profile you want details aboutoptions: Object (Optional)defaultResponse: Boolean
      Settrueto return instagram default response,falseis set to default.
Returns:   Promise<Object> — User data
story(param[, options]) ⇒ Promise
Get story details
param: String (Required)
     ÂUsernameorlinkfor the user stories you want details aboutoptions: Object (Optional)defaultResponse: Boolean
      Settrueto return default response from storiesig.com or if you have set credentials the response will be from instagram.com,falseis set to default.exclude: ExcludeType
      The file type to exclude from the response, will not exclude if defaultResponse istrue.
Returns:   Promise<Object> — User story data
highlight(param[, options]) ⇒ Promise
Get highlight details
param: String (Required)
     ÂHighlight idorlinkto itoptions: Object (Optional)defaultResponse: Boolean
      Settrueto return instagram default response,falseis set to default.exclude: ExcludeType
      The file type to exclude from the response, will not exclude if defaultResponse istrue.
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<Object> — User highlight data
image(param[, options]) ⇒ Promise
Get image post details
param: String (Required)
     ÂPost codeorlinkto itoptions: Object (Optional)defaultResponse: Boolean
      Settrueto return instagram default response,falseis set to default.
Returns:   Promise<Object> — Image data
video(param[, options]) ⇒ Promise
Get video post details
param: String (Required)
     ÂPost codeorlinkto itoptions: Object (Optional)defaultResponse: Boolean
      Settrueto return instagram default response,falseis set to default.
Returns:   Promise<Object> — Video data
album(param[, options]) ⇒ Promise
Get album post details
param: String (Required)
      Albumpost codeorlinkto itoptions: Object (Optional)defaultResponse: Boolean
      Settrueto return instagram default response,falseis set to default.exclude: ExcludeType
      The file type to exclude from the response, will not exclude if defaultResponse istrue.
Returns:   Promise<Object> — Album data
ExcludeType : enum<String>
File type to exclude from response
Available properties: IMAGE - VIDEO
Session(username, password) ⇒ Promise
Generate a new csrfToken and sessionID from Instagram username and password
username: String (Required)
      Instagram account usernamepassword: String (Required)
      Instagram account password
A brief example of use here
