transform

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Media

type Media struct {
	Id        string      `json:"id"`
	Shortcode string      `json:"shortcode"`
	Type      string      `json:"type"`
	Comments  uint64      `json:"comments_count"`
	Likes     uint64      `json:"likes_count"`
	Caption   string      `json:"caption"`
	IsVideo   bool        `json:"is_video"`
	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      string `json:"type"`
	IsVideo   bool   `json:"is_video"`
	Url       string `json:"url"`
}

MediaItem contains information about the Instagram post which is similar to the Instagram Media struct

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL