Documentation ¶
Index ¶
- Constants
- Variables
- func EnvProvision(path string, refresh ...bool) error
- func EnvRandLogin(path ...string) (string, string, error)
- func EnvUpdateAccs(path string, newAccs []*EnvAcc) error
- func EnvUpdateEnc(path string, newAccs []*EnvEncAcc) error
- func EnvUpdatePlain(path string, newAccs []*EnvPlainAcc) error
- func GetBest(obj interface{}) string
- func MediaIDFromShortID(code string) (string, error)
- func MediaToString(t int) string
- func MergeMapI(one map[string]interface{}, extra ...map[string]interface{}) map[string]interface{}
- func MergeMapS(one map[string]string, extra ...map[string]string) map[string]string
- type Account
- func (account *Account) Archived(params ...interface{}) *FeedMedia
- func (account *Account) ChangePassword(old, new_ string) error
- func (account *Account) ChangeProfilePic(photo io.Reader) error
- func (account *Account) EditBiography(bio string) error
- func (account *Account) EditName(name string) error
- func (account *Account) EditUrl(url string) error
- func (account *Account) Feed(params ...interface{}) *FeedMedia
- func (account *Account) Followers(query string) *Users
- func (account *Account) Following(query string, order FollowOrder) *Users
- func (account *Account) FriendhipsShowMany(userIds []string) (map[string]Friendship, error)
- func (acc *Account) GetEnvEncAcc() (*EnvEncAcc, error)
- func (account *Account) Liked() *FeedMedia
- func (account *Account) PendingFollowRequests() (*PendingRequests, error)
- func (account *Account) PendingRequestCount() (int, error)
- func (account *Account) RemoveProfilePic() error
- func (account *Account) Saved() *SavedMedia
- func (account *Account) SetPrivate() error
- func (account *Account) SetPublic() error
- func (account *Account) Stories() (*StoryMedia, error)
- func (account *Account) Sync() error
- func (account *Account) Tags(minTimestamp []byte) (*FeedMedia, error)
- func (account *Account) UpdateProfile(form map[string]string) error
- type Activity
- type AnimatedMedia
- type BlockedUser
- type Broadcast
- func (br *Broadcast) Discover() (*IGTVChannel, error)
- func (br *Broadcast) DownloadCoverFrame() ([]byte, error)
- func (br *Broadcast) GetComments() (*BroadcastComments, error)
- func (br *Broadcast) GetHeartbeat() (*BroadcastHeartbeat, error)
- func (br *Broadcast) GetInfo() error
- func (br *Broadcast) GetLikes() (*BroadcastLikes, error)
- func (br *Broadcast) GetLiveChaining() ([]*Broadcast, error)
- type BroadcastComments
- type BroadcastHeartbeat
- type BroadcastLikes
- type Candidate
- type Caption
- type Challenge
- type ChallengeContext
- type ChallengeError
- type ChallengeStepData
- type Checkpoint
- type Collection
- func (c *Collection) AddCollaborators(colab ...User) error
- func (c *Collection) ChangeCover(item Item) error
- func (c *Collection) ChangeName(name string) error
- func (c *Collection) Delete() error
- func (c *Collection) Error() error
- func (c *Collection) GetNextID() string
- func (c *Collection) Next(params ...interface{}) bool
- func (c *Collection) RemoveMedia(items ...Item) error
- func (c *Collection) Sync() error
- type Collections
- type Comment
- type CommentInfo
- type CommentOffensive
- type Comments
- func (comments *Comments) Add(text string) (err error)
- func (comments *Comments) BulkDelete(c []*Comment) error
- func (comments *Comments) DeleteMine(limit int) error
- func (comments *Comments) Disable() error
- func (comments *Comments) Enable() error
- func (comments Comments) Error() error
- func (comments *Comments) Next() bool
- func (comments *Comments) Sync()
- type ConfigFile
- type Contact
- type Contacts
- type Conversation
- func (c *Conversation) Approve() error
- func (c *Conversation) Error() error
- func (c *Conversation) GetItems() error
- func (conv *Conversation) Hide() error
- func (c *Conversation) MarkAsSeen(msg InboxItem) error
- func (c *Conversation) Next() bool
- func (c *Conversation) Refresh() error
- func (c *Conversation) Send(text string) error
- func (c *Conversation) Write(b []byte) (int, error)
- type Cooldowns
- type Device
- type Discover
- type DiscoverMediaItem
- type DiscoverSectionalItem
- type EnvAcc
- type EnvEncAcc
- type EnvPlainAcc
- type ErrChallengeProcess
- type Error400
- type Error503
- type ErrorN
- type Feed
- type FeedLocation
- type FeedMedia
- func (media *FeedMedia) Delete() error
- func (media *FeedMedia) Error() error
- func (media *FeedMedia) GetCommentInfo() error
- func (media *FeedMedia) GetNextID() string
- func (media *FeedMedia) Latest() []*Item
- func (media *FeedMedia) Next(params ...interface{}) bool
- func (media *FeedMedia) SetID(id interface{})
- func (media *FeedMedia) SetInstagram(insta *Instagram)
- func (media *FeedMedia) Sync() error
- type FeedTag
- type FollowOrder
- type Friendship
- type Hashtag
- func (h *Hashtag) ClearError()
- func (h *Hashtag) Delete() error
- func (h *Hashtag) Error() error
- func (h *Hashtag) GetNextID() string
- func (h *Hashtag) Info() error
- func (h *Hashtag) Latest() []*Item
- func (h *Hashtag) Next(tab ...interface{}) bool
- func (h *Hashtag) Stories() error
- func (h *Hashtag) Sync() error
- type IGTV
- type IGTVChannel
- type IGTVItem
- type Images
- type Inbox
- func (inbox *Inbox) Error() error
- func (inbox *Inbox) InitialSnapshot() bool
- func (inbox *Inbox) New(user *User, text string) (*Conversation, error)
- func (inbox *Inbox) Next() bool
- func (inbox *Inbox) NextPending() bool
- func (inbox *Inbox) Reset()
- func (inbox *Inbox) Sync() error
- func (inbox *Inbox) SyncPending() error
- type InboxItem
- type InboxItemLike
- type InboxItemMedia
- type Instagram
- func EnvLoadAccs(p ...string) ([]*Instagram, error)
- func EnvRandAcc(path ...string) (*Instagram, error)
- func Import(path string, args ...interface{}) (*Instagram, error)
- func ImportConfig(config ConfigFile, args ...interface{}) (*Instagram, error)
- func ImportFromBase64String(base64String string, args ...interface{}) (*Instagram, error)
- func ImportFromBytes(inputBytes []byte, args ...interface{}) (*Instagram, error)
- func ImportReader(r io.Reader, args ...interface{}) (*Instagram, error)
- func New(username, password string, totp_seed ...string) *Instagram
- func (insta *Instagram) Export(path string) error
- func (insta *Instagram) ExportAsBase64String() (string, error)
- func (insta *Instagram) ExportAsBytes() ([]byte, error)
- func (insta *Instagram) ExportConfig() ConfigFile
- func (insta *Instagram) ExportIO(writer io.Writer) error
- func (insta *Instagram) GetMedia(o interface{}) (*FeedMedia, error)
- func (insta *Instagram) Login(password ...string) (err error)
- func (insta *Instagram) Logout() error
- func (insta *Instagram) NewBroadcast(id int64) *Broadcast
- func (insta *Instagram) NewHashtag(name string) *Hashtag
- func (insta *Instagram) NewUser() *User
- func (insta *Instagram) OpenApp() (err error)
- func (insta *Instagram) Save() error
- func (insta *Instagram) Search(query string, p ...bool) (*SearchResult, error)
- func (insta *Instagram) SetAdID(id string)
- func (insta *Instagram) SetCookieJar(jar http.CookieJar) error
- func (insta *Instagram) SetDebugHandler(f func(...interface{}))
- func (insta *Instagram) SetDevice(device Device)
- func (insta *Instagram) SetDeviceID(id string)
- func (insta *Instagram) SetFamilyID(id string)
- func (insta *Instagram) SetHTTPClient(client *http.Client)
- func (insta *Instagram) SetHTTPTransport(transport http.RoundTripper)
- func (insta *Instagram) SetInfoHandler(f func(...interface{}))
- func (insta *Instagram) SetPhoneID(id string)
- func (insta *Instagram) SetProxy(url string, insecure bool, forceHTTP2 bool) error
- func (insta *Instagram) SetTOTPSeed(seed string)
- func (insta *Instagram) SetTimeout(t time.Duration)
- func (insta *Instagram) SetUUID(uuid string)
- func (insta *Instagram) SetWarnHandler(f func(...interface{}))
- func (insta *Instagram) SetWrapper(fn ReqWrapper)
- func (insta *Instagram) UnsetProxy()
- func (insta *Instagram) Upload(o *UploadOptions) (*Item, error)
- func (insta *Instagram) VisitProfile(handle string) (*Profile, error)
- type Item
- func (item *Item) Comment(text string) error
- func (item *Item) CommentCheckOffensive(comment string) (*CommentOffensive, error)
- func (item *Item) Delete() error
- func (item *Item) Download() ([]byte, error)
- func (item *Item) DownloadTo(dst string) error
- func (item *Item) GetCommentInfo() error
- func (item *Item) GetID() string
- func (item *Item) Hashtags() []Hashtag
- func (item *Item) Like() error
- func (item *Item) MediaToString() string
- func (item *Item) PreviewComments() []Comment
- func (item *Item) Reply(text string) error
- func (item *Item) Save() error
- func (item *Item) SaveTo(c *Collection) error
- func (item *Item) StoryIsCloseFriends() bool
- func (item *Item) SyncLikers() error
- func (item *Item) TopLikers() []string
- func (item *Item) Unlike() error
- func (item *Item) Unsave() error
- type LayoutSection
- type LiveItems
- type Location
- type LocationInstance
- type LocationTag
- type Media
- type MediaItem
- type Mentions
- type Nametag
- type NewSupporter
- type PageTab
- type PendingRequests
- type PicURLInfo
- type Place
- type Profile
- type Profiles
- type RecentItems
- type Reel
- type ReqWrapper
- type ReqWrapperArgs
- func (w *ReqWrapperArgs) GetEndpoint() string
- func (w *ReqWrapperArgs) GetInsta() *Instagram
- func (w *ReqWrapperArgs) GetWrapperCount() int
- func (w *ReqWrapperArgs) Ignore429() bool
- func (w *ReqWrapperArgs) RetryRequest() (body []byte, h http.Header, err error)
- func (w *ReqWrapperArgs) SetInsta(insta *Instagram)
- type SavedMedia
- type School
- type ScoresBootstrapUsers
- type Search
- func (sb *Search) History() (*[]SearchHistory, error)
- func (search *Search) NullState() error
- func (sb *Search) Search(query string, p ...bool) (*SearchResult, error)
- func (sb *Search) SearchHashtag(query string, p ...bool) (*SearchResult, error)
- func (sb *Search) SearchLocation(query string, p ...bool) (*SearchResult, error)
- func (sb *Search) SearchUser(query string, p ...bool) (*SearchResult, error)
- type SearchFunc
- type SearchHistory
- type SearchResult
- type Section
- type StoryCTA
- type StoryMedia
- type StoryReelMention
- type SuggestedUsers
- type SyncAnswer
- type TOTP
- type Tag
- type Timeline
- func (tl *Timeline) Broadcasts() []*Broadcast
- func (tl *Timeline) ClearPosts()
- func (tl *Timeline) Delete() error
- func (tl *Timeline) Error() error
- func (tl *Timeline) FetchTray(r fetchReason) error
- func (tl *Timeline) GetNextID() string
- func (tl *Timeline) NewFeedPostsExist() (bool, error)
- func (tl *Timeline) Next(p ...interface{}) bool
- func (tl *Timeline) Refresh() error
- func (tl *Timeline) SetPullRefresh()
- func (tl *Timeline) Stories() []*Reel
- func (tl *Timeline) UnsetPullRefresh()
- type TopSearchItem
- type Tray
- type TwoFactorInfo
- type UploadOptions
- type User
- func (user *User) ApprovePending() error
- func (user *User) Block(autoBlock bool) error
- func (user *User) DownloadProfilePic() ([]byte, error)
- func (user *User) DownloadProfilePicTo(dst string) error
- func (user *User) Feed(params ...interface{}) *FeedMedia
- func (user *User) Follow() error
- func (user *User) Followers(query ...string) *Users
- func (user *User) Following(query string, order FollowOrder) *Users
- func (user *User) GetFeaturedAccounts() ([]*User, error)
- func (user *User) GetFriendship() (fr *Friendship, err error)
- func (user *User) Highlights() ([]*Reel, error)
- func (user *User) IGTV() (*IGTVChannel, error)
- func (user *User) IGTVSeries() ([]*IGTVChannel, error)
- func (user *User) IgnorePending() error
- func (user *User) Info(params ...interface{}) error
- func (user *User) Mute(opt muteOption) error
- func (user *User) SetInstagram(insta *Instagram)
- func (user *User) Stories() (*StoryMedia, error)
- func (user *User) Sync(params ...interface{}) error
- func (user *User) Tags(minTimestamp []byte) (*FeedMedia, error)
- func (user *User) Unblock() error
- func (user *User) Unfollow() error
- func (user *User) Unmute(opt muteOption) error
- func (user *User) VisitProfile() (*Profile, error)
- type UserMinimal
- type UserTag
- type Users
- type Video
- type VisualMedia
- type VoiceMedia
- type Wrapper
Constants ¶
const ( MuteAll muteOption = "all" MuteStory muteOption = "reel" MutePosts muteOption = "post" )
const (
TooManyRequestsTimeout = 60 * time.Second
)
Variables ¶
var ( // Default Device GalaxyS10 = Device{ Manufacturer: "samsung", Model: "SM-G975F", CodeName: "beyond2", AndroidVersion: 30, AndroidRelease: 11, ScreenDpi: "560dpi", ScreenResolution: "1440x2898", Chipset: "exynos9820", } G6 = Device{ Manufacturer: "LGE/lge", Model: "LG-H870DS", CodeName: "lucye", AndroidVersion: 28, AndroidRelease: 9, ScreenDpi: "560dpi", ScreenResolution: "1440x2698", Chipset: "lucye", } )
var ( RespErr2FA = "two_factor_required" // Account & Login Errors ErrBadPassword = errors.New("password is incorrect") ErrTooManyRequests = errors.New("too many requests, please wait a few minutes before you try again") ErrLoggedOut = errors.New("you have been logged out, please log back in") ErrLoginRequired = errors.New("you are not logged in, please login") ErrSessionNotSet = errors.New("session identifier is not set, please log in again to set it") ErrLogoutFailed = errors.New("failed to logout") ErrChallengeRequired = errors.New("challenge required") ErrCheckpointRequired = errors.New("checkpoint required") ErrCheckpointPassed = errors.New("a checkpoint was thrown, but goinsta managed to solve it. Please call the function again") ErrChallengeFailed = errors.New("failed to solve challenge automatically") Err2FARequired = errors.New("two Factor Autentication required. Please call insta.TwoFactorInfo.Login2FA(code)") Err2FANoCode = errors.New("2FA seed is not set, and no code was provided. Please do atleast one of them") ErrInvalidCode = errors.New("the security code provided is incorrect") // Upload Errors ErrInvalidFormat = errors.New("invalid file type, please use one of jpeg, jpg, mp4") ErrInvalidImage = errors.New("invalid file type, please use a jpeg or jpg image") ErrCarouselType = ErrInvalidImage ErrCarouselMediaLimit = errors.New("carousel media limit of 10 exceeded") ErrStoryBadMediaType = errors.New("when uploading multiple items to your story at once, all have to be mp4") ErrStoryMediaTooLong = errors.New("story media must not exceed 15 seconds per item") // Search Errors ErrSearchUserNotFound = errors.New("User not found in search result") // IGTV ErrIGTVNoSeries = errors.New( "User has no IGTV series, unable to fetch. If you think this was a mistake please update the user", ) // Feed Errors ErrInvalidTab = errors.New("invalid tab, please select top or recent") ErrNoMore = errors.New("no more posts availible, page end has been reached") ErrNotHighlight = errors.New("unable to sync, Reel is not of type highlight") ErrMediaDeleted = errors.New("sorry, this media has been deleted") // Inbox ErrConvNotPending = errors.New("unable to perform action, conversation is not pending") // Misc ErrByteIndexNotFound = errors.New("failed to index byte slice, delim not found") ErrNoMedia = errors.New("failed to download, no media found") ErrInstaNotDefined = errors.New( "insta has not been defined, this is most likely a bug in the code. Please backtrack which call this error came from, and open an issue detailing exactly how you got to this error", ) ErrNoValidLogin = errors.New("no valid login found") ErrNoProfilePicURL = errors.New("no profile picture url was found. Please fetch the profile first") // Users ErrNoPendingFriendship = errors.New("unable to approve or ignore friendship for user, as there is no pending friendship request") // Headless ErrChromeNotFound = errors.New("to solve challenges a (headless) Chrome browser is used, but none was found. Please install Chromium or Google Chrome, and try again") )
Errors
var ( PULLTOREFRESH fetchReason = "pull_to_refresh" COLDSTART fetchReason = "cold_start_fetch" WARMSTART fetchReason = "warm_start_fetch" PAGINATION fetchReason = "pagination" AUTOREFRESH fetchReason = "auto_refresh" // so far unused )
var ErrAllSaved = errors.New("unable to call function for collection all posts")
Functions ¶
func EnvProvision ¶
EnvProvision will check the environment variables for INSTAGRAM_ACT_ and
create a base64 encoded config for the account, and write it to path.
:param: path - path a file to use as env, commonly a .env, but not required. :param: refresh (OPTIONAL) - refresh all plaintext credentials, don't skip already converted accounts
This function has been created the use of a .env file in mind.
.env contents:
INSTAGRAM_ACT_<name>="user:pass"
This function will add to the .env:
INSTAGRAM_BASE64_<name>="..."
func EnvRandLogin ¶
EnvRandLogin fetches a random login from the env. :param: path (OPTIONAL) - path to a file, by default .env
Looks for INSTAGRAM_ACT_<name>="username:password" in env
func EnvUpdateAccs ¶
EnvUpdateAccs will update the plain and encoded account variables stored in
the .env file: INSTAGRAM_ACT_<name>="username:password" INSTAGRAM_BASE64_<name>="<base64 encoded config>"
:param: string:path -- file path of the .env file, typically ".env" :param: []*EncAcc:newAccs -- list of updated versions of the accounts
func EnvUpdateEnc ¶
EnvUpdateEnc will update the encoded account variables stored in
the .env file: INSTAGRAM_BASE64_<name>="<base64 encoded config>"
:param: string:path -- file path of the .env file, typically ".env" :param: []*EnvEncAcc:newAccs -- list of updated encoded accounts
func EnvUpdatePlain ¶
func EnvUpdatePlain(path string, newAccs []*EnvPlainAcc) error
EnvPlainAccs will update the plain account variables stored in
the .env file: INSTAGRAM_ACT_<name>="username:password"
:param: string:path -- file path of the .env file, typically ".env" :param: []*EnvPlainAcc:newAccs -- list of updated plain accounts
func GetBest ¶
func GetBest(obj interface{}) string
GetBest returns url to best quality image or video.
Arguments can be []Video or []Candidate.
func MediaIDFromShortID ¶
func MediaToString ¶
Types ¶
type Account ¶
type Account struct { ID int64 `json:"pk"` Username string `json:"username"` FullName string `json:"full_name"` Biography string `json:"biography"` ProfilePicURL string `json:"profile_pic_url"` Email string `json:"email"` PhoneNumber string `json:"phone_number"` IsBusiness bool `json:"is_business"` Gender int `json:"gender"` ProfilePicID string `json:"profile_pic_id"` CanSeeOrganicInsights bool `json:"can_see_organic_insights"` ShowInsightsTerms bool `json:"show_insights_terms"` Nametag Nametag `json:"nametag"` HasAnonymousProfilePicture bool `json:"has_anonymous_profile_picture"` IsPrivate bool `json:"is_private"` IsUnpublished bool `json:"is_unpublished"` AllowedCommenterType string `json:"allowed_commenter_type"` IsVerified bool `json:"is_verified"` MediaCount int `json:"media_count"` FollowerCount int `json:"follower_count"` FollowingCount int `json:"following_count"` GeoMediaCount int `json:"geo_media_count"` ExternalURL string `json:"external_url"` HasBiographyTranslation bool `json:"has_biography_translation"` ExternalLynxURL string `json:"external_lynx_url"` HdProfilePicURLInfo PicURLInfo `json:"hd_profile_pic_url_info"` HdProfilePicVersions []PicURLInfo `json:"hd_profile_pic_versions"` HasChaining bool `json:"has_chaining"` ReelAutoArchive string `json:"reel_auto_archive"` PublicEmail string `json:"public_email"` PublicPhoneNumber string `json:"public_phone_number"` PublicPhoneCountryCode string `json:"public_phone_country_code"` ContactPhoneNumber string `json:"contact_phone_number"` Byline string `json:"byline"` SocialContext string `json:"social_context,omitempty"` SearchSocialContext string `json:"search_social_context,omitempty"` MutualFollowersCount float64 `json:"mutual_followers_count"` LatestReelMedia int64 `json:"latest_reel_media,omitempty"` CityID int64 `json:"city_id"` CityName string `json:"city_name"` AddressStreet string `json:"address_street"` DirectMessaging string `json:"direct_messaging"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Category string `json:"category"` BusinessContactMethod string `json:"business_contact_method"` IsCallToActionEnabled bool `json:"is_call_to_action_enabled"` FbPageCallToActionID string `json:"fb_page_call_to_action_id"` Zip string `json:"zip"` AllowContactsSync bool `json:"allow_contacts_sync"` CanBoostPost bool `json:"can_boost_post"` // contains filtered or unexported fields }
Account is personal account object
See examples: examples/account/*
func (*Account) Archived ¶
Archived returns current account archive feed
For pagination use FeedMedia.Next()
func (*Account) ChangePassword ¶
ChangePassword changes current password.
GoInsta does not store current instagram password (for security reasons) If you want to change your password you must parse old and new password.
See example: examples/account/changePass.go
func (*Account) ChangeProfilePic ¶
ChangeProfilePic Update profile picture
See example: examples/account/change-profile-pic/main.go
func (*Account) EditBiography ¶
EditBiography changes your Instagram's biography.
This function updates current Account information.
func (*Account) EditName ¶
EditName changes your Instagram account name.
This function updates current Account information.
func (*Account) EditUrl ¶
EditUrl changes your Instagram account url.
This function updates current Account information.
func (*Account) Feed ¶
Feed returns current account feed
params can be: string: timestamp of the minimum media timestamp.
minTime is the minimum timestamp of media.
For pagination use FeedMedia.Next()
func (*Account) Followers ¶
Followers returns a list of user followers.
Query can be used to search for a specific user. Be aware that it only matches from the start, e.g. "theprimeagen" will only match "theprime" not "prime". To fetch all user an empty string "".
Users.Next can be used to paginate
func (*Account) Following ¶
func (account *Account) Following(query string, order FollowOrder) *Users
Following returns a list of user following.
Query can be used to search for a specific user. Be aware that it only matches from the start, e.g. "theprimeagen" will only match "theprime" not "prime". To fetch all user an empty string "".
Users.Next can be used to paginate
func (*Account) FriendhipsShowMany ¶
func (account *Account) FriendhipsShowMany(userIds []string) (map[string]Friendship, error)
func (*Account) GetEnvEncAcc ¶
func (*Account) PendingFollowRequests ¶
func (account *Account) PendingFollowRequests() (*PendingRequests, error)
PendingFollowRequests returns pending follow requests.
func (*Account) PendingRequestCount ¶
PendingRequestCount returns the number of open pending friendships as int
func (*Account) RemoveProfilePic ¶
RemoveProfilePic removes current profile picture
This function updates current Account information.
See example: examples/account/removeProfilePic.go
func (*Account) Saved ¶
func (account *Account) Saved() *SavedMedia
Saved returns saved media. To get all the media you have to use the Next() method.
func (*Account) SetPrivate ¶
SetPrivate sets account to private mode.
This function updates current Account information.
See example: examples/account/setPrivate.go
func (*Account) SetPublic ¶
SetPublic sets account to public mode.
This function updates current Account information.
See example: examples/account/setPublic.go
func (*Account) Stories ¶
func (account *Account) Stories() (*StoryMedia, error)
Stories returns account stories.
func (*Account) Tags ¶
Tags returns media where account is tagged in
For pagination use FeedMedia.Next()
func (*Account) UpdateProfile ¶
UpdateProfile method allows you to update your current account information. :param: form takes a map[string]string, the common values are:
external_url phone_number username first_name -- is actually your full name biography email
type Activity ¶
type Activity struct { // Ad is every column of Activity section Ad struct { Items []struct { // User User `json:"user"` Algorithm string `json:"algorithm"` SocialContext string `json:"social_context"` Icon string `json:"icon"` Caption string `json:"caption"` MediaIds []interface{} `json:"media_ids"` ThumbnailUrls []interface{} `json:"thumbnail_urls"` LargeUrls []interface{} `json:"large_urls"` MediaInfos []interface{} `json:"media_infos"` Value float64 `json:"value"` IsNewSuggestion bool `json:"is_new_suggestion"` } `json:"items"` MoreAvailable bool `json:"more_available"` } `json:"aymf"` Counts struct { Campaign int `json:"campaign_notification"` CommentLikes int `json:"comment_likes"` Comments int `json:"comments"` Fundraiser int `json:"fundraiser"` Likes int `json:"likes"` NewPosts int `json:"new_posts"` PhotosOfYou int `json:"photos_of_you"` Relationships int `json:"relationships"` Requests int `json:"requests"` Shopping int `json:"shopping_notification"` UserTags int `json:"usertags"` } `json:"counts"` FriendRequestStories []interface{} `json:"friend_request_stories"` NewStories []RecentItems `json:"new_stories"` OldStories []RecentItems `json:"old_stories"` ContinuationToken int64 `json:"continuation_token"` Subscription interface{} `json:"subscription"` NextID string `json:"next_max_id"` LastChecked float64 `json:"last_checked"` FirstRecTs float64 `json:"pagination_first_record_timestamp"` Status string `json:"status"` // contains filtered or unexported fields }
Activity is the recent activity menu.
See example: examples/activity/recent.go
func (*Activity) MarkAsSeen ¶
MarkAsSeen will let instagram know you visited the activity page, and mark
current items as seen.
type AnimatedMedia ¶
type AnimatedMedia struct { ID string `json:"id"` Images struct { FixedHeight struct { Height string `json:"height"` Mp4 string `json:"mp4"` Mp4Size string `json:"mp4_size"` Size string `json:"size"` URL string `json:"url"` Webp string `json:"webp"` WebpSize string `json:"webp_size"` Width string `json:"width"` } `json:"fixed_height"` } `json:"images"` IsRandom bool `json:"is_random"` IsSticker bool `json:"is_sticker"` }
type BlockedUser ¶
type BlockedUser struct { // TODO: Convert to user UserID int64 `json:"user_id"` Username string `json:"username"` FullName string `json:"full_name"` ProfilePicURL string `json:"profile_pic_url"` BlockAt int64 `json:"block_at"` }
BlockedUser stores information about a used that has been blocked before.
type Broadcast ¶
type Broadcast struct { LastLikeTs int64 LastCommentTs int64 LastCommentFetchTs int64 LastCommentTotal int ID int64 `json:"id"` MediaID string `json:"media_id"` LivePostID int64 `json:"live_post_id"` // BroadcastStatus is either "active", "interrupted", "stopped" BroadcastStatus string `json:"broadcast_status"` DashPlaybackURL string `json:"dash_playback_url"` DashAbrPlaybackURL string `json:"dash_abr_playback_url"` DashManifest string `json:"dash_manifest"` ExpireAt int64 `json:"expire_at"` EncodingTag string `json:"encoding_tag"` InternalOnly bool `json:"internal_only"` NumberOfQualities int `json:"number_of_qualities"` CoverFrameURL string `json:"cover_frame_url"` User User `json:"broadcast_owner"` Cobroadcasters []*User `json:"cobroadcasters"` PublishedTime int64 `json:"published_time"` Message string `json:"broadcast_message"` OrganicTrackingToken string `json:"organic_tracking_token"` IsPlayerLiveTrace int `json:"is_player_live_trace_enabled"` IsGamingContent bool `json:"is_gaming_content"` IsViewerCommentAllowed bool `json:"is_viewer_comment_allowed"` IsPolicyViolation bool `json:"is_policy_violation"` PolicyViolationReason string `json:"policy_violation_reason"` LiveCommentMentionEnabled bool `json:"is_live_comment_mention_enabled"` LiveCommentRepliesEnabled bool `json:"is_live_comment_replies_enabled"` HideFromFeedUnit bool `json:"hide_from_feed_unit"` VideoDuration float64 `json:"video_duration"` Visibility int `json:"visibility"` ViewerCount float64 `json:"viewer_count"` ResponseTs int64 `json:"response_timestamp"` Status string `json:"status"` Dimensions struct { Width int `json:"width"` Height int `json:"height"` } `json:"dimensions"` Experiments map[string]interface{} `json:"broadcast_experiments"` PayViewerConfig struct { PayConfig struct { ConsumptionSheetConfig struct { Description string `json:"description"` PrivacyDisclaimer string `json:"privacy_disclaimer"` PrivacyDisclaimerLink string `json:"privacy_disclaimer_link"` PrivacyDisclaimerLinkText string `json:"privacy_disclaimer_link_text"` } `json:"consumption_sheet_config"` DigitalNonConsumableProductID int64 `json:"digital_non_consumable_product_id"` DigitalProductID int64 `json:"digital_product_id"` PayeeID int64 `json:"payee_id"` PinnedRowConfig struct { ButtonTitle string `json:"button_title"` Description string `json:"description"` } `json:"pinned_row_config"` TierInfos []struct { DigitalProductID int64 `json:"digital_product_id"` Sku string `json:"sku"` SupportTier string `json:"support_tier"` } `json:"tier_infos"` } `json:"pay_config"` } `json:"user_pay_viewer_config"` // contains filtered or unexported fields }
Broadcast struct represents live video streams.
func (*Broadcast) Discover ¶
func (br *Broadcast) Discover() (*IGTVChannel, error)
Discover wraps Instagram.IGTV.Live
func (*Broadcast) DownloadCoverFrame ¶
func (*Broadcast) GetComments ¶
func (br *Broadcast) GetComments() (*BroadcastComments, error)
Call every 2 seconds
func (*Broadcast) GetHeartbeat ¶
func (br *Broadcast) GetHeartbeat() (*BroadcastHeartbeat, error)
Call every 3 seconds
func (*Broadcast) GetLikes ¶
func (br *Broadcast) GetLikes() (*BroadcastLikes, error)
Call every 6 seconds
func (*Broadcast) GetLiveChaining ¶
GetLiveChaining traditionally gets called after the live stream has ended, and provides
recommendations of other current live streams, as well as past live streams.
type BroadcastComments ¶
type BroadcastComments struct { CommentLikesEnabled bool `json:"comment_likes_enabled"` Comments []*Comment `json:"comments"` PinnedComment *Comment `json:"pinned_comment"` CommentCount int `json:"comment_count"` Caption *Caption `json:"caption"` CaptionIsEdited bool `json:"caption_is_edited"` HasMoreComments bool `json:"has_more_comments"` HasMoreHeadloadComments bool `json:"has_more_headload_comments"` MediaHeaderDisplay string `json:"media_header_display"` CanViewMorePreviewComments bool `json:"can_view_more_preview_comments"` LiveSecondsPerComment int `json:"live_seconds_per_comment"` IsFirstFetch string `json:"is_first_fetch"` SystemComments []*Comment `json:"system_comments"` CommentMuted int `json:"comment_muted"` IsViewerCommentAllowed bool `json:"is_viewer_comment_allowed"` UserPaySupportersInfo struct { SupportersInComments map[string]interface{} `json:"supporters_in_comments"` SupportersInCommentsV2 map[string]interface{} `json:"supporters_in_comments_v2"` // SupportersInCommentsV2 map[string]struct { // SupportTier string `json:"support_tier"` // BadgesCount int `json:"badges_count"` // } `json:"supporters_in_comments_v2"` NewSupportersNextMinID int64 `json:"new_supporters_next_min_id"` NewSupporters []NewSupporter `json:"new_supporters"` } `json:"user_pay_supporter_info"` Status string `json:"status"` }
type BroadcastHeartbeat ¶
type BroadcastHeartbeat struct { ViewerCount float64 `json:"viewer_count"` BroadcastStatus string `json:"broadcast_status"` CobroadcasterIds []string `json:"cobroadcaster_ids"` OffsetVideoStart float64 `json:"offset_to_video_start"` RequestToJoinEnabled int `json:"request_to_join_enabled"` UserPayMaxAmountReached bool `json:"user_pay_max_amount_reached"` Status string `json:"status"` }
type BroadcastLikes ¶
type BroadcastLikes struct { Likes int `json:"likes"` BurstLikes int `json:"burst_likes"` Likers []struct { UserID int64 `json:"user_id"` ProfilePicUrl string `json:"profile_pic_url"` Count string `json:"count"` } `json:"likers"` LikeTs int64 `json:"like_ts"` Status string `json:"status"` PaySupporterInfo struct { LikeCountByTier []struct { BurstLikes int `json:"burst_likes"` Likers []interface{} `json:"likers"` Likes int `json:"likes"` SupportTier string `json:"support_tier"` } `json:"like_count_by_support_tier"` BurstLikes int `json:"supporter_tier_burst_likes"` Likes int `json:"supporter_tier_likes"` } `json:"user_pay_supporter_info"` }
type Candidate ¶
type Candidate struct { Width int `json:"width"` Height int `json:"height"` URL string `json:"url"` ScansProfile string `json:"scans_profile"` }
Candidate is something that I really have no idea what it is.
type Caption ¶
type Caption struct { // can be both string or int ID interface{} `json:"pk"` UserID int64 `json:"user_id"` Text string `json:"text"` Type int `json:"type"` CreatedAt int64 `json:"created_at"` CreatedAtUtc int64 `json:"created_at_utc"` ContentType string `json:"content_type"` Status string `json:"status"` BitFlags int `json:"bit_flags"` User UserMinimal `json:"user"` DidReportAsSpam bool `json:"did_report_as_spam"` MediaID int64 `json:"media_id"` HasTranslation bool `json:"has_translation"` }
Caption is media caption
type Challenge ¶
type Challenge struct { LoggedInUser *Account `json:"logged_in_user,omitempty"` UserID int64 `json:"user_id"` Status string `json:"status"` Errors []string `json:"errors"` URL string `json:"url"` ApiPath string `json:"api_path"` Context *ChallengeContext `json:"challenge_context"` FlowRenderType int `json:"flow_render_type"` HideWebviewHeader bool `json:"hide_webview_header"` Lock bool `json:"lock"` Logout bool `json:"logout"` NativeFlow bool `json:"native_flow"` TwoFactorRequired bool TwoFactorInfo TwoFactorInfo // contains filtered or unexported fields }
Challenge is a status code 400 error, usually prompting the user to perform
some action.
func (*Challenge) GetScreenshot ¶ added in v3.1.10
GetScreenshot will open the challenge in a headless browser, take a screenshot and immediately return.
func (*Challenge) Process ¶
Process will open up the challenge url in a chromium browser and
take a screenshot. Please report the screenshot and printed out struct so challenge automation can be build in.
func (*Challenge) ProcessOld ¶
func (*Challenge) SendSecurityCode ¶
sendSecurityCode sends the code received in the message
type ChallengeContext ¶
type ChallengeError ¶
type ChallengeError struct { Challenge struct { URL string `json:"url"` APIPath string `json:"api_path"` HideWebviewHeader bool `json:"hide_webview_header"` Lock bool `json:"lock"` Logout bool `json:"logout"` NativeFlow bool `json:"native_flow"` } `json:"challenge"` Status string `json:"status"` Message string `json:"message"` ErrorType string `json:"error_type"` }
ChallengeError is error returned by HTTP 400 status code.
func (ChallengeError) Error ¶
func (e ChallengeError) Error() string
type ChallengeStepData ¶
type ChallengeStepData struct { Choice string `json:"choice"` FbAccessToken string `json:"fb_access_token"` BigBlueToken string `json:"big_blue_token"` GoogleOauthToken string `json:"google_oauth_token"` Email string `json:"email"` SecurityCode string `json:"security_code"` ResendDelay interface{} `json:"resend_delay"` ContactPoint string `json:"contact_point"` FormType string `json:"form_type"` }
type Checkpoint ¶
type Checkpoint struct { URL string `json:"checkpoint_url"` Lock bool `json:"lock"` FlowRenderType int `json:"flow_render_type"` // contains filtered or unexported fields }
Checkpoint is just like challenge, a status code 400 error. Usually used to prompt the user to accept cookies.
func (*Checkpoint) Process ¶
func (c *Checkpoint) Process() error
Process will open up the url passed as a checkpoint response (not a challenge)
in a headless browser. This method is experimental, please report if you still get a /privacy/checks/ checkpoint error.
type Collection ¶
type Collection struct { ID string `json:"collection_id"` MediaCount int `json:"collection_media_count"` Name string `json:"collection_name"` Type string `json:"collection_type"` Cover struct { ID string `json:"id"` Images Images `json:"image_versions2"` OriginalWidth int `json:"original_width"` OriginalHeight int `json:"original_height"` MediaType int `json:"media_type"` } `json:"cover_media"` Items []Item NumResults int `json:"num_results"` MoreAvailable bool `json:"more_available"` NextID interface{} `json:"next_max_id"` // contains filtered or unexported fields }
Collection represents a single collection. All collections will not load
any posts by default. To load the posts you need to call Collection.Next()
You can edit your collections with their respective methods. e.g. edit the name
or change the thumbnail.
func (*Collection) AddCollaborators ¶
func (c *Collection) AddCollaborators(colab ...User) error
AddCollaborators should in theory add collaborators. Untested.
func (*Collection) ChangeCover ¶
func (c *Collection) ChangeCover(item Item) error
ChangeCover will change to cover of the collection. The item parameter must
must be an item that is present inside the collection.
func (*Collection) ChangeName ¶
func (c *Collection) ChangeName(name string) error
ChangeName will change the name of the collection.
func (*Collection) Delete ¶
func (c *Collection) Delete() error
Delete will permanently delete a collection
func (*Collection) Error ¶
func (c *Collection) Error() error
Error will return the error if one occured during Collection.Next().
func (*Collection) GetNextID ¶
func (c *Collection) GetNextID() string
GetNextID will return the pagination ID as a string
func (*Collection) Next ¶
func (c *Collection) Next(params ...interface{}) bool
Next allows you to fetch and paginate over all items present inside a collection.
func (*Collection) RemoveMedia ¶
func (c *Collection) RemoveMedia(items ...Item) error
RemoveMedia will remove media from a collection. The items provided must be
inside the collection
func (*Collection) Sync ¶
func (c *Collection) Sync() error
Sync will fetch the initial items inside a collection. The first call to fetch posts will always be sync, however you can also only
call Collection.Next() as Sync() will automatically be called if required.
type Collections ¶
type Collections struct { AutoLoadMoreEnabled bool `json:"auto_load_more_enabled"` Items []*Collection `json:"items"` MoreAvailable bool `json:"more_available"` NextID string `json:"next_max_id"` NumResults int Status string `json:"status"` // contains filtered or unexported fields }
Collections stores information about all your collection. The first collection will always be the "All Posts" collcetion. To fetch all collections, you can paginate with Collections.Next()
func (*Collections) Create ¶
func (c *Collections) Create(name string, items ...Item) (*Collection, error)
Create allows you to create a new collection. :param: name (*required) - the name of the collection :param: ...Items (optional) - posts to add to the collection
func (*Collections) Error ¶
func (c *Collections) Error() error
Error returns the error if one occured in Collections.Next()
func (*Collections) Latest ¶
func (c *Collections) Latest() []*Collection
Latest will return the last fetched items by indexing with Collections.LastCount. Collections.Next keeps adding to the items, this method only returns the latest items.
func (*Collections) Next ¶
func (c *Collections) Next() bool
Next allows you to fetch and paginate your list of collections. This method will cumulatively add to the collections. To get the latest
fetched collections, call Collections.Latest(), or index with Collections.LastCount
type Comment ¶
type Comment struct { ID interface{} `json:"pk"` Text string `json:"text"` Type interface{} `json:"type"` User User `json:"user"` UserID int64 `json:"user_id"` BitFlags int `json:"bit_flags"` ChildCommentCount int `json:"child_comment_count"` CommentIndex int `json:"comment_index"` CommentLikeCount int `json:"comment_like_count"` ContentType string `json:"content_type"` CreatedAt int64 `json:"created_at"` CreatedAtUtc int64 `json:"created_at_utc"` DidReportAsSpam bool `json:"did_report_as_spam"` HasLikedComment bool `json:"has_liked_comment"` InlineComposerDisplayCondition string `json:"inline_composer_display_condition"` OtherPreviewUsers []*User `json:"other_preview_users"` PreviewChildComments []Comment `json:"preview_child_comments"` NextMaxChildCursor string `json:"next_max_child_cursor,omitempty"` HasMoreTailChildComments bool `json:"has_more_tail_child_comments,omitempty"` NextMinChildCursor string `json:"next_min_child_cursor,omitempty"` HasMoreHeadChildComments bool `json:"has_more_head_child_comments,omitempty"` NumTailChildComments int `json:"num_tail_child_comments,omitempty"` NumHeadChildComments int `json:"num_head_child_comments,omitempty"` IsCovered bool `json:"is_covered"` PrivateReplyStatus int64 `json:"private_reply_status"` SupporterInfo struct { SupportTier string `json:"support_tier"` BadgesCount int `json:"badges_count"` } `json:"supporter_info"` Status string `json:"status"` // contains filtered or unexported fields }
Comment is a type of Media retrieved by the Comments methods
type CommentInfo ¶
type CommentInfo struct { LikesEnabled bool `json:"comment_likes_enabled"` ThreadingEnabled bool `json:"comment_threading_enabled"` HasMore bool `json:"has_more_comments"` MaxNumVisiblePreview int `json:"max_num_visible_preview_comments"` PreviewComments []interface{} `json:"preview_comments"` CanViewMorePreview bool `json:"can_view_more_preview_comments"` CommentCount int `json:"comment_count"` HideViewAllCommentEntrypoint bool `json:"hide_view_all_comment_entrypoint"` InlineComposerDisplayCondition string `json:"inline_composer_display_condition"` InlineComposerImpTriggerTime int `json:"inline_composer_imp_trigger_time"` }
type CommentOffensive ¶
type Comments ¶
type Comments struct { Items []Comment `json:"comments"` CommentCount int64 `json:"comment_count"` Caption Caption `json:"caption"` CaptionIsEdited bool `json:"caption_is_edited"` HasMoreComments bool `json:"has_more_comments"` HasMoreHeadloadComments bool `json:"has_more_headload_comments"` ThreadingEnabled bool `json:"threading_enabled"` MediaHeaderDisplay string `json:"media_header_display"` InitiateAtTop bool `json:"initiate_at_top"` InsertNewCommentToTop bool `json:"insert_new_comment_to_top"` PreviewComments []Comment `json:"preview_comments"` NextID json.RawMessage `json:"next_max_id,omitempty"` NextMinID json.RawMessage `json:"next_min_id,omitempty"` CommentLikesEnabled bool `json:"comment_likes_enabled"` DisplayRealtimeTypingIndicator bool `json:"display_realtime_typing_indicator"` Status string `json:"status"` // contains filtered or unexported fields }
Comments allows user to interact with media (item) comments. You can Add or Delete by index or by user name.
func (*Comments) BulkDelete ¶
BulkDelete allows you to select and delete multiple comments on a single post.
func (*Comments) DeleteMine ¶
DeleteMine removes all of your comments limited by parsed parameter.
If limit is <= 0 DeleteMine will delete all your comments. Be careful with using this on posts with a large number of comments,
as a large number of requests will be made to index all comments.This can result in a ratelimiter being tripped.
See example: examples/media/commentsDelMine.go
func (*Comments) Disable ¶
Disable disables comments in FeedMedia.
See example: examples/media/commentDisable.go
func (*Comments) Enable ¶
Enable enables comments in FeedMedia
See example: examples/media/commentEnable.go
type ConfigFile ¶
type ConfigFile struct { ID int64 `json:"id"` User string `json:"username"` DeviceID string `json:"device_id"` FamilyID string `json:"family_id"` UUID string `json:"uuid"` RankToken string `json:"rank_token"` Token string `json:"token"` PhoneID string `json:"phone_id"` XmidExpiry int64 `json:"xmid_expiry"` HeaderOptions map[string]string `json:"header_options"` Account *Account `json:"account"` Device Device `json:"device"` TOTP *TOTP `json:"totp"` SessionNonce string `json:"session"` }
ConfigFile is a structure to store the session information so that can be exported or imported.
type Contacts ¶
type Contacts struct {
// contains filtered or unexported fields
}
func (*Contacts) SyncContacts ¶
func (c *Contacts) SyncContacts(contacts *[]Contact) (*SyncAnswer, error)
func (*Contacts) UnlinkContacts ¶
type Conversation ¶
type Conversation struct { ID string `json:"thread_id"` V2ID string `json:"thread_v2_id"` // Items can be of many types. Items []*InboxItem `json:"items"` Title string `json:"thread_title"` Users []*User `json:"users"` LeftUsers []*User `json:"left_users"` AdminUserIDs []int64 `json:"admin_user_ids"` ApprovalRequiredNewMembers bool `json:"approval_required_for_new_members"` Pending bool `json:"pending"` PendingScore int64 `json:"pending_score"` ViewerID int64 `json:"viewer_id"` ValuedRequest bool `json:"valued_request"` LastActivityAt int64 `json:"last_activity_at"` Named bool `json:"named"` Muted bool `json:"muted"` Spam bool `json:"spam"` ShhModeEnabled bool `json:"shh_mode_enabled"` ShhReplayEnabled bool `json:"shh_replay_enabled"` IsPin bool `json:"is_pin"` IsGroup bool `json:"is_group"` IsVerifiedThread bool `json:"is_verified_thread"` IsCloseFriendThread bool `json:"is_close_friend_thread"` ThreadType string `json:"thread_type"` ExpiringMediaSendCount int `json:"expiring_media_send_count"` ExpiringMediaReceiveCount int `json:"expiring_media_receive_count"` Inviter *User `json:"inviter"` HasOlder bool `json:"has_older"` HasNewer bool `json:"has_newer"` HasRestrictedUser bool `json:"has_restricted_user"` Archived bool `json:"archived"` LastSeenAt map[string]lastSeenAt `json:"last_seen_at"` NewestCursor string `json:"newest_cursor"` OldestCursor string `json:"oldest_cursor"` LastPermanentItem InboxItem `json:"last_permanent_item"` // contains filtered or unexported fields }
Conversation is the representation of an instagram already established conversation through direct messages.
func (*Conversation) Approve ¶
func (c *Conversation) Approve() error
Approve a pending direct message.
func (*Conversation) Error ¶
func (c *Conversation) Error() error
Error will return Conversation.err
func (*Conversation) GetItems ¶
func (c *Conversation) GetItems() error
GetItems is an alternative way to get conversation messages, e.g. refresh. The app calls this when approving a DM request, for example.
func (*Conversation) Hide ¶
func (conv *Conversation) Hide() error
func (*Conversation) MarkAsSeen ¶
func (c *Conversation) MarkAsSeen(msg InboxItem) error
MarkAsSeen will marks a message as seen.
func (*Conversation) Next ¶
func (c *Conversation) Next() bool
Next loads older messages if available. If not it will call Refresh().
func (*Conversation) Refresh ¶
func (c *Conversation) Refresh() error
Refresh will fetch a conversation's unseen messages.
func (*Conversation) Send ¶
func (c *Conversation) Send(text string) error
Send sends message in conversation
type Cooldowns ¶
type Cooldowns struct { Default int `json:"default"` Global int `json:"global"` Status string `json:"status"` TTL int `json:"ttl"` Slots []struct { Cooldown int `json:"cooldown"` Slot string `json:"slot"` } `json:"slots"` Surfaces []struct { Cooldown int `json:"cooldown"` Slot string `json:"slot"` } `json:"surfaces"` }
type Device ¶
type Device struct { Manufacturer string `json:"manufacturer"` Model string `json:"model"` CodeName string `json:"code_name"` AndroidVersion int `json:"android_version"` AndroidRelease int `json:"android_release"` ScreenDpi string `json:"screen_dpi"` ScreenResolution string `json:"screen_resolution"` Chipset string `json:"chipset"` }
type Discover ¶
type Discover struct { Items []DiscoverSectionalItem NumResults int AutoLoadMoreEnabled bool `json:"auto_load_more_enabled"` Clusters []struct { CanMute bool `json:"can_mute"` Context string `json:"context"` DebugInfo string `json:"debug_info"` Description string `json:"description"` ID interface{} `json:"id"` IsMuted bool `json:"is_muted"` Labels interface{} `json:"labels"` Name string `json:"name"` Title string `json:"title"` Type string `json:"type"` } `json:"clusters"` MaxID string `json:"max_id"` MoreAvailable bool `json:"more_available"` NextID string `json:"next_max_id"` RankToken string `json:"rank_token"` SectionalItems []DiscoverSectionalItem `json:"sectional_items"` SessionPagingToken string `json:"session_paging_token"` Status string `json:"status"` // contains filtered or unexported fields }
type DiscoverMediaItem ¶
type DiscoverMediaItem struct {
Media Item `json:"media"`
}
type DiscoverSectionalItem ¶
type DiscoverSectionalItem struct { ExploreItemInfo struct { AspectRatio float64 `json:"aspect_ratio"` Autoplay bool `json:"autoplay"` NumColumns int `json:"num_columns"` TotalNumColumns int `json:"total_num_columns"` } `json:"explore_item_info"` FeedType string `json:"feed_type"` LayoutContent struct { // Usually not all of these are filled // I have often seen the 1 out of 5 items being the ThreeByFour // and the third item the TwoByTwoItems + Fill Items, // the others tend to be Medias, but this is not always the case LayoutType string `json:"layout_type"` Medias []DiscoverMediaItem `json:"medias"` FillItems []DiscoverMediaItem `json:"fill_items"` OneByOneItem DiscoverMediaItem `json:"one_by_one"` TwoByTwoItem DiscoverMediaItem `json:"two_by_two_item"` ThreeByFourItem struct { // TODO: this is a reels section, which you can paginate on its own Clips struct { ContentSource string `json:"content_source"` Design string `json:"design"` ID string `json:"id"` Items []DiscoverMediaItem `json:"items"` Label string `json:"label"` MaxID string `json:"max_id"` MoreAvailable bool `json:"more_available"` Type string `json:"type"` } `json:"clips"` } `json:"three_by_four_item"` } `json:"layout_content"` LayoutType string `json:"layout_type"` }
type EnvAcc ¶
type EnvAcc struct { Plain *EnvPlainAcc Enc *EnvEncAcc }
EnvAcc represents the pair of plain and base64 encoded account pairs as
stored in EnvPlainAcc and EnvEncAcc, with env variables: INSTAGRAM_ACT_<name>="username:password" INSTAGRAM_BASE64_<name>="<base64 encoded config>"
func EnvReadAccs ¶
EnvReadAccs loads both all plain and base64 encoded accounts
Set in a .env file or export to your environment variables:
INSTAGRAM_ACT_<name>="user:pass" INSTAGRAM_BASE64_<name>="..."
:param: p (OPTIONAL) -- env file path, ".env" by default
type EnvEncAcc ¶
EnvEncAcc represents the encoded account details stored in the env variable:
INSTAGRAM_BASE64_<name>="<base64 encoded config>"
type EnvPlainAcc ¶
EnvPlainAcc represents the plain account details stored in the env variable:
INSTAGRAM_ACT_<name>="username:password"
func EnvLoadPlain ¶
func EnvLoadPlain(path ...string) ([]*EnvPlainAcc, error)
EnvLoadPlain will load all plain accounts stored in the env variables:
INSTAGRAM_ACT_<name>="username:password"
:param: path (OPTIONAL) -- .env file to load, default to ".env"
type ErrChallengeProcess ¶
type ErrChallengeProcess struct {
StepName string
}
func (ErrChallengeProcess) Error ¶
func (ec ErrChallengeProcess) Error() string
type Error400 ¶
type Error400 struct { Checkpoint Status string `json:"status"` Message string `json:"message"` ErrorType string `json:"error_type"` ErrorTitle string `json:"error_title"` ErrorBody string `json:"error_body"` // Status code Code int // The endpoint that returned the 400 status code Endpoint string `json:"endpoint"` Challenge *Challenge `json:"challenge"` TwoFactorRequired bool `json:"two_factor_required"` TwoFactorInfo *TwoFactorInfo `json:"two_factor_info"` // This is double, as also present inside TwoFactorInfo PhoneVerificationSettings phoneVerificationSettings `json:"phone_verification_settings"` Payload struct { ClientContext string `json:"client_context"` Message string `json:"message"` } `json:"payload"` DebugInfo struct { Message string `json:"string"` Retriable bool `json:"retriable"` Type string `json:"type"` } `json:"debug_info"` }
Error400 is error returned by HTTP 400 status code.
func (*Error400) GetMessage ¶
type ErrorN ¶
type ErrorN struct { Message string `json:"message"` Endpoint string `json:"endpoint"` Status string `json:"status"` ErrorType string `json:"error_type"` }
ErrorN is general instagram error
type Feed ¶
type Feed struct {
// contains filtered or unexported fields
}
Feed is the object for all feed endpoints.
func (*Feed) LocationID ¶
func (feed *Feed) LocationID(locationID int64) (*FeedLocation, error)
Feed search by locationID
func (*Feed) Tags ¶
Tags search by Tag in user Feed
This method does not perform a search for a tag, but directly queries the
feed items for the specified Tag. The preffered way would be to search for the tag, call TopSearchItem.RegisterClick(), and then fetch the feed.
This method uses an older endpoint, although it still seems to work. The preffered way to fetch Hashtag feeds is by using the Hashtag struct. This can be obtained from insta.NewHashtag(tag), or insta.Searchbar.SearchHashtag(tag)
type FeedLocation ¶
type FeedLocation struct { RankedItems []*Item `json:"ranked_items"` Items []*Item `json:"items"` NumResults int `json:"num_results"` NextID string `json:"next_max_id"` MoreAvailable bool `json:"more_available"` AutoLoadMoreEnabled bool `json:"auto_load_more_enabled"` MediaCount int `json:"media_count"` Location Location `json:"location"` Status string `json:"status"` }
FeedLocation is the struct that fits the structure returned by instagram on LocationID search.
type FeedMedia ¶
type FeedMedia struct { Items []*Item `json:"items"` NumResults int `json:"num_results"` MoreAvailable bool `json:"more_available"` AutoLoadMoreEnabled bool `json:"auto_load_more_enabled"` Status string `json:"status"` // Can be int64 and string // this is why we recommend Next() usage :') NextID interface{} `json:"next_max_id"` // contains filtered or unexported fields }
FeedMedia represent a set of media items Mainly used for user profile feeds. To get your main timeline use insta.Timeline
func (*FeedMedia) Delete ¶
Delete deletes ALL items in media. If you want to delete one item, pick one from media.Items and call Item.Delete()
See example: examples/media/mediaDelete.go
func (*FeedMedia) GetCommentInfo ¶
GetCommentInfo will fetch the item.CommentInfo; e.g. comment counts, and
other comment information for the feed.Latest() items
func (*FeedMedia) Latest ¶
Latest returns a slice of the latest fetched items of the list of all items. The Next method keeps adding to the list, with Latest you can retrieve only the newest items.
func (*FeedMedia) Next ¶
Next allows pagination after calling: User.Feed extra query arguments can be passes one after another as func(key, value). Only if an even number of string arguements will be passed, they will be
used in the query.
returns false when list reach the end. if FeedMedia.Error() is ErrNoMore no problems have occurred.
func (*FeedMedia) SetID ¶
func (media *FeedMedia) SetID(id interface{})
SetID sets media.GetNextID this value can be int64 or string
func (*FeedMedia) SetInstagram ¶
SetInstagram set instagram
type FeedTag ¶
type FeedTag struct { RankedItems []*Item `json:"ranked_items"` Items []*Item `json:"items"` NumResults int `json:"num_results"` NextID string `json:"next_max_id"` MoreAvailable bool `json:"more_available"` AutoLoadMoreEnabled bool `json:"auto_load_more_enabled"` Story StoryMedia `json:"story"` Status string `json:"status"` // contains filtered or unexported fields }
FeedTag is the struct that fits the structure returned by instagram on TagSearch.
type FollowOrder ¶ added in v3.1.4
type FollowOrder string
const ( DefaultOrder FollowOrder = "default" LatestOrder FollowOrder = "date_followed_latest" EarliestOrder FollowOrder = "date_followed_earliest" )
type Friendship ¶
type Friendship struct { Following bool `json:"following"` FollowedBy bool `json:"followed_by"` IncomingRequest bool `json:"incoming_request"` OutgoingRequest bool `json:"outgoing_request"` Muting bool `json:"muting"` Blocking bool `json:"blocking"` IsBestie bool `json:"is_bestie"` IsBlockingReel bool `json:"is_blocking_reel"` IsMutingReel bool `json:"is_muting_reel"` IsPrivate bool `json:"is_private"` IsRestricted bool `jsoN:"is_restricted"` }
Friendship stores the details of the relationship between two users.
type Hashtag ¶
type Hashtag struct { Name string `json:"name"` ID int64 `json:"id"` MediaCount int `json:"media_count"` FormattedMediaCount string `json:"formatted_media_count,omitempty"` FollowStatus any `json:"follow_status,omitempty"` Subtitle string `json:"subtitle,omitempty"` Description string `json:"description,omitempty"` Following any `json:"following,omitempty"` AllowFollowing any `json:"allow_following,omitempty"` AllowMutingStory any `json:"allow_muting_story,omitempty"` ProfilePicURL any `json:"profile_pic_url,omitempty"` NonViolating any `json:"non_violating,omitempty"` RelatedTags any `json:"related_tags,omitempty"` DebugInfo any `json:"debug_info,omitempty"` // All Top Items Items []*Item `json:"items,omitempty"` Story *StoryMedia `json:"story,omitempty"` NumResults int // Sections will always contain the last fetched sections, regardless of tab Sections []hashtagSection `json:"sections,omitempty"` PageInfo map[string]hashtagPageInfo AutoLoadMoreEnabled bool `json:"auto_load_more_enabled,omitempty"` MoreAvailable bool `json:"more_available,omitempty"` NextID string `json:"next_max_id,omitempty"` NextPage int `json:"next_page,omitempty"` NextMediaIds []int64 `json:"next_media_ids,omitempty"` Status string `json:"status,omitempty"` // contains filtered or unexported fields }
Hashtag is used for getting the media that matches a hashtag on instagram.
type IGTV ¶
type IGTV struct { // Shared between the endpoints DestinationClientConfigs interface{} `json:"destination_client_configs"` MaxID string `json:"max_id"` MoreAvailable bool `json:"more_available"` SeenState interface{} `json:"seen_state"` NumResults int `json:"num_results"` Status string `json:"status"` // Specific to igtv/discover Badging interface{} `json:"badging"` BannerToken interface{} `json:"banner_token"` BrowseItems interface{} `json:"browser_items"` Channels []IGTVChannel `json:"channels"` Composer interface{} `json:"composer"` Items []*Item `json:"items"` DestinationItems []IGTVItem `json:"destination_items"` MyChannel struct{} `json:"my_channel"` // Specific to igtv/suggested_searches RankToken int `json:"rank_token"` // contains filtered or unexported fields }
All items with interface{} I have only seen a null response
func (*IGTV) Latest ¶
Latest returns the last fetched items, by slicing IGTV.Items with IGTV.NumResults
func (*IGTV) Live ¶
func (igtv *IGTV) Live() (*IGTVChannel, error)
Live will return a list of current broadcasts
type IGTVChannel ¶
type IGTVChannel struct { ApproxTotalVideos interface{} `json:"approx_total_videos"` ApproxVideosFormatted interface{} `json:"approx_videos_formatted"` CoverPhotoUrl string `json:"cover_photo_url"` Description string `json:"description"` ID string `json:"id"` Items []*Item `json:"items"` NumResults int `json:"num_results"` Broadcasts []*Broadcast `json:"live_items"` Title string `json:"title"` Type string `json:"type"` User *User `json:"user_dict"` DestinationClientConfigs interface{} `json:"destination_client_configs"` NextID interface{} `json:"max_id"` MoreAvailable bool `json:"more_available"` SeenState interface{} `json:"seen_state"` // contains filtered or unexported fields }
IGTVChannel can represent a single user's collection of IGTV posts, or it can
e.g. represent a user's IGTV series.
It's called a channel, however the Items inside the Channel struct can, but
don't have to, belong to the same account, depending on the request. It's a bit dubious
func (*IGTVChannel) Delete ¶
func (igtv *IGTVChannel) Delete() error
func (*IGTVChannel) Error ¶
func (igtv *IGTVChannel) Error() error
func (*IGTVChannel) GetNextID ¶
func (igtv *IGTVChannel) GetNextID() string
GetNexID returns the max id used for pagination.
func (*IGTVChannel) Latest ¶
func (igtv *IGTVChannel) Latest() []*Item
Latest will return the results from the latest fetch
func (*IGTVChannel) Live ¶
func (igtv *IGTVChannel) Live() (*IGTVChannel, error)
Live test method to see if Live can paginate
func (*IGTVChannel) Next ¶
func (igtv *IGTVChannel) Next(params ...interface{}) bool
Next allows you to paginate the IGTV feed of a channel. returns false when list reach the end. if FeedMedia.Error() is ErrNoMore no problems have occurred.
type IGTVItem ¶
type IGTVItem struct { Title string `json:"title"` Type string `json:"type"` Channel IGTVChannel `json:"channel"` Item *Item `json:"item"` LogingInfo struct { SourceChannelType string `json:"source_channel_type"` } `json:"logging_info"` // Specific to igtv/suggested_searches Hashtag interface{} `json:"hashtag"` Keyword interface{} `json:"keyword"` User User `json:"user"` }
IGTVItem is a media item that can be found inside the IGTV struct, from the
IGTV Discover endpoint.
type Images ¶
type Images struct {
Versions []Candidate `json:"candidates"`
}
Images are different quality images
type Inbox ¶
type Inbox struct { Conversations []*Conversation `json:"threads"` Pending []*Conversation `json:"pending"` HasNewer bool `json:"has_newer"` // TODO HasOlder bool `json:"has_older"` Cursor string `json:"oldest_cursor"` UnseenCount int `json:"unseen_count"` UnseenCountTS int64 `json:"unseen_count_ts"` MostRecentInviter User `json:"most_recent_inviter"` BlendedInboxEnabled bool `json:"blended_inbox_enabled"` NextCursor struct { CursorV2ID float64 `json:"cursor_thread_v2_id"` CursorTimestampSec float64 `json:"cursor_timestamp_seconds"` } `json:"next_cursor"` PrevCursor struct { CursorV2ID float64 `json:"cursor_thread_v2_id"` CursorTimestampSec float64 `json:"cursor_timestamp_seconds"` } `json:"prev_cursor"` // this fields are copied from response SeqID int64 `json:"seq_id"` PendingRequestsTotal int `json:"pending_requests_total"` HasPendingTopRequests bool `json:"has_pending_top_requests"` SnapshotAtMs int64 `json:"snapshot_at_ms"` // contains filtered or unexported fields }
Inbox is the direct message inbox.
Inbox contains Conversations. Each conversation has InboxItems. InboxItems are the message of the chat.
func (*Inbox) InitialSnapshot ¶
InitialSnapshot fetches the initial messages on app open, and is called
from Instagram.OpenApp() automatically.
func (*Inbox) New ¶
func (inbox *Inbox) New(user *User, text string) (*Conversation, error)
New will send a message to a user in an existring message thread if it exists,
if not, it will create a new one. It will return the Conversation object, for further messages you can call Conversation.Send()
func (*Inbox) NextPending ¶
NextPending allows pagination over pending messages.
func (*Inbox) SyncPending ¶
SyncPending updates inbox pending messages.
type InboxItem ¶
type InboxItem struct { ID string `json:"item_id"` UserID int64 `json:"user_id"` Timestamp int64 `json:"timestamp"` ClientContext string `json:"client_context"` IsShhMode bool `json:"is_shh_mode"` TqSeqID int `json:"tq_seq_id"` // Type there are a few types: // text, like, raven_media, action_log, media_share, reel_share, link, clip Type string `json:"item_type"` // Text is message text. Text string `json:"text"` Like string `json:"like"` Clip *clip `json:"clip"` Reel *reelShare `json:"reel_share"` Media *Item `json:"media"` AnimatedMedia *AnimatedMedia `json:"animated_media"` VoiceMedia *VoiceMedia `json:"voice_media"` VisualMedia *VisualMedia `json:"visual_media"` ActionLog *actionLog `json:"action_log"` Link struct { Text string `json:"text"` Context struct { URL string `json:"link_url"` Title string `json:"link_title"` Summary string `json:"link_summary"` ImageURL string `json:"link_image_url"` } `json:"link_context"` } `json:"link"` }
InboxItem is any conversation message.
type InboxItemLike ¶
type InboxItemLike struct { ItemID string `json:"item_id"` ItemType string `json:"item_type"` Timestamp int64 `json:"timestamp"` UserID int64 `json:"user_id"` }
InboxItemLike is the heart sent during a conversation.
type InboxItemMedia ¶
type InboxItemMedia struct { ClientContext string `json:"client_context"` ExpiringMediaActionSummary struct { Count int `json:"count"` Timestamp int64 `json:"timestamp"` Type string `json:"type"` } `json:"expiring_media_action_summary"` ItemID string `json:"item_id"` ItemType string `json:"item_type"` RavenMedia struct { MediaType int64 `json:"media_type"` } `json:"raven_media"` ReplyChainCount int `json:"reply_chain_count"` SeenUserIds []interface{} `json:"seen_user_ids"` Timestamp int64 `json:"timestamp"` UserID int64 `json:"user_id"` ViewMode string `json:"view_mode"` }
InboxItemMedia is inbox media item
type Instagram ¶
type Instagram struct { // Timeline provides access to your timeline Timeline *Timeline // Discover provides access to the discover/explore page Discover *Discover // Profiles provides methods for interaction with other user's profiles Profiles *Profiles // IGTV allows you to fetch the IGTV Discover page IGTV *IGTV // Account stores all personal data of the user and his/her options. Account *Account // Collections represents your collections with saved posts Collections *Collections // Searchbar provides methods to access IG's search functionalities Searchbar *Search // Activity are instagram notifications. Activity *Activity // Inbox provides to Instagram's message/chat system Inbox *Inbox // Feed provides access to secondary feeds such as user's and hashtag's feeds Feed *Feed // Contacts provides address book sync/unsync methods Contacts *Contacts // Locations provde feed by location ID. To find location feeds by name use Searchbar Locations *LocationInstance // Challenge stores the challenge info if provided Challenge *Challenge // Checkpoint stores the checkpoint info, this is usually a prompt to accept cookies Checkpoint *Checkpoint // TwoFactorInfo enabled 2FA TwoFactorInfo *TwoFactorInfo // Set to true to debug reponses Debug bool // contains filtered or unexported fields }
Instagram represent the main API handler
Timeline: Represents instagram's main timeline. Profiles: Represents instagram's user profile. Account: Represents instagram's personal account. Collections: Represents instagram's saved post collections. Searchbar: Represents instagram's search. Activity: Represents instagram's user activity and notifications. Feed: Represents instagram's feed for e.g. user pages and hashtags. Contacts: Represents instagram's sync with contact book. Inbox: Represents instagram's messages. Locations: Represents instagram's locations. Challenges: Represents instagram's url challenges TwoFactorInfo Represents Instagram's 2FA login
See Scheme section in README.md for more information.
We recommend to use Export and Import functions after first Login.
Also you can use SetProxy and UnsetProxy to set and unset proxy. Golang also provides the option to set a proxy using HTTP_PROXY env var.
func EnvLoadAccs ¶
EnvLoadAccs loads all the environment variables.
By default, the OS environment variables as well as .env are loaded To load a custom file, instead of .env, pass the filepath as an argument.
Don't Sync param is set to true to prevent any http calls on import by default
func EnvRandAcc ¶
EnvRandAcc will check the environment variables, and the .env file in
the current working directory (unless another path has been provided), for either a base64 encoded goinsta config, or plain credentials.
To use this function, add one or multiple of the following:
INSTAGRAM_ACT_<name>="username:password" INSTAGRAM_BASE64_<name>="<base64 encoded config>"
INSTAGRAM_ACT_ variables will automatiaclly be converted to INSTAGRAM_BASE64_
func Import ¶
Import imports instagram configuration
This function does not set proxy automatically. Use SetProxy after this call.
func ImportConfig ¶
func ImportConfig(config ConfigFile, args ...interface{}) (*Instagram, error)
ImportConfig imports instagram configuration from a configuration object.
Add optional bool:true parameter to prevent account sync on import (do not make any http calls)
This function does not set proxy automatically. Use SetProxy after this call.
func ImportFromBase64String ¶
ImportFromBase64String imports instagram configuration from a base64 encoded string.
This function does not set proxy automatically. Use SetProxy after this call.
func ImportFromBytes ¶
ImportFromBytes imports instagram configuration from an array of bytes.
This function does not set proxy automatically. Use SetProxy after this call.
func ImportReader ¶
ImportReader imports instagram configuration from io.Reader
This function does not set proxy automatically. Use SetProxy after this call.
func New ¶
New creates Instagram structure.
:params:
username:string password:string totp:string -- OPTIONAL: 2FA private key, aka seed, used to generate 2FA codes checks for empty string, so it's safe to pass in an empty string.
func (*Instagram) ExportAsBase64String ¶
ExportAsBase64String exports selected *Instagram object as base64 encoded string
func (*Instagram) ExportAsBytes ¶
ExportAsBytes exports selected *Instagram object as []byte
func (*Instagram) ExportConfig ¶
func (insta *Instagram) ExportConfig() ConfigFile
func (*Instagram) GetMedia ¶
GetMedia returns media specified by id.
The argument can be int64 or string ¶
See example: examples/media/like.go
func (*Instagram) Login ¶
Login performs instagram login sequence in close resemblance to the android apk.
Password can optionally be provided for re-logins. If you create the insta object with goinsta.New(), there is no need to.
Password will be deleted after login
func (*Instagram) NewBroadcast ¶
NewUser returns prepared user to be used with his functions.
func (*Instagram) NewHashtag ¶
NewHashtag returns initialized hashtag structure. Name parameter is hashtag name.
func (*Instagram) Search ¶
func (insta *Instagram) Search(query string, p ...bool) (*SearchResult, error)
Search is a wrapper for insta.Searchbar.Search() Search will perform a topsearch query returning users, locations and tags,
just like the app would.
By default search behavior will be mimicked by sending a search request per
added letter, and waiting a few millis in between, just as if you were to type anything into the search bar. However, if you only want to make one search request passing in the full query immediately, you can turn on quick search by passing in one bool:true parameter, like so: Search("myquery", true) // this will perform a quick search
func (*Instagram) SetCookieJar ¶
SetCookieJar sets the Cookie Jar. This further allows to use a custom implementation of a cookie jar which may be backed by a different data store such as redis.
func (*Instagram) SetDebugHandler ¶
func (insta *Instagram) SetDebugHandler(f func(...interface{}))
func (*Instagram) SetDevice ¶
SetDevice allows you to set a custom device. This will also change the
user agent based on the new device.
func (*Instagram) SetDeviceID ¶
SetDeviceID sets device id | android-1923fjnma8123
func (*Instagram) SetFamilyID ¶
SetPhoneID sets phone family id, v4 uuid | 8b13e7b3-28f7-4e05-9474-358c6602e3f8
func (*Instagram) SetHTTPClient ¶
SetHTTPClient sets http client. This further allows users to use this functionality for HTTP testing using a mocking HTTP client Transport, which avoids direct calls to the Instagram, instead of returning mocked responses.
func (*Instagram) SetHTTPTransport ¶
func (insta *Instagram) SetHTTPTransport(transport http.RoundTripper)
SetHTTPTransport sets http transport. This further allows users to tweak the underlying low level transport for adding additional fucntionalities.
func (*Instagram) SetInfoHandler ¶
func (insta *Instagram) SetInfoHandler(f func(...interface{}))
func (*Instagram) SetPhoneID ¶
SetPhoneID sets phone id, v4 uuid | fbf767a4-260a-490d-bcbb-ee7c9ed7c576
func (*Instagram) SetTOTPSeed ¶
SetTOTPSeed will set the seed used to generate 2FA codes.
func (*Instagram) SetTimeout ¶ added in v3.1.1
SetTimeout will set the client timeout
func (*Instagram) SetWarnHandler ¶
func (insta *Instagram) SetWarnHandler(f func(...interface{}))
func (*Instagram) SetWrapper ¶
func (insta *Instagram) SetWrapper(fn ReqWrapper)
func (*Instagram) UnsetProxy ¶
func (insta *Instagram) UnsetProxy()
UnsetProxy unsets proxy for connection.
func (*Instagram) Upload ¶
func (insta *Instagram) Upload(o *UploadOptions) (*Item, error)
Upload is the single function used for all upload in goinsta. You can specify the options of your upload with the single parameter &UploadOptions{} See the UploadOptions struct for more details.
func (*Instagram) VisitProfile ¶
VisitProfile will perform the same request sequence as if you visited a profile
in the app. It will first call Instagram.Search(user), then register the click, and lastly visit the profile with User.VisitProfile() and gather (some) posts from the user feed, stories, grab the friendship status, and if available IGTV posts.
You can access the profile info from the profile struct by calling Profile.Feed,
Profile.Stories, Profile.User etc. See the Profile struct for all properties.
type Item ¶
type Item struct { Comments *Comments `json:"-"` // Post Info TakenAt int64 `json:"taken_at"` Pk int64 `json:"pk"` ID interface{} `json:"id"` // Most of the times a string Index int // position in feed CommentsDisabled bool `json:"comments_disabled"` DeviceTimestamp int64 `json:"device_timestamp"` FacepileTopLikers []struct { FollowFrictionType float64 `json:"follow_friction_type"` FullNeme string `json:"ful_name"` IsPrivate bool `json:"is_private"` IsVerified bool `json:"is_verified"` Pk float64 `json:"pk"` ProfilePicID string `json:"profile_pic_id"` ProfilePicURL string `json:"profile_pic_url"` Username string `json:"username"` } `json:"facepile_top_likers,omitempty"` MediaType int `json:"media_type,omitempty"` Code string `json:"code,omitempty"` ClientCacheKey string `json:"client_cache_key,omitempty"` FilterType int `json:"filter_type,omitempty"` User *UserMinimal `json:"user,omitempty"` CanReply bool `json:"can_reply,omitempty"` Caption Caption `json:"caption,omitempty"` CaptionIsEdited bool `json:"caption_is_edited,omitempty"` LikeViewCountDisabled bool `json:"like_and_view_counts_disabled,omitempty"` FundraiserTag struct { HasStandaloneFundraiser bool `json:"has_standalone_fundraiser,omitempty"` } `json:"fundraiser_tag,omitempty"` IsSeen bool `json:"is_seen,omitempty"` InventorySource string `json:"inventory_source,omitempty"` ProductType string `json:"product_type,omitempty"` Likes int `json:"like_count,omitempty"` HasLiked bool `json:"has_liked,omitempty"` NearlyCompleteCopyRightMatch bool `json:"nearly_complete_copyright_match,omitempty"` // Toplikers can be `string` or `[]string`. // Use TopLikers function instead of getting it directly. Toplikers interface{} `json:"top_likers,omitempty"` Likers []*UserMinimal `json:"likers,omitempty"` PhotoOfYou bool `json:"photo_of_you,omitempty"` // Comments CommentLikesEnabled bool `json:"comment_likes_enabled,omitempty"` CommentThreadingEnabled bool `json:"comment_threading_enabled,omitempty"` HasMoreComments bool `json:"has_more_comments,omitempty"` MaxNumVisiblePreviewComments int `json:"max_num_visible_preview_comments,omitempty"` // To fetch, call feed.GetCommentInfo(), or item.GetCommentInfo() CommentInfo *CommentInfo `json:"comment_info,emitempty"` // Will always be zero, call feed.GetCommentInfo() CommentCount int `json:"comment_count"` // Previewcomments can be `string` or `[]string` or `[]Comment`. // Use PreviewComments function instead of getting it directly. Previewcomments interface{} `json:"preview_comments,omitempty"` // Tags are tagged people in photo Tags struct { In []Tag `json:"in"` } `json:"usertags,omitempty"` FbUserTags Tag `json:"fb_user_tags,omitempty"` CanViewerSave bool `json:"can_viewer_save,omitempty"` OrganicTrackingToken string `json:"organic_tracking_token,omitempty"` // Images contains URL images in different versions. // Version = quality. Images Images `json:"image_versions2,omitempty"` OriginalWidth int `json:"original_width,omitempty"` OriginalHeight int `json:"original_height,omitempty"` ImportedTakenAt int64 `json:"imported_taken_at,omitempty"` Location Location `json:"location,omitempty"` Lat float64 `json:"lat,omitempty"` Lng float64 `json:"lng,omitempty"` // Carousel CarouselParentID string `json:"carousel_parent_id"` CarouselMedia []Item `json:"carousel_media,omitempty"` // Live IsPostLive bool `json:"is_post_live"` // Videos Videos []Video `json:"video_versions,omitempty"` VideoCodec string `json:"video_codec"` HasAudio bool `json:"has_audio,omitempty"` VideoDuration float64 `json:"video_duration,omitempty"` ViewCount float64 `json:"view_count,omitempty"` PlayCount float64 `json:"play_count,omitempty"` IsDashEligible int `json:"is_dash_eligible,omitempty"` IsUnifiedVideo bool `json:"is_unified_video"` VideoDashManifest string `json:"video_dash_manifest,omitempty"` NumberOfQualities int `json:"number_of_qualities,omitempty"` // IGTV Title string `json:"title"` IGTVExistsInViewerSeries bool `json:"igtv_exists_in_viewer_series"` IGTVSeriesInfo *struct { HasCoverPhoto bool `json:"has_cover_photo"` ID int64 NumEpisodes int `json:"num_episodes"` Title string `json:"title"` } `json:"igtv_series_info"` IGTVAdsInfo *struct { AdsToggledOn bool `json:"ads_toggled_on"` ElegibleForInsertingAds bool `json:"is_video_elegible_for_inserting_ads"` } `json:"igtv_ads_info"` // Ads IsCommercial bool `json:"is_commercial,omitempty"` IsPaidPartnership bool `json:"is_paid_partnership,omitempty"` CommercialityStatus string `json:"commerciality_status,omitempty"` AdLink string `json:"link,omitempty"` AdLinkText string `json:"link_text,omitempty"` AdLinkHint string `json:"link_hint_text,omitempty"` AdTitle string `json:"overlay_title,omitempty"` AdSubtitle string `json:"overlay_subtitle,omitempty"` AdText string `json:"overlay_text,omitempty"` AdAction string `json:"ad_action,omitempty"` AdHeaderStyle int `json:"ad_header_style,omitempty"` AdLinkType int `json:"ad_link_type,omitempty"` AdMetadata []struct { Type int `json:"type,omitempty"` Value interface{} `json:"value,omitempty"` } `json:"ad_metadata,omitempty"` AndroidLinks []struct { AndroidClass string `json:"androidClass,omitempty"` CallToActionTitle string `json:"callToActionTitle,omitempty"` DeeplinkUri string `json:"deeplinkUri,omitempty"` LinkType int `json:"linkType,omitempty"` Package string `json:"package,omitempty"` WebUri string `json:"webUri,omitempty"` } `json:"android_links,omitempty"` // Only for stories StoryEvents []interface{} `json:"story_events,omitempty"` StoryPolls []interface{} `json:"story_polls,omitempty"` StoryFeedMedia []interface{} `json:"story_feed_media,omitempty"` StorySoundOn []interface{} `json:"story_sound_on,omitempty"` CreativeConfig interface{} `json:"creative_config,omitempty"` StoryLocations []interface{} `json:"story_locations,omitempty"` StorySliders []interface{} `json:"story_sliders,omitempty"` StoryQuestions []interface{} `json:"story_questions,omitempty"` StoryProductItems []interface{} `json:"story_product_items,omitempty"` StoryCTA []StoryCTA `json:"story_cta,omitempty"` IntegrityReviewDecision string `json:"integrity_review_decision,omitempty"` IsReelMedia bool `json:"is_reel_media,omitempty"` ProfileGridControl bool `json:"profile_grid_control_enabled,omitempty"` ReelMentions []StoryReelMention `json:"reel_mentions,omitempty"` ExpiringAt int64 `json:"expiring_at,omitempty"` CanSendCustomEmojis bool `json:"can_send_custom_emojis,omitempty"` SupportsReelReactions bool `json:"supports_reel_reactions,omitempty"` Mentions []Mentions Audience string `json:"audience,omitempty"` StoryMusicStickers []struct { X float64 `json:"x,omitempty"` Y float64 `json:"y,omitempty"` Z int `json:"z,omitempty"` Width float64 `json:"width,omitempty"` Height float64 `json:"height,omitempty"` Rotation float64 `json:"rotation,omitempty"` IsPinned int `json:"is_pinned,omitempty"` IsHidden int `json:"is_hidden,omitempty"` IsSticker int `json:"is_sticker,omitempty"` MusicAssetInfo struct { ID string `json:"id,omitempty"` Title string `json:"title,omitempty"` Subtitle string `json:"subtitle,omitempty"` DisplayArtist string `json:"display_artist,omitempty"` CoverArtworkURI string `json:"cover_artwork_uri,omitempty"` CoverArtworkThumbnailURI string `json:"cover_artwork_thumbnail_uri,omitempty"` ProgressiveDownloadURL string `json:"progressive_download_url,omitempty"` HighlightStartTimesInMs []int `json:"highlight_start_times_in_ms,omitempty"` IsExplicit bool `json:"is_explicit,omitempty"` DashManifest string `json:"dash_manifest,omitempty"` HasLyrics bool `json:"has_lyrics,omitempty"` AudioAssetID string `json:"audio_asset_id,omitempty"` IgArtist struct { Pk int `json:"pk,omitempty"` Username string `json:"username,omitempty"` FullName string `json:"full_name,omitempty"` IsPrivate bool `json:"is_private,omitempty"` ProfilePicURL string `json:"profile_pic_url,omitempty"` ProfilePicID string `json:"profile_pic_id,omitempty"` IsVerified bool `json:"is_verified,omitempty"` } `json:"ig_artist,omitempty"` PlaceholderProfilePicURL string `json:"placeholder_profile_pic_url,omitempty"` ShouldMuteAudio bool `json:"should_mute_audio,omitempty"` ShouldMuteAudioReason string `json:"should_mute_audio_reason,omitempty"` OverlapDurationInMs int `json:"overlap_duration_in_ms,omitempty"` AudioAssetStartTimeInMs int `json:"audio_asset_start_time_in_ms,omitempty"` StoryLinkStickers []struct { X float64 `json:"x,omitempty"` Y float64 `json:"y,omitempty"` Z int `json:"z,omitempty"` Width float64 `json:"width,omitempty"` Height float64 `json:"height,omitempty"` Rotation int `json:"rotation,omitempty"` IsPinned int `json:"is_pinned,omitempty"` IsHidden int `json:"is_hidden,omitempty"` IsSticker int `json:"is_sticker,omitempty"` IsFbSticker int `json:"is_fb_sticker,omitempty"` StoryLink struct { LinkType string `json:"link_type,omitempty"` URL string `json:"url,omitempty"` LinkTitle string `json:"link_title,omitempty"` DisplayURL string `json:"display_url,omitempty"` } `json:"story_link,omitempty"` } `json:"story_link_stickers,omitempty"` } `json:"music_asset_info,omitempty"` } `json:"story_music_stickers,omitempty"` // contains filtered or unexported fields }
Item represents media items
All Item has Images or Videos objects which contains the url(s). You can use the Download function to get the best quality Image or Video from Item.
func (*Item) Comment ¶
Comment pushes a text comment to media item.
If parent media is a Story this function will send a private message replying the Instagram story.
func (*Item) CommentCheckOffensive ¶
func (item *Item) CommentCheckOffensive(comment string) (*CommentOffensive, error)
func (*Item) Delete ¶
Delete deletes your media item. StoryMedia or FeedMedia
See example: examples/media/mediaDelete.go
func (*Item) Download ¶
Download will download a media item and directly return it as a byte slice. If you wish to download a picture to a folder, use item.DownloadTo(path)
func (*Item) DownloadTo ¶
func (item *Item) Download(folder, name string) (m []byte, err error) { return nil, nil }
func (*Item) GetCommentInfo ¶
GetCommentInfo will fetch the item.CommentInfo for an item
func (*Item) Hashtags ¶
Hashtags returns caption hashtags.
Item media parent must be FeedMedia.
See example: examples/media/hashtags.go
func (*Item) MediaToString ¶
MediaToString returns Item.MediaType as string.
func (*Item) PreviewComments ¶
PreviewComments returns string slice or single string (inside Comment slice) Depending on PreviewComments parameter. If PreviewComments are string or []string only the Text field will be filled.
func (*Item) SaveTo ¶
func (item *Item) SaveTo(c *Collection) error
Saveto allows you to save a media item to a specific collection
func (*Item) StoryIsCloseFriends ¶
StoryIsCloseFriends returns a bool If the returned value is true the story was published only for close friends
func (*Item) SyncLikers ¶
SyncLikers fetch new likers of a media
This function updates Item.Likers value
func (*Item) TopLikers ¶
TopLikers returns string slice or single string (inside string slice) Depending on TopLikers parameter.
type LayoutSection ¶
type LayoutSection struct { LayoutType string `json:"layout_type"` LayoutContent struct { Medias []struct { Media Item `json:"media"` } `json:"medias"` } `json:"layout_content"` FeedType string `json:"feed_type"` ExploreItemInfo struct { NumColumns int `json:"num_columns"` TotalNumColumns int `json:"total_num_columns"` AspectRatio float64 `json:"aspect_ratio"` Autoplay bool `json:"autoplay"` } `json:"explore_item_info"` }
type LiveItems ¶
type LiveItems struct { ID string `json:"pk"` User User `json:"user"` Broadcasts []*Broadcast `json:"broadcasts"` LastSeenBroadcastTs float64 `json:"last_seen_broadcast_ts"` RankedPosition int64 `json:"ranked_position"` SeenRankedPosition int64 `json:"seen_ranked_position"` Muted bool `json:"muted"` CanReply bool `json:"can_reply"` }
LiveItems are Live media items
type Location ¶
type Location struct { ID int64 `json:"pk"` Name string `json:"name"` Address string `json:"address"` City string `json:"city"` ShortName string `json:"short_name"` Lng float64 `json:"lng"` Lat float64 `json:"lat"` ExternalSource string `json:"external_source"` FacebookPlacesID int64 `json:"facebook_places_id"` // contains filtered or unexported fields }
Location stores media location information.
func (*Location) NewPostTag ¶
func (l *Location) NewPostTag() *LocationTag
NewPostTag creates a LocationTag from a location, which can be used as a
location tag in posts.
type LocationInstance ¶
type LocationInstance struct {
// contains filtered or unexported fields
}
type LocationTag ¶
type LocationTag struct { Name string `json:"name"` Address string `json:"address"` Lat float64 `json:"lat"` Lng float64 `json:"lng"` ExternalSource string `json:"external_source"` PlacesID string `json:"facebook_places_id"` }
LocationTag represents a post location tag
type Media ¶
type Media interface { // Next allows pagination Next(...interface{}) bool // Error returns error (in case it have been occurred) Error() error // ID returns media id GetNextID() string // Delete removes media Delete() error // contains filtered or unexported methods }
Media interface defines methods for both StoryMedia and FeedMedia.
type MediaItem ¶
type MediaItem struct {
Media Item `json:"media"`
}
MediaItem defines a item media for the SavedMedia struct
type Mentions ¶
type Mentions struct { X float64 `json:"x"` Y float64 `json:"y"` Z int64 `json:"z"` Width float64 `json:"width"` Height float64 `json:"height"` Rotation float64 `json:"rotation"` IsPinned int `json:"is_pinned"` User User `json:"user"` }
Mentions is a user being mentioned on media.
type Nametag ¶
type Nametag struct { Mode int64 `json:"mode"` Gradient json.Number `json:"gradient,Number"` Emoji string `json:"emoji"` SelfieSticker json.Number `json:"selfie_sticker,Number"` }
Nametag is part of the account information.
type NewSupporter ¶
type NewSupporter struct { RepeatedSupporter bool `json:"is_repeat_supporter"` SupportTier string `json:"support_tier"` Timestamp float64 `json:"ts_secs"` User struct { ID int64 `json:"pk"` Username string `json:"username"` FullName string `json:"full_name"` IsPrivate bool `json:"is_private"` IsVerified bool `json:"is_verified"` } }
type PendingRequests ¶
type PendingRequests struct { Users []*User `json:"users"` // TODO: pagination BigList bool `json:"big_list"` GlobalBlacklistSample interface{} `json:"global_blacklist_sample"` NextMaxID string `json:"next_max_id"` PageSize int `json:"page_size"` TruncateFollowRequestAtIndex int `json:"truncate_follow_requests_at_index"` Sections interface{} `json:"sections"` SuggestedUsers SuggestedUsers `json:"suggested_users"` Status string `json:"status"` }
type PicURLInfo ¶
type PicURLInfo struct { Height int `json:"height"` URL string `json:"url"` Width int `json:"width"` }
PicURLInfo repre
type Profile ¶
type Profile struct { User *User Friendship *Friendship Feed *FeedMedia Stories *StoryMedia Highlights []*Reel IGTV *IGTVChannel }
Profile represents an instagram user with their various properties, such as
their account info, stored in Profile.User (a *User struct), feed, stories, Highlights, IGTV posts, and friendship status.
type Profiles ¶
type Profiles struct {
// contains filtered or unexported fields
}
Profiles allows user function interactions
func (*Profiles) Blocked ¶
func (prof *Profiles) Blocked() ([]BlockedUser, error)
Blocked returns a list of users you have blocked.
type RecentItems ¶
type RecentItems struct { Type int `json:"type"` StoryType int `json:"story_type"` Args struct { Text string `json:"text"` RichText string `json:"rich_text"` IconUrl string `json:"icon_url"` Links []struct { Start int `json:"start"` End int `json:"end"` Type string `json:"type"` ID interface{} `json:"id"` } `json:"links"` InlineFollow struct { UserInfo User `json:"user_info"` Following bool `json:"following"` OutgoingRequest bool `json:"outgoing_request"` } `json:"inline_follow"` Actions []string `json:"actions"` AfCandidateId int `json:"af_candidate_id"` ProfileID int64 `json:"profile_id"` ProfileImage string `json:"profile_image"` Timestamp float64 `json:"timestamp"` Tuuid string `json:"tuuid"` Clicked bool `json:"clicked"` ProfileName string `json:"profile_name"` LatestReelMedia int64 `json:"latest_reel_media"` Destination string `json:"destination"` Extra interface{} `json:"extra"` } `json:"args"` Counts struct{} `json:"counts"` Pk string `json:"pk"` }
type Reel ¶
type Reel struct { ID interface{} `json:"id"` Items []*Item `json:"items"` MediaCount int `json:"media_count"` MediaIDs []int64 `json:"media_ids"` Muted bool `json:"muted"` LatestReelMedia int64 `json:"latest_reel_media"` LatestBestiesReelMedia float64 `json:"latest_besties_reel_media"` ExpiringAt float64 `json:"expiring_at"` Seen float64 `json:"seen"` SeenRankedPosition int `json:"seen_ranked_position"` CanReply bool `json:"can_reply"` CanGifQuickReply bool `json:"can_gif_quick_reply"` ClientPrefetchScore float64 `json:"client_prefetch_score"` Title string `json:"title"` ReelType string `json:"reel_type"` ReelMentions []string `json:"reel_mentions"` PrefetchCount int `json:"prefetch_count"` // this field can be int or bool HasBestiesMedia interface{} `json:"has_besties_media"` HasPrideMedia bool `json:"has_pride_media"` HasVideo bool `json:"has_video"` IsCacheable bool `json:"is_cacheable"` IsSensitiveVerticalAd bool `json:"is_sensitive_vertical_ad"` RankedPosition int `json:"ranked_position"` RankerScores struct { Fp float64 `json:"fp"` Ptap float64 `json:"ptap"` Vm float64 `json:"vm"` } `json:"ranker_scores"` StoryRankingToken string `json:"story_ranking_token"` FaceFilterNuxVersion int `json:"face_filter_nux_version"` HasNewNuxStory bool `json:"has_new_nux_story"` User User `json:"user"` // contains filtered or unexported fields }
Reel represents a single user's story collection. Every user has one reel, and one reel can contain many story items
type ReqWrapper ¶
type ReqWrapper interface {
GoInstaWrapper(*ReqWrapperArgs) (body []byte, h http.Header, err error)
}
type ReqWrapperArgs ¶
type ReqWrapperArgs struct { Body []byte Headers http.Header Error error // contains filtered or unexported fields }
func (*ReqWrapperArgs) GetEndpoint ¶
func (w *ReqWrapperArgs) GetEndpoint() string
func (*ReqWrapperArgs) GetInsta ¶
func (w *ReqWrapperArgs) GetInsta() *Instagram
func (*ReqWrapperArgs) GetWrapperCount ¶
func (w *ReqWrapperArgs) GetWrapperCount() int
func (*ReqWrapperArgs) Ignore429 ¶
func (w *ReqWrapperArgs) Ignore429() bool
func (*ReqWrapperArgs) RetryRequest ¶
func (w *ReqWrapperArgs) RetryRequest() (body []byte, h http.Header, err error)
func (*ReqWrapperArgs) SetInsta ¶
func (w *ReqWrapperArgs) SetInsta(insta *Instagram)
type SavedMedia ¶
type SavedMedia struct { Items []MediaItem `json:"items"` NumResults int `json:"num_results"` MoreAvailable bool `json:"more_available"` AutoLoadMoreEnabled bool `json:"auto_load_more_enabled"` Status string `json:"status"` NextID interface{} `json:"next_max_id"` // contains filtered or unexported fields }
SavedMedia stores information about ALL your saved posts, regardless of their collection. This is the same to vising your saved posts page, and clicking "All Posts". If you want to view a single collection, use the Collections type.
func (*SavedMedia) Delete ¶
func (media *SavedMedia) Delete() error
Delete will unsave ALL saved items.
func (*SavedMedia) Error ¶
func (media *SavedMedia) Error() error
Error returns the SavedMedia error
func (*SavedMedia) Next ¶
func (media *SavedMedia) Next(params ...interface{}) bool
Next allows pagination of "All Posts" collection
func (*SavedMedia) Sync ¶
func (media *SavedMedia) Sync() error
Sync will fetch the initial saved items. The first call to fetch posts will always be sync, however you can also only
call SavedMedia.Next() as Sync() will automatically be called if required.
type ScoresBootstrapUsers ¶
type Search ¶
type Search struct {
// contains filtered or unexported fields
}
Search is the object for all searches like Facebook, Location or Tag search.
func (*Search) History ¶
func (sb *Search) History() (*[]SearchHistory, error)
func (*Search) Search ¶
func (sb *Search) Search(query string, p ...bool) (*SearchResult, error)
Search will perform a topsearch query returning users, locations and tags,
just like the app would.
By default search behavior will be mimicked by sending a search request per
added letter, and waiting a few millis in between, just as if you were to type anything into the search bar. However, if you only want to make one search request passing in the full query immediately, you can turn on quick search by passing in one bool:true parameter, like so: Search("myquery", true) // this will perform a quick search
func (*Search) SearchHashtag ¶
func (sb *Search) SearchHashtag(query string, p ...bool) (*SearchResult, error)
SearchHashtag will perform a hashtag search with the provided query.
By default search behavior will be mimicked by sending a search request per
added letter, and waiting a few millis in between, just as if you were to type anything into the search bar. However, if you only want to make one search request passing in the full query immediately, you can turn on quick search by passing in one bool:true parameter, like so: SearchHashtag("myquery", true) // this will perform a quick search
func (*Search) SearchLocation ¶
func (sb *Search) SearchLocation(query string, p ...bool) (*SearchResult, error)
SearchLocation will perform a location search with the provided query.
By default search behavior will be mimicked by sending a search request per
added letter, and waiting a few millis in between, just as if you were to type anything into the search bar. However, if you only want to make one search request passing in the full query immediately, you can turn on quick search by passing in one bool:true parameter, like so: SearchLocation("myquery", true) // this will perform a quick search
func (*Search) SearchUser ¶
func (sb *Search) SearchUser(query string, p ...bool) (*SearchResult, error)
SearchUser will perorm a user search with the provided query.
By default search behavior will be mimicked by sending a search request per
added letter, and waiting a few millis in between, just as if you were to type anything into the search bar. However, if you only want to make one search request passing in the full query immediately, you can turn on quick search by passing in one bool:true parameter, like so: SearchUser("myquery", true) // this will perform a quick search
type SearchFunc ¶
type SearchFunc interface{}
type SearchHistory ¶
type SearchResult ¶
type SearchResult struct { HasMore bool `json:"has_more"` PageToken string `json:"page_token"` RankToken string `json:"rank_token"` Status string `json:"status"` NumResults int64 `json:"num_results"` Query string SearchSurface string // Regular Search Results Results []*TopSearchItem `json:"list"` History []SearchHistory // User search results Users []*User `json:"users"` // Loaction search results Places []Place `json:"items"` // Tag search results Tags []*Hashtag `json:"results"` // Location search result RequestID string `json:"request_id"` Venues []struct { ExternalIDSource string `json:"external_id_source"` ExternalID string `json:"external_id"` Lat float64 `json:"lat"` Lng float64 `json:"lng"` Address string `json:"address"` Name string `json:"name"` } `json:"venues"` ClearClientCache bool `json:"clear_client_cache"` // contains filtered or unexported fields }
SearchResult handles the data for the results given by each type of Search.
func (*SearchResult) Error ¶
func (sr *SearchResult) Error() error
func (*SearchResult) Next ¶
func (sr *SearchResult) Next() bool
func (*SearchResult) RegisterHashtagClick ¶
func (sr *SearchResult) RegisterHashtagClick(h *Hashtag) error
RegisterHashtagClick send a register click request, and calls Hashtag.Info()
func (*SearchResult) RegisterLocationClick ¶
func (sr *SearchResult) RegisterLocationClick(l *Location) error
RegisterLocationClick send a register click request
func (*SearchResult) RegisterUserClick ¶
func (sr *SearchResult) RegisterUserClick(user *User) error
type StoryCTA ¶
type StoryCTA struct { Links []struct { LinkType int `json:"linkType"` WebURI string `json:"webUri"` AndroidClass string `json:"androidClass"` Package string `json:"package"` DeeplinkURI string `json:"deeplinkUri"` CallToActionTitle string `json:"callToActionTitle"` RedirectURI interface{} `json:"redirectUri"` LeadGenFormID string `json:"leadGenFormId"` IgUserID string `json:"igUserId"` AppInstallObjectiveInvalidationBehavior interface{} `json:"appInstallObjectiveInvalidationBehavior"` } `json:"links"` }
StoryCTA represent story cta
type StoryMedia ¶
type StoryMedia struct { Reel Reel `json:"reel"` Broadcast *Broadcast `json:"broadcast"` Broadcasts []*Broadcast `json:"broadcasts"` Status string `json:"status"` }
StoryMedia is the struct that handles the information from the methods to get info about Stories.
type StoryReelMention ¶
type StoryReelMention struct { X float64 `json:"x"` Y float64 `json:"y"` Z int `json:"z"` Width float64 `json:"width"` Height float64 `json:"height"` Rotation float64 `json:"rotation"` IsPinned int `json:"is_pinned"` IsHidden int `json:"is_hidden"` IsSticker int `json:"is_sticker"` IsFBSticker int `json:"is_fb_sticker"` User User DisplayType string `json:"display_type"` }
StoryReelMention represent story reel mention
type SuggestedUsers ¶
type SuggestedUsers struct { Type int `json:"type"` Suggestions []struct { User struct { ID interface{} `json:"pk"` Username string `json:"username"` FullName string `json:"full_name"` IsVerified bool `json:"is_verified"` IsPrivate bool `json:"is_private"` HasHighlightReels bool `json:"has_highlight_reels"` HasAnonymousProfilePicture bool `json:"has_anonymous_profile_picture"` ProfilePicID string `json:"profile_pic_id"` ProfilePicURL string `json:"profile_pic_url"` AccountBadges []interface{} `json:"account_badges"` } `json:"user"` Algorithm string `json:"algorithm"` SocialContext string `json:"social_context"` Icon string `json:"icon"` Caption string `json:"caption"` MediaIds []interface{} `json:"media_ids"` ThumbnailUrls []string `json:"thumbnail_urls"` LargeUrls []string `json:"large_urls"` MediaInfos []interface{} `json:"media_infos"` Value float64 `json:"value"` IsNewSuggestion bool `json:"is_new_suggestion"` } `json:"suggestions"` LandingSiteType string `json:"landing_site_type"` Title string `json:"title"` ViewAllText string `json:"view_all_text"` LandingSiteTitle string `json:"landing_site_title"` NetegoType string `json:"netego_type"` UpsellFbPos string `json:"upsell_fb_pos"` AutoDvance string `json:"auto_dvance"` ID string `json:"id"` TrackingToken string `json:"tracking_token"` }
SuggestedUsers stores the information about user suggestions.
type SyncAnswer ¶
type SyncAnswer struct { Users []struct { Pk int64 `json:"pk"` Username string `json:"username"` FullName string `json:"full_name"` IsPrivate bool `json:"is_private"` ProfilePicURL string `json:"profile_pic_url"` ProfilePicID string `json:"profile_pic_id"` IsVerified bool `json:"is_verified"` HasAnonymousProfilePicture bool `json:"has_anonymous_profile_picture"` ReelAutoArchive string `json:"reel_auto_archive"` AddressbookName string `json:"addressbook_name"` } `json:"users"` Warning string `json:"warning"` Status string `json:"status"` }
type Tag ¶
type Tag struct { In []struct { User User `json:"user"` Position []float64 `json:"position"` StartTimeInVideoInSec interface{} `json:"start_time_in_video_in_sec"` DurationInVideoInSec interface{} `json:"duration_in_video_in_sec"` } `json:"in"` }
Tag is the information of an user being tagged on any media.
type Timeline ¶
type Timeline struct { Items []*Item Tray *Tray MoreAvailable bool NextID string NumResults float64 PreloadDistance float64 PullToRefreshWindowMs float64 RequestID string SessionID string // contains filtered or unexported fields }
Timeline is the object to represent the main feed on instagram, the first page that shows the latest feeds of my following contacts.
func (*Timeline) Broadcasts ¶
helper function to get the Broadcasts
func (*Timeline) ClearPosts ¶
func (tl *Timeline) ClearPosts()
ClearPosts will unreference the current list of post items. Used when calling
.Refresh()
func (*Timeline) FetchTray ¶
FetchTray fetches the timeline tray with story media. This function should rarely be called manually. If you want to refresh
the timeline call Timeline.Refresh()
func (*Timeline) NewFeedPostsExist ¶
NewFeedPostsExist will return true if new feed posts are available.
func (*Timeline) Next ¶
Next allows pagination after calling: User.Feed returns false when list reach the end. if Timeline.Error() is ErrNoMore no problem have been occurred. starts first request will be a cold start
func (*Timeline) Refresh ¶
Refresh will clear the current list of posts, perform a pull to refresh action,
and refresh the current timeline.
func (*Timeline) SetPullRefresh ¶
func (tl *Timeline) SetPullRefresh()
SetPullRefresh will set a flag to refresh the timeline on subsequent .Next() call
func (*Timeline) UnsetPullRefresh ¶
func (tl *Timeline) UnsetPullRefresh()
UnsetPullRefresh will unset the pull to refresh flag, if you previously manually
set it, and want to unset it.
type TopSearchItem ¶
type TopSearchItem struct { Position int `json:"position"` User *User `json:"user"` Hashtag *Hashtag `json:"hashtag"` Place Place `json:"place"` // contains filtered or unexported fields }
func (*TopSearchItem) RegisterClick ¶
func (sr *TopSearchItem) RegisterClick() error
type Tray ¶
type Tray struct { Stories []*Reel `json:"tray"` // think this is depricated, and only broadcasts are used Lives struct { LiveItems []*LiveItems `json:"post_live_items"` } `json:"post_live"` StoryRankingToken string `json:"story_ranking_token"` Broadcasts []*Broadcast `json:"broadcasts"` FaceFilterNuxVersion int `json:"face_filter_nux_version"` HasNewNuxStory bool `json:"has_new_nux_story"` NuxElegible bool `json:"stories_viewer_gestures_nux_eligible"` StickerVersion float64 `json:"sticker_version"` ReponseTS float64 `json:"response_timestamp"` Status string `json:"status"` EmojiReactionsConfig struct { UfiType float64 `json:"ufi_type"` DeliveryType float64 `json:"delivery_type"` OverlaySkinTonePickerEnabled bool `json:"overlay_skin_tone_picker_enabled"` SwipeUpToShowReactions bool `json:"swipe_up_to_show_reactions"` ComposerNuxType float64 `json:"composer_nux_type"` HideStoryViewCount bool `json:"hide_story_view_count"` ReactionTrayInteractivePanning bool `json:"reaction_tray_interactive_panning_enabled"` PersistentSelfStoryBadge bool `json:"persistent_self_story_badge_enabled"` SelfstoryBadging bool `json:"self_story_badging_enabled"` ExitTestNux bool `json:"exit_test_nux_enabled"` } `json:"emoji_reactions_config"` }
Tray is a set of story media received from timeline calls.
type TwoFactorInfo ¶
type TwoFactorInfo struct { ID int64 `json:"pk"` Username string `json:"username"` ElegibleForMultipleTotp bool `json:"elegible_for_multiple_totp"` ObfuscatedPhoneNr string `json:"obfuscated_phone_number"` PendingTrustedNotification bool `json:"pending_trusted_notification"` ShouldOptInTrustedDevice bool `json:"should_opt_in_trusted_device_option"` ShowMessengerCodeOption bool `json:"show_messenger_code_option"` ShowTrustedDeviceOption bool `json:"show_trusted_device_option"` SMSNotAllowedReason string `json:"sms_not_allowed_reason"` SMSTwoFactorOn bool `json:"sms_two_factor_on"` TotpTwoFactorOn bool `json:"totp_two_factor_on"` WhatsappTwoFactorOn bool `json:"whatsapp_two_factor_on"` TwoFactorIdentifier string `json:"two_factor_identifier"` PhoneVerificationSettings phoneVerificationSettings `json:"phone_verification_settings"` // contains filtered or unexported fields }
func (*TwoFactorInfo) Check2FATrusted ¶
func (info *TwoFactorInfo) Check2FATrusted() error
Check2FATrusted checks whether the device has been trusted. When you enable 2FA, you can verify, or trust, the device with one of your
other devices. This method will check if this device has been trusted.
if so, it will login, if not, it will return an error. The android app calls this method every 3 seconds
func (*TwoFactorInfo) Login2FA ¶
func (info *TwoFactorInfo) Login2FA(in ...string) error
Login2FA allows for a login through 2FA You can either provide a code directly by passing it as a parameter, or
goinsta can generate one for you as long as the TOTP seed is set.
type UploadOptions ¶
type UploadOptions struct { // File to upload, can be one of jpeg, jpg, mp4 File io.Reader // Thumbnail to use for videos, one of jpeg or jpg. If not set a thumbnail // will be extracted automatically Thumbnail io.Reader // Multiple images, to post a carousel or multiple stories at once Album []io.Reader // Caption text for posts Caption string // Set to true if you want to post a story IsStory bool // Option flags, set to true disable MuteAudio bool DisableComments bool DisableLikeViewCount bool DisableSubtitles bool // Used to tag users in posts UserTags *[]UserTag AlbumTags *[][]UserTag // Used to provide a location for a post Location *LocationTag // contains filtered or unexported fields }
type User ¶
type User struct { Collections *Collections // User info ID int64 `json:"pk"` Username string `json:"username"` FullName string `json:"full_name,omitempty"` Email string `json:"email,omitempty"` PhoneNumber string `json:"phone_number,omitempty"` WhatsappNumber string `json:"whatsapp_number,omitempty"` Gender int `json:"gender,omitempty"` PublicEmail string `json:"public_email,omitempty"` PublicPhoneNumber string `json:"public_phone_number,omitempty"` PublicPhoneCountryCode string `json:"public_phone_country_code,omitempty"` ContactPhoneNumber string `json:"contact_phone_number,omitempty"` // Profile visible properties IsPrivate bool `json:"is_private"` IsVerified bool `json:"is_verified"` ExternalURL string `json:"external_url,omitempty"` ExternalLynxURL string `json:"external_lynx_url,omitempty"` FollowerCount int `json:"follower_count"` FollowingCount int `json:"following_count"` ProfilePicID string `json:"profile_pic_id,omitempty"` ProfilePicURL string `json:"profile_pic_url,omitempty"` HasAnonymousProfilePicture bool `json:"has_anonymous_profile_picture"` Biography string `json:"biography,omitempty"` BiographyWithEntities struct { RawText string `json:"raw_text"` Entities []interface{} `json:"entities"` } `json:"biography_with_entities"` BiographyProductMentions []interface{} `json:"biography_products_mentions"` // Profile hidden properties IsNeedy bool `json:"is_needy"` IsInterestAccount bool `json:"is_interest_account"` IsVideoCreator bool `json:"is_video_creator"` IsBusiness bool `json:"is_business"` BestiesCount int `json:"besties_count"` ShowBestiesBadge bool `json:"show_besties_badge"` RecentlyBestiedByCount int `json:"recently_bestied_by_count"` AccountType int `json:"account_type"` AccountBadges []interface{} `json:"account_badges,omitempty"` FbIdV2 int64 `json:"fbid_"` IsUnpublished bool `json:"is_unpublished"` UserTagsCount int `json:"usertags_count"` UserTagReviewEnabled bool `json:"usertag_review_enabled"` FollowingTagCount int `json:"following_tag_count"` MutualFollowersID []int64 `json:"profile_context_mutual_follow_ids,omitempty"` FollowFrictionType int `json:"follow_friction_type"` ProfileContext string `json:"profile_context,omitempty"` HasBiographyTranslation bool `json:"has_biography_translation"` HasSavedItems bool `json:"has_saved_items"` Nametag Nametag `json:"nametag,omitempty"` HasChaining bool `json:"has_chaining"` IsFavorite bool `json:"is_favorite"` IsFavoriteForStories bool `json:"is_favorite_for_stories"` IsFavoriteForHighlights bool `json:"is_favorite_for_highlights"` IsProfileActionNeeded bool `json:"is_profile_action_needed"` CanBeReportedAsFraud bool `json:"can_be_reported_as_fraud"` CanSeeSupportInbox bool `json:"can_see_support_inbox"` CanSeeSupportInboxV1 bool `json:"can_see_support_inbox_v1"` CanSeePrimaryCountryInsettings bool `json:"can_see_primary_country_in_settings"` CanFollowHashtag bool `json:"can_follow_hashtag"` // Business profile properies CanBoostPosts bool `json:"can_boost_posts"` CanSeeOrganicInsights bool `json:"can_see_organic_insights"` CanConvertToBusiness bool `json:"can_convert_to_business"` CanCreateSponsorTags bool `json:"can_create_sponsor_tags"` CanCreateNewFundraiser bool `json:"can_create_new_standalone_fundraiser"` CanCreateNewPersonalFundraiser bool `json:"can_create_new_standalone_personal_fundraiser"` CanBeTaggedAsSponsor bool `json:"can_be_tagged_as_sponsor"` PersonalAccountAdsPageName string `json:"personal_account_ads_page_name,omitempty"` PersonalAccountAdsId string `json:"personal_account_ads_page_id,omitempty"` Category string `json:"category,omitempty"` // Shopping properties ShowShoppableFeed bool `json:"show_shoppable_feed"` CanTagProductsFromMerchants bool `json:"can_tag_products_from_merchants"` // Miscellaneous IsMutedWordsGlobalEnabled bool `json:"is_muted_words_global_enabled"` IsMutedWordsCustomEnabled bool `json:"is_muted_words_custom_enabled"` AllowedCommenterType string `json:"allowed_commenter_type,omitempty"` // Media properties MediaCount int `json:"media_count"` IGTVCount int `json:"total_igtv_videos"` HasIGTVSeries bool `json:"has_igtv_series"` HasVideos bool `json:"has_videos"` TotalClipCount int `json:"total_clips_count"` TotalAREffects int `json:"total_ar_effects"` GeoMediaCount int `json:"geo_media_count"` HasProfileVideoFeed bool `json:"has_profile_video_feed"` LiveBroadcastID int64 `json:"live_broadcast_id"` HasPlacedOrders bool `json:"has_placed_orders"` ShowInsightTerms bool `json:"show_insights_terms"` ShowConversionEditEntry bool `json:"show_conversion_edit_entry"` ShowPostsInsightEntryPoint bool `json:"show_post_insights_entry_point"` ShoppablePostsCount int `json:"shoppable_posts_count"` RequestContactEnabled bool `json:"request_contact_enabled"` CreatorShoppingInfo struct { LinkedMerchantAccounts []interface{} `json:"linked_merchant_accounts,omitempty"` } `json:"creator_shopping_info,omitempty"` StandaloneFundraiserInfo struct { HasActiveFundraiser bool `json:"has_active_fundraiser"` FundraiserId int64 `json:"fundraiser_id"` FundraiserTitle string `json:"fundraiser_title"` FundraiserType interface{} `json:"fundraiser_type"` FormattedGoalAmount string `json:"formatted_goal_amount"` BeneficiaryUsername string `json:"beneficiary_username"` FormattedFundraiserProgressInfoText string `json:"formatted_fundraiser_progress_info_text"` PercentRaised interface{} `json:"percent_raised"` } `json:"standalone_fundraiser_info"` AggregatePromoteEngagement bool `json:"aggregate_promote_engagement"` AllowMentionSetting string `json:"allow_mention_setting,omitempty"` AllowTagSetting string `json:"allow_tag_setting,omitempty"` LimitedInteractionsEnabled bool `json:"limited_interactions_enabled"` ReelAutoArchive string `json:"reel_auto_archive,omitempty"` HasHighlightReels bool `json:"has_highlight_reels"` IsMemorialized bool `json:"is_memorialized"` HasGuides bool `json:"has_guides"` HasAffiliateShop bool `json:"has_active_affiliate_shop"` CityID int64 `json:"city_id"` CityName string `json:"city_name,omitempty"` AddressStreet string `json:"address_street,omitempty"` DirectMessaging string `json:"direct_messaging,omitempty"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` BusinessContactMethod string `json:"business_contact_method"` IncludeDirectBlacklistStatus bool `json:"include_direct_blacklist_status"` HdProfilePicURLInfo PicURLInfo `json:"hd_profile_pic_url_info,omitempty"` HdProfilePicVersions []PicURLInfo `json:"hd_profile_pic_versions,omitempty"` School School `json:"school"` Byline string `json:"byline"` SocialContext string `json:"social_context,omitempty"` SearchSocialContext string `json:"search_social_context,omitempty"` MutualFollowersCount float64 `json:"mutual_followers_count"` LatestReelMedia int64 `json:"latest_reel_media,omitempty"` IsCallToActionEnabled bool `json:"is_call_to_action_enabled"` IsPotentialBusiness bool `json:"is_potential_business"` FbPageCallToActionID string `json:"fb_page_call_to_action_id,omitempty"` FbPayExperienceEnabled bool `json:"fbpay_experience_enabled"` Zip string `json:"zip,omitempty"` Friendship Friendship `json:"friendship_status"` AutoExpandChaining bool `json:"auto_expand_chaining"` AllowedToCreateNonprofitFundraisers bool `json:"is_allowed_to_create_standalone_nonprofit_fundraisers"` AllowedToCreatePersonalFundraisers bool `json:"is_allowed_to_create_standalone_personal_fundraisers"` IsElegibleToShowFbCrossSharingNux bool `json:"is_eligible_to_show_fb_cross_sharing_nux"` PageIdForNewSumaBizAccount interface{} `json:"page_id_for_new_suma_biz_account"` ElegibleShoppingSignupEntrypoints []interface{} `json:"eligible_shopping_signup_entrypoints"` IsIgdProductPickerEnabled bool `json:"is_igd_product_picker_enabled"` IsElegibleForAffiliateShopOnboarding bool `json:"is_eligible_for_affiliate_shop_onboarding"` IsElegibleForSMBSupportFlow bool `json:"is_eligible_for_smb_support_flow"` ElegibleShoppingFormats []interface{} `json:"eligible_shopping_formats"` NeedsToAcceptShoppingSellerOnboardingTerms bool `json:"needs_to_accept_shopping_seller_onboarding_terms"` SellerShoppableFeedType string `json:"seller_shoppable_feed_type"` VisibleProducts int `json:"num_visible_storefront_products"` IsShoppingCatalogSettingsEnabled bool `json:"is_shopping_settings_enabled"` IsShoppingCommunityContentEnabled bool `json:"is_shopping_community_content_enabled"` IsShoppingAutoHighlightEnabled bool `json:"is_shopping_auto_highlight_eligible"` IsShoppingCatalogSourceSelectionEnabled bool `json:"is_shopping_catalog_source_selection_enabled"` ProfessionalConversionSuggestedAccountType int `json:"professional_conversion_suggested_account_type"` InteropMessagingUserfbid int64 `json:"interop_messaging_user_fbid"` LinkedFbInfo struct{} `json:"linked_fb_info"` HasElegibleWhatsappLinkingCategory struct{} `json:"has_eligible_whatsapp_linking_category"` ExistingUserAgeCollectionEnabled bool `json:"existing_user_age_collection_enabled"` AboutYourAccountBloksEntrypointEnabled bool `json:"about_your_account_bloks_entrypoint_enabled"` OpenExternalUrlWithInAppBrowser bool `json:"open_external_url_with_in_app_browser"` MerchantCheckoutStyle string `json:"merchant_checkout_style"` // Profile picture as raw bytes, to populate call User.DownloadProfilePic() ProfilePic []byte // contains filtered or unexported fields }
User is the representation of instagram's user profile
func (*User) ApprovePending ¶
func (*User) Block ¶
Block blocks user
This function updates current User.Friendship structure. Param: autoBlock - automatically block accounts registered on the same email/number
See example: examples/user/block.go
func (*User) DownloadProfilePic ¶
DownloadProfilePic will download a user's profile picture if available, and
return it as a byte slice.
func (*User) DownloadProfilePicTo ¶
DownloadProfilePicTo will download the user profile picture to the provided
path. If path does not include a file name, one will be extracted automatically.
File extention does not need to be set, and will be set automatically.
func (*User) Feed ¶
Feed returns user feeds (media)
params can be: string: timestamp of the minimum media timestamp.
For pagination use FeedMedia.Next()
See example: examples/user/feed.go
func (*User) Follow ¶
Follow started following some user
This function performs a follow call. If user is private you have to wait until he/she accepts you.
If the account is public User.Friendship will be updated ¶
See example: examples/user/follow.go
func (*User) Followers ¶
Followers returns a list of user followers.
Query can be used to search for a specific user. Be aware that it only matches from the start, e.g. "theprimeagen" will only match "theprime" not "prime". To fetch all user an empty string "".
Users.Next can be used to paginate.
func (*User) Following ¶
func (user *User) Following(query string, order FollowOrder) *Users
Following returns a list of user following.
Query can be used to search for a specific user. Be aware that it only matches from the start, e.g. "theprimeagen" will only match "theprime" not "prime". To fetch all user an empty string "".
Users.Next can be used to paginate
func (*User) GetFeaturedAccounts ¶
GetFeaturedAccounts will call the featured accounts enpoint.
func (*User) GetFriendship ¶
func (user *User) GetFriendship() (fr *Friendship, err error)
GetFriendship allows user to get friend relationship.
The result is stored in user.Friendship
func (*User) Highlights ¶
Highlights will fetch a user's highlights.
func (*User) IGTV ¶
func (user *User) IGTV() (*IGTVChannel, error)
IGTV returns the IGTV items of a user
Use IGTVChannel.Next for pagination.
func (*User) IGTVSeries ¶
func (user *User) IGTVSeries() ([]*IGTVChannel, error)
IGTVSeries will fetch the igtv series of a user. Usually the slice length
of the return value is 1, as there is one channel, which contains multiple series.
func (*User) IgnorePending ¶
func (*User) Info ¶
Info updates user info extra query arguments can be passes one after another as func(key, value). Only if an even number of string arguements will be passed, they will be
used in the query.
See example: examples/user/friendship.go
func (*User) Mute ¶
Mute mutes user from appearing in the feed or story reel
Use one of the pre-defined constants to choose what exactly to mute: goinsta.MuteAll, goinsta.MuteStory, goinsta.MuteFeed This function updates current User.Friendship structure.
func (*User) SetInstagram ¶
SetInstagram will update instagram instance for selected User.
func (*User) Stories ¶
func (user *User) Stories() (*StoryMedia, error)
Stories will fetch a user's stories.
func (*User) Tags ¶
Tags returns media where user is tagged in
For pagination use FeedMedia.Next()
See example: examples/user/tags.go
func (*User) Unblock ¶
Unblock unblocks user
This function updates current User.Friendship structure.
See example: examples/user/unblock.go
func (*User) Unfollow ¶
Unfollow unfollows user
User.Friendship will be updated ¶
See example: examples/user/unfollow.go
func (*User) Unmute ¶
Unmute unmutes user so it appears in the feed or story reel again
Use one of the pre-defined constants to choose what exactly to unmute: goinsta.MuteAll, goinsta.MuteStory, goinsta.MuteFeed This function updates current User.Friendship structure.
func (*User) VisitProfile ¶
VisitProfile will perform the same request sequence as if you visited a profile
in the app. Thus it will gather (some) posts from the user feed, stories, grab the friendship status, and if available IGTV posts.
You can access the profile info from the profile struct by calling Profile.Feed,
Profile.Stories, Profile.User etc. See the Profile struct for all properties.
This method will visit a profile directly from an already existing User instance. To visit a profile without the User struct, you can use Insta.VisitProfile(user),
which will perform a search, register the click, and call this method.
type UserMinimal ¶ added in v3.1.5
type UserMinimal struct { ID int64 `json:"pk"` IDstr string `json:"pk_id"` Username string `json:"username"` FullName string `json:"full_name"` IsPrivate bool `json:"is_private"` IsVerified bool `json:"is_verified"` ProfilePicID string `json:"profile_pic_id"` ProfilePicURL string `json:"profile_pic_url"` AccountBadges []any `json:"account_badges"` LatestReelMedia int `json:"latest_reel_media"` HasAnonymousProfilePicture bool `json:"has_anonymous_profile_picture"` // contains filtered or unexported fields }
type UserTag ¶
UserTag represents a user post tag. Position is optional, a random
position will be used if not provided. For videos the position will always be [0,0], and doesn't need to be provided.
type Users ¶
type Users struct { Status string `json:"status"` BigList bool `json:"big_list"` Users []UserMinimal `json:"users"` AllUsers []UserMinimal PageSize int `json:"page_size"` RawNextID json.RawMessage `json:"next_max_id"` NextID string `json:"-"` // contains filtered or unexported fields }
Users is a struct that stores many user's returned by many different methods.
func (*Users) Next ¶
Next allows to paginate after calling: Account.Follow* and User.Follow*
New user list is stored inside Users ¶
returns false when list reach the end.
func (*Users) SetInstagram ¶
SetInstagram sets new instagram to user structure
type Video ¶
type Video struct { Type int `json:"type"` Width int `json:"width"` Height int `json:"height"` URL string `json:"url"` ID string `json:"id"` }
Video are different quality videos
type VisualMedia ¶
type VisualMedia struct { Media *Item `json:"media"` ExpiringMediaActionSummary struct { Type string `json:"type"` Timestamp int64 `json:"timestamp"` Count int `json:"count"` } `json:"expiring_media_action_summary"` SeenUserIds []string `json:"seen_user_ids"` ViewMode string `json:"view_mode"` SeenCount int `json:"seen_count"` ReplayExpiringAtUs int64 `json:"replay_expiring_at_us"` }
used for raven_media type
type VoiceMedia ¶
type VoiceMedia struct { Media struct { ID string `json:"id"` MediaType int `json:"media_type"` ProductType string `json:"product_type"` Audio struct { AudioSrc string `json:"audio_src"` Duration int `json:"duration"` WaveformData []float64 `json:"waveform_data"` WaveformSamplingFrequencyHz int `json:"waveform_sampling_frequency_hz"` } `json:"audio"` OrganicTrackingToken string `json:"organic_tracking_token"` User *User `json:"user"` } `json:"media"` IsShhMode bool `json:"is_shh_mode"` SeenUserIds []int64 `json:"seen_user_ids"` ViewMode string `json:"view_mode"` SeenCount int `json:"seen_count"` ReplayExpiringAtUs int64 `json:"replay_expiring_at_us"` }
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
func DefaultWrapper ¶
func DefaultWrapper() *Wrapper
func (*Wrapper) GoInstaWrapper ¶
GoInstaWrapper is a warpper function for goinsta
Source Files ¶
- account.go
- activity.go
- broadcasts.go
- challenge.go
- collections.go
- comments.go
- const.go
- contacts.go
- env.go
- explore.go
- feeds.go
- generator.go
- goinsta.go
- hashtags.go
- headless.go
- igtv.go
- inbox.go
- location.go
- media.go
- profiles.go
- request.go
- search.go
- shortid.go
- stories.go
- timeline.go
- twofactor.go
- types.go
- uploads.go
- users.go
- utils.go
- wrapper.go
Directories ¶
Path | Synopsis |
---|---|
cmds
|
|
refreshTestAccounts
Use this program to parse instagram accounts from goinsta/tests/.env, and
|
Use this program to parse instagram accounts from goinsta/tests/.env, and |