ig

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stories

type Stories []struct {
	LatestReelMedia int `json:"latest_reel_media"`
	User            struct {
		Pk            int    `json:"pk"`
		Username      string `json:"username"`
		FullName      string `json:"full_name"`
		ProfilePicURL string `json:"profile_pic_url"`
	} `json:"user"`
	Items []struct {
		TakenAt        int `json:"taken_at"`
		MediaType      int `json:"media_type"`
		ImageVersions2 struct {
			Candidates []struct {
				Width  int    `json:"width"`
				Height int    `json:"height"`
				URL    string `json:"url"`
			} `json:"candidates"`
		} `json:"image_versions2"`
		VideoVersions []struct {
			Type   int    `json:"type"`
			Width  int    `json:"width"`
			Height int    `json:"height"`
			URL    string `json:"url"`
			ID     string `json:"id"`
		} `json:"video_versions"`
		LinkText string `json:"link_text,omitempty"`
		StoryCta []struct {
			Links []struct {
				Weburi string `json:"webUri"`
			} `json:"links"`
		} `json:"story_cta,omitempty"`
	} `json:"items"`
}

type SuperAgent

type SuperAgent struct {
	Client        *resty.Client
	Users         []User
	StoriesStruct []Stories
	AfterTs       int64
	QueryString   string
}

A SuperAgent is an object storing all required request data

func Get

func Get(cookies string) *SuperAgent

Used to create a new SuperAgent object

func (*SuperAgent) After

func (s *SuperAgent) After(ts int64) *SuperAgent

Used to set timestamp. All publications after specific timestamp will be ignored

func (*SuperAgent) Posts

func (s *SuperAgent) Posts(names ...interface{}) *SuperAgent

func (*SuperAgent) Stories

func (s *SuperAgent) Stories(ids ...interface{}) []byte

type User

type User struct {
	Id   int64
	Name string
}

Jump to

Keyboard shortcuts

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