Documentation
¶
Index ¶
Constants ¶
View Source
const ( BASE_URL = "https://www.instagram.com" LOGIN = "/accounts/login/ajax/" EXPLORE = "/explore" TAGS = "/tags/" POSTS = "/p/" QUERY = "/query/" ENDING = "/?__a=1" SEARCH = "/web/search/topsearch/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
TagService *TagService
UserService *UserService
PostService *PostService
// contains filtered or unexported fields
}
type CountWrapper ¶
type CountWrapper struct {
Count int `json:"count"`
}
type Dimensions ¶
type LoginResponse ¶
type Node ¶
type Node struct {
Caption string `json:"caption"`
ShortCode string `json:"shortcode"`
Comments CountWrapper `json:"edge_media_to_comment"`
Date int `json:"taken_at_timestamp"`
Dimensions Dimensions `json:"dimensions"`
DisplaySrc string `json:"display_url"`
ID string `json:"id"`
IsVideo bool `json:"is_video"`
Likes CountWrapper `json:"edge_media_preview_like"`
Owner IdWrapper `json:"owner"`
ThumbnailSrc string `json:"thumbnail_src"`
EdgeMediaToCaption struct {
Edges []struct {
Node struct {
Text string `json:"text"`
} `json:"node"`
} `json:"edges"`
} `json:"edge_media_to_caption"`
ThumbnailResources []struct {
Src string `json:"src"`
Width int `json:"config_width"`
Height int `json:"config_height"`
} `json:"thumbnail_resources"`
// contains filtered or unexported fields
}
type NodeWrapper ¶
type NodeWrapper struct {
Node Node `json:"node"`
}
type PostResponse ¶
type PostResponse struct {
ID string `json:"id"`
ShortCode string `json:"shortcode"`
MediaPreview string `json:"media_preview"`
DisplayURL string `json:"display_url"`
ShouldLogClientEvent bool `json:"should_log_client_event"`
IsVideo bool `json:"is_video"`
TrackingToken string `json:"tracking_token"`
TakenAtTimestamp int `json:"taken_at_timestamp"`
CaptionIsEdited bool `json:"caption_is_edited"`
Dimensions Dimensions `json:"dimensions"`
User User `json:"owner"`
DisplayResources []struct {
Src string `json:"src"`
ConfigWidth int `json:"config_width"`
ConfigHeight int `json:"config_height"`
} `json:"display_resources"`
EdgeMediaToTaggedUser struct {
Edges []struct {
Node struct {
User struct {
// contains filtered or unexported fields
} `json:"user"`
X float64 `json:"x"`
Y float64 `json:"y"`
} `json:"node"`
} `json:"edges"`
} `json:"edge_media_to_tagged_user"`
EdgeMediaToCaption struct {
Edges []struct {
Node struct {
Text string `json:"text"`
} `json:"node"`
} `json:"edges"`
} `json:"edge_media_to_caption"`
EdgeMediaPreviewLike struct {
Count int `json:"count"`
Edges []struct {
Node struct {
ID string `json:"id"`
ProfilePicURL string `json:"profile_pic_url"`
Username string `json:"username"`
} `json:"node"`
} `json:"edges"`
} `json:"edge_media_preview_like"`
EdgeMediaToComment struct {
Count int `json:"count"`
PageInfo PageInfo `json:"page_info"`
Edges []struct {
Node struct {
ID string `json:"id"`
Text string `json:"text"`
CreatedAt int `json:"created_at"`
ViewerHasLiked bool `json:"viewer_has_liked"`
EdgeLikedBy CountWrapper `json:"edge_liked_by"`
User User `json:"owner"`
} `json:"node"`
} `json:"edges"`
} `json:"edge_media_to_comment"`
}
type PostService ¶
type PostService struct {
// contains filtered or unexported fields
}
func (*PostService) Get ¶
func (t *PostService) Get(shortCode string) (res *PostResponse, err error)
type TagResponse ¶
type TagResponse struct {
Name string `json:"name"`
IsTopMediaOnly bool `json:"is_top_media_only"`
ProfilePicURL string `json:"profile_pic_url"`
Medias struct {
Count int `json:"count"`
Nodes []NodeWrapper `json:"edges"`
} `json:"edge_hashtag_to_media"`
TopPosts struct {
Nodes []NodeWrapper `json:"edges"`
} `json:"edge_hashtag_to_top_posts"`
}
type TagService ¶
type TagService struct {
// contains filtered or unexported fields
}
func (*TagService) After ¶
func (t *TagService) After(tagName, cursor string, amount uint) (res *TagResponse, err error)
func (*TagService) Recent ¶
func (t *TagService) Recent(tagName string) (res *TagResponse, err error)
func (*TagService) Top ¶
func (t *TagService) Top(tagName string) (res *TagResponse, err error)
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.