Documentation ¶
Index ¶
- Constants
- Variables
- func Export(inst *Instagram, writer io.Writer) error
- func GetBest(obj interface{}) string
- func MediaIDFromShortID(code string) (string, error)
- type Account
- func (account *Account) Archived(params ...interface{}) *FeedMedia
- func (account *Account) ChangePassword(old, new string) error
- func (account *Account) Feed(params ...interface{}) *FeedMedia
- func (account *Account) Followers() *Users
- func (account *Account) Following() *Users
- func (account *Account) Liked() *FeedMedia
- func (account *Account) PendingFollowRequests() ([]User, error)
- func (account *Account) RemoveProfilePic() error
- func (account *Account) Saved() (*SavedMedia, error)
- func (account *Account) SetBiography(bio string) error
- func (account *Account) SetPrivate() error
- func (account *Account) SetPublic() error
- func (account *Account) Stories() *StoryMedia
- func (account *Account) Sync() error
- func (account *Account) Tags(minTimestamp []byte) (*FeedMedia, error)
- type Activity
- type BlockedUser
- type Broadcast
- type Candidate
- type Caption
- type Comment
- type Comments
- func (comments *Comments) Add(text string) (err error)
- func (comments *Comments) Del(comment *Comment) error
- func (comments *Comments) DelByID(id string) error
- func (comments *Comments) DelMine(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
- 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) ID() string
- func (media *FeedMedia) Next(params ...interface{}) bool
- func (media *FeedMedia) SetID(id interface{})
- func (media *FeedMedia) SetInstagram(inst *Instagram)
- func (media *FeedMedia) Sync() error
- type FeedTag
- type FollowingActivity
- type Friendship
- type Hashtag
- type Images
- type Inbox
- type InboxItem
- type InboxItemLike
- type InboxItemMedia
- type Instagram
- func (inst *Instagram) Export(path string) error
- func (inst *Instagram) GetCookieJar() http.CookieJar
- func (inst *Instagram) GetMedia(o interface{}) (*FeedMedia, error)
- func (inst *Instagram) Login() error
- func (inst *Instagram) Logout() error
- func (inst *Instagram) NewHashtag(name string) *Hashtag
- func (inst *Instagram) NewUser() *User
- func (inst *Instagram) Save() error
- func (inst *Instagram) SetDeviceID(id string)
- func (inst *Instagram) SetHTTPClient(client *http.Client)
- func (inst *Instagram) SetPhoneID(id string)
- func (inst *Instagram) SetProxy(url string, insecure bool) error
- func (inst *Instagram) SetUUID(uuid string)
- func (inst *Instagram) UnsetProxy()
- func (insta *Instagram) UploadPhoto(photo io.Reader, photoCaption string, quality int, filterType int) (Item, error)
- type Item
- func (item *Item) Delete() error
- func (item *Item) Download(folder, name string) (imgs, vds string, err error)
- func (item *Item) DownloadBody() (imgs, vds string, body io.ReadCloser, err error)
- func (item *Item) GetBestURL() (imgs, vds string, err error)
- func (item *Item) Hashtags() []Hashtag
- func (item *Item) Like() error
- func (item *Item) MediaToString() string
- func (item *Item) PreviewComments() []Comment
- func (item *Item) Save() error
- func (item *Item) StoryIsCloseFriends() bool
- func (item *Item) SyncLikers() error
- func (item *Item) TopLikers() []string
- func (item *Item) Unlike() error
- type LayoutSection
- type LiveItems
- type Location
- type LocationInstance
- type Media
- type Mentions
- type MineActivity
- type Nametag
- type PicURLInfo
- type Profiles
- type SavedMedia
- type School
- type Search
- type SearchResult
- type Section
- type SponsorTag
- type StoryCTA
- type StoryMedia
- type StoryReelMention
- type SuggestedUsers
- type SyncAnswer
- type Tag
- type Timeline
- type Tray
- type User
- func (user *User) Block() error
- func (user *User) Feed(params ...interface{}) *FeedMedia
- func (user *User) Follow() error
- func (user *User) Followers() *Users
- func (user *User) Following() *Users
- func (user *User) FriendShip() error
- func (user *User) Highlights() ([]StoryMedia, error)
- func (user *User) Mute(opt muteOption) error
- func (user *User) SetInstagram(insta *Instagram)
- func (user *User) Stories() *StoryMedia
- 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
- type Users
- type Video
Constants ¶
const ( MuteAll muteOption = "all" MuteStory muteOption = "story" MuteFeed muteOption = "feed" )
Variables ¶
var ErrNoMore = errors.New("List end have been reached")
ErrNoMore is an error that comes when there is no more elements available on the list.
Functions ¶
func GetBest ¶
func GetBest(obj interface{}) string
GetBest returns best quality image or video.
Arguments can be []Video or []Candidate
func MediaIDFromShortID ¶
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) 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.
Users.Next can be used to paginate ¶
See example: examples/account/followers.go
func (*Account) Following ¶
Following returns a list of user following.
Users.Next can be used to paginate ¶
See example: examples/account/following.go
func (*Account) PendingFollowRequests ¶
PendingFollowRequests returns pending follow requests.
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, error)
Saved returns saved media.
func (*Account) SetBiography ¶
SetBiography changes your Instagram's biography.
This function updates current Account information.
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
Stories returns account stories.
Use StoryMedia.Next for pagination.
See example: examples/account/stories.go
type Activity ¶
type Activity struct {
// contains filtered or unexported fields
}
Activity is the activity of your instagram account
You can get Recent and Following activities.
func (*Activity) Following ¶
func (act *Activity) Following() *FollowingActivity
Following allows to receive recent following activity.
Use Next to paginate over activities ¶
See example: examples/activity/following.go
func (*Activity) Recent ¶
func (act *Activity) Recent() *MineActivity
Recent allows to receive recent activity (notifications).
Use Activities.Next to paginate over activities.
See example: examples/activity/recent.go
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 { ID int64 `json:"id"` BroadcastStatus string `json:"broadcast_status"` 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"` BroadcastOwner User `json:"broadcast_owner"` PublishedTime int64 `json:"published_time"` MediaID string `json:"media_id"` BroadcastMessage string `json:"broadcast_message"` OrganicTrackingToken string `json:"organic_tracking_token"` }
Broadcast is live videos.
type Candidate ¶
type Candidate struct { Width int `json:"width"` Height int `json:"height"` URL string `json:"url"` }
Candidate is something that I really have no idea what it is.
type Caption ¶
type Caption struct { ID int64 `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 User `json:"user"` DidReportAsSpam bool `json:"did_report_as_spam"` MediaID int64 `json:"media_id"` HasTranslation bool `json:"has_translation"` }
Caption is media caption
type Comment ¶
type Comment struct { ID int64 `json:"pk"` Text string `json:"text"` Type int `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"` Status string `json:"status"` // contains filtered or unexported fields }
Comment is a type of Media retrieved by the Comments methods
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"` NextMaxID 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) Add ¶
Add push a comment in media.
If parent media is a Story this function will send a private message replying the Instagram story.
See example: examples/media/commentsAdd.go
func (*Comments) DelByID ¶
DelByID removes comment using id.
See example: examples/media/commentsDelByID.go
func (*Comments) DelMine ¶
DelMine removes all of your comments limited by parsed parameter.
If limit is <= 0 DelMine will delete all your comments.
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"` UUID string `json:"uuid"` RankToken string `json:"rank_token"` Token string `json:"token"` PhoneID string `json:"phone_id"` Cookies []*http.Cookie `json:"cookies"` }
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"` 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"` Muted bool `json:"muted"` IsPin bool `json:"is_pin"` Named bool `json:"named"` 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"` LastSeenAt map[string]struct { Timestamp string `json:"timestamp"` ItemID string `json:"item_id"` } `json:"last_seen_at"` NewestCursor string `json:"newest_cursor"` OldestCursor string `json:"oldest_cursor"` IsSpam bool `json:"is_spam"` LastPermanentItem Item `json:"last_permanent_item"` // contains filtered or unexported fields }
Conversation is the representation of an instagram already established conversation through direct messages.
func (Conversation) Error ¶
func (c Conversation) Error() error
func (*Conversation) Like ¶
func (c *Conversation) Like() error
Like sends heart to the conversation
See example: examples/media/likeAll.go
func (*Conversation) Next ¶
func (c *Conversation) Next() bool
Next loads next set of private messages.
See example: examples/inbox/conversation.go
func (*Conversation) Send ¶
func (c *Conversation) Send(text string) error
Send sends message in conversation
See example: examples/inbox/sms.go
type Error400 ¶
type Error400 struct { Action string `json:"action"` StatusCode string `json:"status_code"` Payload struct { ClientContext string `json:"client_context"` Message string `json:"message"` } `json:"payload"` Status string `json:"status"` }
Error400 is error returned by HTTP 400 status code.
type ErrorN ¶
type ErrorN struct { Message string `json:"message"` 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
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
func (*FeedMedia) Delete ¶
Delete deletes all items in media. Take care...
See example: examples/media/mediaDelete.go
func (*FeedMedia) Next ¶
Next allows pagination after calling: User.Feed Params: ranked_content is set to "true" by default, you can set it to false by either passing "false" or false as parameter. returns false when list reach the end. if FeedMedia.Error() is ErrNoMore no problem have been occurred.
func (*FeedMedia) SetID ¶
func (media *FeedMedia) SetID(id interface{})
SetID sets media ID this value can be int64 or string
func (*FeedMedia) SetInstagram ¶
SetInstagram set instagram
type FeedTag ¶
type FeedTag struct { RankedItems []Item `json:"ranked_items"` Images []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"` }
FeedTag is the struct that fits the structure returned by instagram on TagSearch.
type FollowingActivity ¶
type FollowingActivity struct { AutoLoadMoreEnabled bool `json:"auto_load_more_enabled"` NextID int64 `json:"next_max_id"` Stories []struct { Type int `json:"type"` StoryType int `json:"story_type"` Args struct { MediaDestination string `json:"media_destination"` Destination string `json:"destination"` Text string `json:"text"` Links []struct { Start int `json:"start"` End int `json:"end"` Type string `json:"type"` ID string `json:"id"` } `json:"links"` ProfileID int64 `json:"profile_id"` ProfileImage string `json:"profile_image"` SecondProfileID int64 `json:"second_profile_id"` SecondProfileImage string `json:"second_profile_image"` ProfileImageDestination string `json:"profile_image_destination"` Media []struct { ID string `json:"id"` Image string `json:"image"` } `json:"media"` Timestamp int64 `json:"timestamp"` Tuuid string `json:"tuuid"` } `json:"args"` Counts struct { } `json:"counts"` Pk string `json:"pk"` } `json:"stories"` Status string `json:"status"` // contains filtered or unexported fields }
FollowingActivity is the latest activity of the people you are following
func (*FollowingActivity) Error ¶
func (act *FollowingActivity) Error() error
func (*FollowingActivity) Next ¶
func (act *FollowingActivity) Next() bool
Next allows pagination over following recent activity.
See example:
type Friendship ¶
type Friendship struct { IncomingRequest bool `json:"incoming_request"` FollowedBy bool `json:"followed_by"` OutgoingRequest bool `json:"outgoing_request"` Following bool `json:"following"` Blocking bool `json:"blocking"` IsPrivate bool `json:"is_private"` Muting bool `json:"muting"` IsMutingReel bool `json:"is_muting_reel"` }
Friendship stores the details of the relationship between two users.
type Hashtag ¶
type Hashtag struct { Name string `json:"name"` Sections []struct { LayoutType string `json:"layout_type"` LayoutContent struct { // F*ck you instagram. // Why you do this f*cking horribly structure?!? // Media []Media IS EASY. CHECK IT! Medias []struct { Item 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 int `json:"aspect_ratio"` Autoplay bool `json:"autoplay"` } `json:"explore_item_info"` } `json:"sections"` MediaCount int `json:"media_count"` ID int64 `json:"id"` MoreAvailable bool `json:"more_available"` NextID string `json:"next_max_id"` NextPage int `json:"next_page"` NextMediaIds []int64 `json:"next_media_ids"` AutoLoadMoreEnabled bool `json:"auto_load_more_enabled"` Status string `json:"status"` // contains filtered or unexported fields }
Hashtag is used for getting the media that matches a hashtag on instagram.
func (*Hashtag) Stories ¶
func (h *Hashtag) Stories() (*StoryMedia, error)
Stories returns hashtag stories.
type Images ¶
type Images struct {
Versions []Candidate `json:"candidates"`
}
Images are different quality images
type Inbox ¶
type Inbox struct { Conversations []Conversation `json:"threads"` 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"` BlendedInboxEnabled bool `json:"blended_inbox_enabled"` // this fields are copied from response SeqID int64 `json:"seq_id"` PendingRequestsTotal int `json:"pending_requests_total"` 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) New ¶
New initialises a new conversation with a user, for further messages you should use Conversation.Send
See example: examples/inbox/newconversation.go
func (*Inbox) NextPending ¶
NextPending allows pagination over pending messages.
See example: examples/inbox/next.go
func (*Inbox) SyncPending ¶
SyncPending updates inbox pending messages.
See example: examples/inbox/sync.go
type InboxItem ¶
type InboxItem struct { ID string `json:"item_id"` UserID int64 `json:"user_id"` Timestamp int64 `json:"timestamp"` ClientContext string `json:"client_context"` // Type there are a few types: // text, like, raven_media Type string `json:"item_type"` // Text is message text. Text string `json:"text"` Like string `json:"like"` // Media is image or video Media 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"` MediaID int64 `json:"media_id"` PlaybackDurationSecs int `json:"playback_duration_secs"` URLExpireAtSecs int `json:"url_expire_at_secs"` OrganicTrackingToken string `json:"organic_tracking_token"` } }
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 { // Profiles is the user interaction Profiles *Profiles // Account stores all personal data of the user and his/her options. Account *Account // Search performs searching of multiple things (users, locations...) Search *Search // Timeline allows to receive timeline media. Timeline *Timeline // Activity are instagram notifications. Activity *Activity // Inbox are instagram message/chat system. Inbox *Inbox // Feed for search over feeds Feed *Feed // User contacts from mobile address book Contacts *Contacts // Location instance Locations *LocationInstance // contains filtered or unexported fields }
Instagram represent the main API handler
Profiles: Represents instragram's user profile. Account: Represents instagram's personal account. Search: Represents instagram's search. Timeline: Represents instagram's timeline. Activity: Represents instagram's user activity. Inbox: Represents instagram's messages. Location: Represents instagram's locations.
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 Import ¶
Import imports instagram configuration
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 (*Instagram) GetCookieJar ¶
func (*Instagram) GetMedia ¶
GetMedia returns media specified by id.
The argument can be int64 or string ¶
See example: examples/media/like.go
func (*Instagram) NewHashtag ¶
NewHashtag returns initialised hashtag structure Name parameter is hashtag name
func (*Instagram) SetDeviceID ¶
SetDeviceID sets device id
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) SetPhoneID ¶
SetPhoneID sets phone id
func (*Instagram) UnsetProxy ¶
func (inst *Instagram) UnsetProxy()
UnsetProxy unsets proxy for connection.
type Item ¶
type Item struct { Comments *Comments `json:"-"` TakenAt int64 `json:"taken_at"` Pk int64 `json:"pk"` ID string `json:"id"` CommentsDisabled bool `json:"comments_disabled"` DeviceTimestamp int64 `json:"device_timestamp"` MediaType int `json:"media_type"` Code string `json:"code"` ClientCacheKey string `json:"client_cache_key"` FilterType int `json:"filter_type"` CarouselParentID string `json:"carousel_parent_id"` CarouselMedia []Item `json:"carousel_media,omitempty"` User User `json:"user"` Caption Caption `json:"caption"` CaptionIsEdited bool `json:"caption_is_edited"` Likes int `json:"like_count"` HasLiked bool `json:"has_liked"` // Toplikers can be `string` or `[]string`. // Use TopLikers function instead of getting it directly. Toplikers interface{} `json:"top_likers"` Likers []User `json:"likers"` CommentLikesEnabled bool `json:"comment_likes_enabled"` CommentThreadingEnabled bool `json:"comment_threading_enabled"` HasMoreComments bool `json:"has_more_comments"` MaxNumVisiblePreviewComments int `json:"max_num_visible_preview_comments"` // Previewcomments can be `string` or `[]string` or `[]Comment`. // Use PreviewComments function instead of getting it directly. Previewcomments interface{} `json:"preview_comments,omitempty"` CommentCount int `json:"comment_count"` PhotoOfYou bool `json:"photo_of_you"` // Tags are tagged people in photo Tags struct { In []Tag `json:"in"` } `json:"usertags,omitempty"` FbUserTags Tag `json:"fb_user_tags"` SponsorTags []SponsorTag `json:"sponsor_tags"` CanViewerSave bool `json:"can_viewer_save"` OrganicTrackingToken string `json:"organic_tracking_token"` // 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"` // Videos Videos []Video `json:"video_versions,omitempty"` HasAudio bool `json:"has_audio,omitempty"` VideoDuration float64 `json:"video_duration,omitempty"` ViewCount float64 `json:"view_count,omitempty"` IsDashEligible int `json:"is_dash_eligible,omitempty"` VideoDashManifest string `json:"video_dash_manifest,omitempty"` NumberOfQualities int `json:"number_of_qualities,omitempty"` // Only for stories StoryEvents []interface{} `json:"story_events"` StoryPolls []interface{} `json:"story_polls"` StoryFeedMedia []interface{} `json:"story_feed_media"` StorySoundOn []interface{} `json:"story_sound_on"` CreativeConfig interface{} `json:"creative_config"` StoryLocations []interface{} `json:"story_locations"` StorySliders []interface{} `json:"story_sliders"` StoryQuestions []interface{} `json:"story_questions"` StoryProductItems []interface{} `json:"story_product_items"` StoryCTA []StoryCTA `json:"story_cta"` ReelMentions []StoryReelMention `json:"reel_mentions"` SupportsReelReactions bool `json:"supports_reel_reactions"` Mentions []Mentions Audience string `json:"audience,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 Download function to get the best quality Image or Video from Item.
func (*Item) Delete ¶
Delete deletes your media item. StoryMedia or FeedMedia
See example: examples/media/mediaDelete.go
func (*Item) Download ¶
Download downloads media item (video or image) with the best quality.
Input parameters are folder and filename. If filename is "" will be saved with the default value name.
If file exists it will be saved This function makes folder automatically
This function returns an slice of location of downloaded items The returned values are the output path of images and videos.
This function does not download CarouselMedia.
See example: examples/media/itemDownload.go
func (*Item) DownloadBody ¶
func (item *Item) DownloadBody() (imgs, vds string, body io.ReadCloser, err error)
func (*Item) GetBestURL ¶
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) 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
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 int `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 { Pk 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"` }
Location stores media location information.
type LocationInstance ¶
type LocationInstance struct {
// contains filtered or unexported fields
}
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 ID() string // Delete removes media Delete() error // contains filtered or unexported methods }
Media interface defines methods for both StoryMedia and FeedMedia.
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 MineActivity ¶
type MineActivity 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 { PhotosOfYou int `json:"photos_of_you"` Requests int `json:"requests"` } `json:"counts"` FriendRequestStories []interface{} `json:"friend_request_stories"` Stories []struct { Type int `json:"type"` StoryType int `json:"story_type"` Args struct { Text string `json:"text"` Links []struct { Start int `json:"start"` End int `json:"end"` Type string `json:"type"` ID string `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"` 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"` } `json:"args"` Counts struct { } `json:"counts"` Pk string `json:"pk"` } `json:"old_stories"` ContinuationToken int64 `json:"continuation_token"` Subscription interface{} `json:"subscription"` NextID int64 `json:"next_max_id"` Status string `json:"status"` // contains filtered or unexported fields }
MineActivity is the recent activity menu.
See example: examples/activity/recent.go
func (*MineActivity) Error ¶
func (act *MineActivity) Error() error
func (*MineActivity) Next ¶
func (act *MineActivity) Next() bool
Next function allows pagination over notifications.
See example: examples/activity/recent.go
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 PicURLInfo ¶
type PicURLInfo struct { Height int `json:"height"` URL string `json:"url"` Width int `json:"width"` }
PicURLInfo repre
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 blocked profiles.
type SavedMedia ¶
type SavedMedia struct { Items []struct { Media Item `json:"media"` } `json:"items"` NumResults int `json:"num_results"` MoreAvailable bool `json:"more_available"` AutoLoadMoreEnabled bool `json:"auto_load_more_enabled"` Status string `json:"status"` }
SavedMedia stores the information about media being saved before in my account.
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) Facebook ¶
func (search *Search) Facebook(user string) (*SearchResult, error)
Facebook search by facebook user.
func (*Search) Location ¶
func (search *Search) Location(lat, lng, location string) (*SearchResult, error)
Location search by location. DEPRECATED - Instagram does not allow Location search method. Lat and Lng (Latitude & Longitude) cannot be ""
type SearchResult ¶
type SearchResult struct { HasMore bool `json:"has_more"` RankToken string `json:"rank_token"` Status string `json:"status"` NumResults int64 `json:"num_results"` // User search results Users []User `json:"users"` // Tag search results Tags []struct { ID int64 `json:"id"` Name string `json:"name"` MediaCount int `json:"media_count"` FollowStatus interface{} `json:"follow_status"` Following interface{} `json:"following"` AllowFollowing interface{} `json:"allow_following"` AllowMutingStory interface{} `json:"allow_muting_story"` ProfilePicURL interface{} `json:"profile_pic_url"` NonViolating interface{} `json:"non_violating"` RelatedTags interface{} `json:"related_tags"` DebugInfo interface{} `json:"debug_info"` } `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"` // Facebook // Facebook also uses `Users` Places []interface{} `json:"places"` Position int `json:"position"` Hashtag struct { Name string `json:"name"` ID int64 `json:"id"` MediaCount int `json:"media_count"` } `json:"hashtag"` } `json:"hashtags"` ClearClientCache bool `json:"clear_client_cache"` }
SearchResult handles the data for the results given by each type of Search.
type SponsorTag ¶
type SponsorTag struct { Permission bool `json:"permission"` Sponsor struct { Pk int `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"` } `json:"sponsor"` }
SponsorTag represent brand mention
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 { Pk interface{} `json:"id"` LatestReelMedia int64 `json:"latest_reel_media"` ExpiringAt float64 `json:"expiring_at"` HaveBeenSeen float64 `json:"seen"` CanReply bool `json:"can_reply"` Title string `json:"title"` ReelType string `json:"reel_type"` User User `json:"user"` Items []Item `json:"items"` ReelMentions []string `json:"reel_mentions"` PrefetchCount int `json:"prefetch_count"` // this field can be int or bool HasBestiesMedia interface{} `json:"has_besties_media"` StoryRankingToken string `json:"story_ranking_token"` Broadcasts []Broadcast `json:"broadcasts"` FaceFilterNuxVersion int `json:"face_filter_nux_version"` HasNewNuxStory bool `json:"has_new_nux_story"` Status string `json:"status"` // contains filtered or unexported fields }
StoryMedia is the struct that handles the information from the methods to get info about Stories.
func (*StoryMedia) Delete ¶
func (media *StoryMedia) Delete() error
Delete removes instragram story.
See example: examples/media/deleteStories.go
func (StoryMedia) Error ¶
func (media StoryMedia) Error() error
Error returns error happened any error
func (*StoryMedia) Next ¶
func (media *StoryMedia) Next(params ...interface{}) bool
Next allows pagination after calling: User.Stories
returns false when list reach the end if StoryMedia.Error() is ErrNoMore no problem have been occurred.
func (*StoryMedia) Sync ¶
func (media *StoryMedia) Sync() error
Sync function is used when Highlight must be sync. Highlight must be sync when User.Highlights does not return any object inside StoryMedia slice.
This function does NOT update Stories items.
This function updates StoryMedia.Items
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"` User User }
StoryReelMention represent story reel mention
type SuggestedUsers ¶
type SuggestedUsers struct { Type int `json:"type"` Suggestions []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:"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 {
// 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.
type Tray ¶
type Tray struct { Stories []StoryMedia `json:"tray"` 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"` Status string `json:"status"` }
Tray is a set of story media received from timeline calls.
type User ¶
type User 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"` 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"` FollowingTagCount int `json:"following_tag_count"` MutualFollowersID []int64 `json:"profile_context_mutual_follow_ids"` ProfileContext string `json:"profile_context"` GeoMediaCount int `json:"geo_media_count"` ExternalURL string `json:"external_url"` HasBiographyTranslation bool `json:"has_biography_translation"` ExternalLynxURL string `json:"external_lynx_url"` BiographyWithEntities struct { RawText string `json:"raw_text"` Entities []interface{} `json:"entities"` } `json:"biography_with_entities"` HasChaining bool `json:"has_chaining"` IsFavorite bool `json:"is_favorite"` IsFavoriteForStories bool `json:"is_favorite_for_stories"` IsFavoriteForHighlights bool `json:"is_favorite_for_highlights"` CanBeReportedAsFraud bool `json:"can_be_reported_as_fraud"` ShowShoppableFeed bool `json:"show_shoppable_feed"` ShoppablePostsCount int `json:"shoppable_posts_count"` ReelAutoArchive string `json:"reel_auto_archive"` HasHighlightReels bool `json:"has_highlight_reels"` PublicEmail string `json:"public_email"` PublicPhoneNumber string `json:"public_phone_number"` PublicPhoneCountryCode string `json:"public_phone_country_code"` ContactPhoneNumber string `json:"contact_phone_number"` 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"` IncludeDirectBlacklistStatus bool `json:"include_direct_blacklist_status"` HdProfilePicURLInfo PicURLInfo `json:"hd_profile_pic_url_info"` HdProfilePicVersions []PicURLInfo `json:"hd_profile_pic_versions"` 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"` FbPageCallToActionID string `json:"fb_page_call_to_action_id"` Zip string `json:"zip"` Friendship Friendship `json:"friendship_status"` // contains filtered or unexported fields }
User is the representation of instagram's user profile
func (*User) Block ¶
Block blocks user
This function updates current User.Friendship structure.
See example: examples/user/block.go
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.
Users.Next can be used to paginate ¶
See example: examples/user/followers.go
func (*User) Following ¶
Following returns a list of user following.
Users.Next can be used to paginate ¶
See example: examples/user/following.go
func (*User) FriendShip ¶
FriendShip allows user to get friend relationship.
The result is stored in user.Friendship
func (*User) Highlights ¶
func (user *User) Highlights() ([]StoryMedia, error)
Highlights represents saved stories.
See example: examples/user/highlights.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
Stories returns user stories
Use StoryMedia.Next for pagination.
See example: examples/user/stories.go
func (*User) Sync ¶
Sync updates user info
params can be: bool: must be true if you want to include FriendShip call. See goinsta.FriendShip
See example: examples/user/friendship.go
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
type Users ¶
type Users struct { Status string `json:"status"` BigList bool `json:"big_list"` Users []User `json:"users"` PageSize int `json:"page_size"` NextID string `json:"next_max_id"` // 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