Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Media ¶
type Media struct {
Source MediaSource `json:"source"`
RequestUrl string `json:"request_url"`
Id string `json:"id"`
Shortcode string `json:"shortcode"`
Title string `json:"title"`
Author string `json:"author"`
Type string `json:"type"`
Comments uint64 `json:"comments_count"`
Likes uint64 `json:"likes_count"`
Caption string `json:"caption"`
Url string `json:"url"`
Items []*MediaItem `json:"items"`
TakenAt int64 `json:"taken_at"` // Timestamp
}
Media which contains a single Instagram post
func FromEmbedResponse ¶
func FromEmbedResponse(embed response.EmbedResponse) Media
FromEmbedResponse will automatically transforms the EmbedResponse to the Media
type MediaItem ¶
type MediaItem struct {
Id string `json:"id"`
Shortcode string `json:"shortcode"`
Type MediaType `json:"type"`
VideoWithoutAudio bool `json:"video_without_audio"`
Url string `json:"url"`
Quality string `json:"quality"`
ContentLength int64 `json:"content_length"`
MimeType string `json:"mime_type"`
Width int `json:"width"`
Height int `json:"height"`
}
MediaItem contains information about the Instagram post which is similar to the Instagram Media struct
type MediaSource ¶
type MediaSource string
const ( MediaSourceInstagram MediaSource = "instagram" MediaSourceYoutube MediaSource = "youtube" )
func (MediaSource) Valid ¶
func (s MediaSource) Valid() bool
type Owner ¶
type Owner struct {
Id string `json:"id"`
ProfilePictureURL string `json:"profile_pic_url"`
Username string `json:"username"`
Followers uint64 `json:"followers_count"`
IsPrivate bool `json:"is_private"`
IsVerified bool `json:"is_verified"`
}
Owner is a single Instagram user who owns the Media
Click to show internal directories.
Click to hide internal directories.