Documentation ¶
Index ¶
- Constants
- Variables
- func NotOK(at, stat, msg string) error
- type Activity
- type Bases
- type BroadcastsResp
- type Client
- func (c *Client) Broadcasts() (*BroadcastsResp, error)
- func (c *Client) BroadcastsOptions() error
- func (c *Client) DirectBadgeCount(noRaven bool) (*DirectBadgeCountResp, error)
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) FetchActivity() error
- func (c *Client) FetchHome() error
- func (c *Client) GraphQL(hash string, variables interface{}, ret interface{}) error
- func (c *Client) Login(user, pass string) error
- func (c *Client) Stories(opts *StoriesOpts) (*StoriesResp, error)
- type Comment
- type DirectBadgeCountResp
- type DisplayResource
- type NotOKError
- type PageInfo
- type Post
- type State
- type StoriesData
- type StoriesDataEdge
- type StoriesDataEdgeReelsTrayToReel
- type StoriesDataFeedReelsTray
- type StoriesDataUser
- type StoriesOpts
- type StoriesResp
- type StoriesUser
- type Story
- type StoryItem
- type StoryItemDimensions
- type StoryItemMediaToSponsorUser
- type StoryItemMediaViewers
- type StoryItemMediaViewersEdge
- type StoryItemMediaViewersPageInfo
- type StoryItemTappableObject
- type StoryItemTappableObjectMedia
- type User
Constants ¶
View Source
const ( PlatformTypeUNKNOWN = "unknown" PlatformTypeIOS = "ios" PlatformTypeANDROID = "android" PlatformTypeBLACKBERRY = "blackberry" PlatformTypeWINDOWSPHONE = "windows_phone" PlatformTypeWEB = "web" PlatformTypeWINDOWSPHONE10 = "windows_phone_10" PlatformTypeWINDOWSNT10 = "windows_nt_10" PlatformTypeOSMETA_WINDOWS_PHONE = "osmeta_windows_phone" PlatformTypeOSMETA_WINDOWS_TABLET = "osmeta_windows_tablet" PlatformTypeOSMETA_TIZEN = "osmeta_tizen" PlatformTypeOSMETA_DEFAULT = "osmeta_default" PlatformIndexUNKNOWN = -1 PlatformIndexIOS = 0 PlatformIndexANDROID = 1 AppleAppStoreAppID = "389801252" AppleAppStoreURL = "https://itunes.apple.com/app/instagram/id389801252" AppleAppStoreIGTVAppID = "1394351700" AppleAppStoreIGTVURL = "https://itunes.apple.com/app/igtv/id1394351700" InstagramFBAppID = "124024574287414" InstagramWebFBAppID = "1217981644879628" InstagramWebDesktopFBAppID = "936619743392459" IGLiteAppID = "152431142231154" InstagramWindowsPWAAppID = "487152425211411" InstagramGoogleClientID = "51884436741-uudfu5nafa5ufh5e4fks8jv5aa8rgddd.apps.googleusercontent.com" AppVersionForLogging = "1.0.0" InstagramWebClientToken = "65a937f07619e8d4dce239c462a447ce" InstagramWebDesktopClientToken = "3cdb3f896252a1db29679cb4554db266" IGLiteClientToken = "0c20b150a63e609a804abbb9925df651" GooglePlayURL = "https://play.google.com/store/apps/details?id=com.instagram.android" GooglePlayIGLiteURL = "https://play.google.com/store/apps/details?id=com.instagram.lite" GooglePlayIGTVURL = "https://play.google.com/store/apps/details?id=com.instagram.igtv" WindowsPhoneAppStoreURL = "http://www.windowsphone.com/s?appid=3222a126-7f20-4273-ab4a-161120b21aea" OSMetaWindowsPhoneAppStoreURL = "https://www.microsoft.com/en-us/store/apps/instagram/9nblggh5l9xt" UnknownDownloadURL = "/download/" PressSiteURL = "https://instagram-press.com/" )
taken from https://www.instagram.com/static/bundles/metro/ConsumerLibCommons.js/061fabe68827.js
View Source
const (
StoriesHash = "04334405dbdef91f2c4e207b84c204d7"
)
Variables ¶
View Source
var DefaultBases = &Bases{
Web: "https://instagram.com",
Live: "https://i.instagram.com",
}
View Source
var (
ErrActivityMissing = errors.New("no activity returned")
)
View Source
var (
ErrAdditionalDataNotFound = errors.New("additional data not found")
)
View Source
var (
ErrLoginNotAuthenticated = errors.New("login not authenticated")
)
View Source
var (
)Functions ¶
Types ¶
type BroadcastsResp ¶
type BroadcastsResp struct { Broadcasts []interface{} `json:"broadcasts"` // contains filtered or unexported fields }
type Client ¶
func (*Client) Broadcasts ¶
func (c *Client) Broadcasts() (*BroadcastsResp, error)
func (*Client) BroadcastsOptions ¶
func (*Client) DirectBadgeCount ¶
func (c *Client) DirectBadgeCount(noRaven bool) (*DirectBadgeCountResp, error)
func (*Client) FetchActivity ¶
func (*Client) Stories ¶
func (c *Client) Stories(opts *StoriesOpts) (*StoriesResp, error)
type DirectBadgeCountResp ¶
type DisplayResource ¶
type NotOKError ¶
func (NotOKError) Error ¶
func (n NotOKError) Error() string
type Post ¶
type Post struct { Typename string `json:"__typename"` AccessibilityCaption string `json:"accessibility_caption"` Attribution interface{} `json:"attribution"` CommentsDisabled bool `json:"comments_disabled"` DashInfo additionalDataDashInfo `json:"dash_info"` Dimensions struct { Height int64 `json:"height"` Width int64 `json:"width"` } `json:"dimensions"` DisplayResources []DisplayResource `json:"display_resources"` DisplayURL string `json:"display_url"` RawComments struct { Count int64 `json:"count"` Edges []struct { Node *Comment `json:"node"` } `json:"edges"` PageInfo PageInfo `json:"page_info"` } `json:"edge_media_preview_comment"` RawLikes struct { Count int64 `json:"count"` Edges []struct { Node *User `json:"node"` } `json:"edges"` } `json:"edge_media_preview_like"` RawCaptions struct { Edges []struct { Node struct { Text string `json:"text"` } `json:"node"` } `json:"edges"` } `json:"edge_media_to_caption"` RawSponsorUsers struct { Edges []interface{} `json:"edges"` } `json:"edge_media_to_sponsor_user"` RawTaggedUsers struct { Edges []struct { Node struct { User *User `json:"user"` X float64 `json:"x"` Y float64 `json:"y"` } `json:"node"` } `json:"edges"` } `json:"edge_media_to_tagged_user"` RawChildren struct { Edges []struct { Node *Post `json:"node"` } `json:"edges"` } `json:"edge_sidecar_to_children"` FactCheckInformation interface{} `json:"fact_check_information"` FactCheckOverallRating interface{} `json:"fact_check_overall_rating"` FollowHashtagInfo interface{} `json:"follow_hashtag_info"` GatingInfo interface{} `json:"gating_info"` ID string `json:"id"` IsVideo bool `json:"is_video"` Location interface{} `json:"location"` MediaPreview string `json:"media_preview"` Owner *User `json:"owner"` Shortcode string `json:"shortcode"` TakenAtTimestamp int64 `json:"taken_at_timestamp"` TrackingToken string `json:"tracking_token"` VideoURL string `json:"video_url"` VideoViewCount int64 `json:"video_view_count"` ViewerHasLiked bool `json:"viewer_has_liked"` ViewerHasSaved bool `json:"viewer_has_saved"` ViewerHasSavedToCollection bool `json:"viewer_has_saved_to_collection"` ViewerInPhotoOfYou bool `json:"viewer_in_photo_of_you"` }
type StoriesData ¶
type StoriesData struct {
User StoriesDataUser `json:"user"`
}
type StoriesDataEdge ¶
type StoriesDataEdge struct {
Node Story `json:"node"`
}
type StoriesDataEdgeReelsTrayToReel ¶
type StoriesDataEdgeReelsTrayToReel struct {
Edges []StoriesDataEdge `json:"edges"`
}
type StoriesDataFeedReelsTray ¶
type StoriesDataFeedReelsTray struct {
EdgeReelsTrayToReel StoriesDataEdgeReelsTrayToReel `json:"edge_reels_tray_to_reel"`
}
type StoriesDataUser ¶
type StoriesDataUser struct {
FeedReelsTray StoriesDataFeedReelsTray `json:"feed_reels_tray"`
}
type StoriesOpts ¶
type StoriesResp ¶
type StoriesResp struct { Data StoriesData `json:"data"` // contains filtered or unexported fields }
func (*StoriesResp) Stories ¶
func (s *StoriesResp) Stories() []Story
type StoriesUser ¶
type Story ¶
type Story struct { Typename string `json:"__typename"` HasBestiesMedia bool `json:"has_besties_media"` HasPrideMedia bool `json:"has_pride_media"` ID string `json:"id"` CanReply bool `json:"can_reply"` ExpiringAt int `json:"expiring_at"` LatestReelMedia int `json:"latest_reel_media"` Muted bool `json:"muted"` SupportsReelReactions interface{} `json:"supports_reel_reactions"` Items []StoryItem `json:"items"` PrefetchCount int `json:"prefetch_count"` RankedPosition int `json:"ranked_position"` Seen int `json:"seen"` SeenRankedPosition int `json:"seen_ranked_position"` User StoriesUser `json:"user"` Owner StoriesUser `json:"owner"` }
type StoryItem ¶
type StoryItem struct { Typename string `json:"__typename"` Audience string `json:"audience"` ID string `json:"id"` Dimensions StoryItemDimensions `json:"dimensions"` StoryViewCount int `json:"story_view_count"` EdgeStoryMediaViewers StoryItemMediaViewers `json:"edge_story_media_viewers"` DisplayResources []DisplayResource `json:"display_resources"` DisplayURL string `json:"display_url"` MediaPreview string `json:"media_preview"` GatingInfo interface{} `json:"gating_info"` FactCheckOverallRating interface{} `json:"fact_check_overall_rating"` FactCheckInformation interface{} `json:"fact_check_information"` TakenAtTimestamp int `json:"taken_at_timestamp"` ExpiringAtTimestamp int `json:"expiring_at_timestamp"` StoryCtaURL interface{} `json:"story_cta_url"` IsVideo bool `json:"is_video"` Owner StoriesUser `json:"owner"` TrackingToken string `json:"tracking_token"` TappableObjects []StoryItemTappableObject `json:"tappable_objects"` StoryAppAttribution interface{} `json:"story_app_attribution"` MediaToSponsorUser StoryItemMediaToSponsorUser `json:"edge_media_to_sponsor_user"` }
type StoryItemDimensions ¶
type StoryItemMediaToSponsorUser ¶
type StoryItemMediaToSponsorUser struct {
Edges []interface{} `json:"edges"`
}
type StoryItemMediaViewers ¶
type StoryItemMediaViewers struct { Count int `json:"count"` Edges []StoryItemMediaViewersEdge `json:"edges"` PageInfo StoryItemMediaViewersPageInfo `json:"page_info"` }
type StoryItemMediaViewersEdge ¶
type StoryItemMediaViewersEdge struct {
Node StoriesUser `json:"node"`
}
type StoryItemTappableObject ¶
type StoryItemTappableObject struct { Typename string `json:"__typename"` X float64 `json:"x"` Y float64 `json:"y"` Width float64 `json:"width"` Height float64 `json:"height"` Rotation float64 `json:"rotation"` CustomTitle interface{} `json:"custom_title"` Attribution interface{} `json:"attribution"` Media StoryItemTappableObjectMedia `json:"media"` }
type User ¶
type User struct { ID string `json:"id"` Username string `json:"username"` Password string `json:"-"` FullName string `json:"full_name"` ProfilePic string `json:"profile_pic_url"` Blocked bool `json:"blocked_by_viewer"` Followed bool `json:"followed_by_viewer"` HasBlocked bool `json:"has_blocked_viewer"` Private bool `json:"is_private"` Verified bool `json:"is_verified"` Requested bool `json:"requested_by_viewer"` Restricted bool `json:"restricted_by_viewer"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.