diff --git a/account.go b/account.go index ab1db9ad..cb7ed746 100644 --- a/account.go +++ b/account.go @@ -54,7 +54,7 @@ type Account struct { SocialContext string `json:"social_context,omitempty"` SearchSocialContext string `json:"search_social_context,omitempty"` MutualFollowersCount float64 `json:"mutual_followers_count"` - LatestReelMedia int `json:"latest_reel_media,omitempty"` + LatestReelMedia int64 `json:"latest_reel_media,omitempty"` CityID int64 `json:"city_id"` CityName string `json:"city_name"` AddressStreet string `json:"address_street"` diff --git a/activity.go b/activity.go index 06eb316d..57b390b5 100644 --- a/activity.go +++ b/activity.go @@ -32,16 +32,16 @@ type FollowingActivity struct { Type string `json:"type"` ID string `json:"id"` } `json:"links"` - ProfileID int `json:"profile_id"` + ProfileID int64 `json:"profile_id"` ProfileImage string `json:"profile_image"` - SecondProfileID int `json:"second_profile_id"` + 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 int `json:"timestamp"` + Timestamp int64 `json:"timestamp"` Tuuid string `json:"tuuid"` } `json:"args"` Counts struct { @@ -134,19 +134,19 @@ type MineActivity struct { OutgoingRequest bool `json:"outgoing_request"` } `json:"inline_follow"` Actions []string `json:"actions"` - ProfileID int `json:"profile_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 int `json:"latest_reel_media"` + LatestReelMedia int64 `json:"latest_reel_media"` } `json:"args"` Counts struct { } `json:"counts"` Pk string `json:"pk"` } `json:"old_stories"` - ContinuationToken int `json:"continuation_token"` + ContinuationToken int64 `json:"continuation_token"` Subscription interface{} `json:"subscription"` NextID int64 `json:"next_max_id"` Status string `json:"status"` diff --git a/comments.go b/comments.go index 4bb58fd2..e06726f7 100644 --- a/comments.go +++ b/comments.go @@ -15,7 +15,7 @@ type Comments struct { err error Items []Comment `json:"comments"` - CommentCount int `json:"comment_count"` + CommentCount int64 `json:"comment_count"` Caption Caption `json:"caption"` CaptionIsEdited bool `json:"caption_is_edited"` HasMoreComments bool `json:"has_more_comments"` @@ -298,8 +298,8 @@ type Comment struct { CommentIndex int `json:"comment_index"` CommentLikeCount int `json:"comment_like_count"` ContentType string `json:"content_type"` - CreatedAt int `json:"created_at"` - CreatedAtUtc int `json:"created_at_utc"` + 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"` diff --git a/inbox.go b/inbox.go index 202fd8dc..9ae15928 100644 --- a/inbox.go +++ b/inbox.go @@ -55,14 +55,14 @@ type Inbox struct { UnseenCountTs int64 `json:"unseen_count_ts"` BlendedInboxEnabled bool `json:"blended_inbox_enabled"` // this fields are copied from response - SeqID int `json:"seq_id"` + SeqID int64 `json:"seq_id"` PendingRequestsTotal int `json:"pending_requests_total"` SnapshotAtMs int64 `json:"snapshot_at_ms"` } type inboxResp struct { Inbox Inbox `json:"inbox"` - SeqID int `json:"seq_id"` + SeqID int64 `json:"seq_id"` PendingRequestsTotal int `json:"pending_requests_total"` SnapshotAtMs int64 `json:"snapshot_at_ms"` Status string `json:"status"` diff --git a/media.go b/media.go index a6bc9776..3e7eb7da 100644 --- a/media.go +++ b/media.go @@ -66,7 +66,7 @@ type Item struct { Images Images `json:"image_versions2,omitempty"` OriginalWidth int `json:"original_width,omitempty"` OriginalHeight int `json:"original_height,omitempty"` - ImportedTakenAt int `json:"imported_taken_at,omitempty"` + ImportedTakenAt int64 `json:"imported_taken_at,omitempty"` Location Location `json:"location,omitempty"` Lat float64 `json:"lat,omitempty"` Lng float64 `json:"lng,omitempty"` @@ -93,7 +93,7 @@ type Item struct { StoryProductItems []interface{} `json:"story_product_items"` SupportsReelReactions bool `json:"supports_reel_reactions"` ShowOneTapFbShareTooltip bool `json:"show_one_tap_fb_share_tooltip"` - HasSharedToFb int `json:"has_shared_to_fb"` + HasSharedToFb int64 `json:"has_shared_to_fb"` Mentions []Mentions } @@ -453,7 +453,7 @@ type StoryMedia struct { err error Pk interface{} `json:"id"` - LatestReelMedia int `json:"latest_reel_media"` + LatestReelMedia int64 `json:"latest_reel_media"` ExpiringAt float64 `json:"expiring_at"` HaveBeenSeen float64 `json:"seen"` CanReply bool `json:"can_reply"` diff --git a/search.go b/search.go index 27faf12a..0a949ee7 100644 --- a/search.go +++ b/search.go @@ -17,7 +17,7 @@ type SearchResult struct { HasMore bool `json:"has_more"` RankToken string `json:"rank_token"` Status string `json:"status"` - NumResults int `json:"num_results"` + NumResults int64 `json:"num_results"` // User search results Users []User `json:"users"` @@ -197,7 +197,7 @@ func (search *Search) FeedTags(tag string) (*FeedTag, error) { type FeedTag struct { RankedItems []Item `json:"ranked_items"` Images []Item `json:"items"` - NumResults int `json:"num_results"` + NumResults int64 `json:"num_results"` NextID string `json:"next_max_id"` MoreAvailable bool `json:"more_available"` AutoLoadMoreEnabled bool `json:"auto_load_more_enabled"` diff --git a/types.go b/types.go index 7f7e87b2..8c78fa1a 100644 --- a/types.go +++ b/types.go @@ -65,10 +65,10 @@ func (e Error400) Error() string { // Nametag is part of the account information. type Nametag struct { - Mode int `json:"mode"` - Gradient int `json:"gradient"` + Mode int64 `json:"mode"` + Gradient int64 `json:"gradient"` Emoji string `json:"emoji"` - SelfieSticker int `json:"selfie_sticker"` + SelfieSticker int64 `json:"selfie_sticker"` } type friendResp struct { @@ -78,7 +78,7 @@ type friendResp struct { // Location stores media location information. type Location struct { - Pk int `json:"pk"` + Pk int64 `json:"pk"` Name string `json:"name"` Address string `json:"address"` City string `json:"city"` @@ -177,11 +177,11 @@ type Tag struct { // Caption is media caption type Caption struct { ID int64 `json:"pk"` - UserID int `json:"user_id"` + UserID int64 `json:"user_id"` Text string `json:"text"` Type int `json:"type"` - CreatedAt int `json:"created_at"` - CreatedAtUtc int `json:"created_at_utc"` + 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"` @@ -195,7 +195,7 @@ type Caption struct { type Mentions struct { X float64 `json:"x"` Y float64 `json:"y"` - Z int `json:"z"` + Z int64 `json:"z"` Width float64 `json:"width"` Height float64 `json:"height"` Rotation float64 `json:"rotation"` @@ -257,9 +257,9 @@ type LiveItems struct { ID string `json:"pk"` User User `json:"user"` Broadcasts []Broadcast `json:"broadcasts"` - LastSeenBroadcastTs int `json:"last_seen_broadcast_ts"` - RankedPosition int `json:"ranked_position"` - SeenRankedPosition int `json:"seen_ranked_position"` + LastSeenBroadcastTs int64 `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"` CanReshare bool `json:"can_reshare"` @@ -270,13 +270,13 @@ type Broadcast struct { ID int64 `json:"id"` BroadcastStatus string `json:"broadcast_status"` DashManifest string `json:"dash_manifest"` - ExpireAt int `json:"expire_at"` + 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 int `json:"published_time"` + PublishedTime int64 `json:"published_time"` MediaID string `json:"media_id"` BroadcastMessage string `json:"broadcast_message"` OrganicTrackingToken string `json:"organic_tracking_token"` @@ -289,7 +289,7 @@ type BlockedUser struct { Username string `json:"username"` FullName string `json:"full_name"` ProfilePicURL string `json:"profile_pic_url"` - BlockAt int `json:"block_at"` + BlockAt int64 `json:"block_at"` } // Unblock unblocks blocked user. @@ -315,7 +315,7 @@ type InboxItemMedia struct { ItemID string `json:"item_id"` ItemType string `json:"item_type"` RavenMedia struct { - MediaType int `json:"media_type"` + MediaType int64 `json:"media_type"` } `json:"raven_media"` ReplyChainCount int `json:"reply_chain_count"` SeenUserIds []interface{} `json:"seen_user_ids"` diff --git a/users.go b/users.go index 195b35bc..d2abb4f6 100644 --- a/users.go +++ b/users.go @@ -100,31 +100,31 @@ type userResp struct { type User struct { inst *Instagram - 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 []int `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"` + 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"` @@ -159,7 +159,7 @@ type User struct { SocialContext string `json:"social_context,omitempty"` SearchSocialContext string `json:"search_social_context,omitempty"` MutualFollowersCount float64 `json:"mutual_followers_count"` - LatestReelMedia int `json:"latest_reel_media,omitempty"` + 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"`