instagram

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIManager

type APIManager struct {
	Providers map[uint64]IProvider
}

func (*APIManager) GetProvider

func (a *APIManager) GetProvider() IProvider

func (*APIManager) GetRandomProvider

func (a *APIManager) GetRandomProvider() IProvider

type Account

type Account struct {
	AccountID int64
	FullName  string
	Bio       string
	Posts     int64
	Followers int64
	Following int64
	Picture   string
	IsPrivate bool
	Website   string
}

type IAPIManager added in v1.0.72

type IAPIManager interface {
	GetRandomProvider() IProvider
	GetProvider() IProvider
}

func NewAPIManager

func NewAPIManager(configService config.IConfig, newProviderFunctions ...NewProviderFunc) (IAPIManager, error)

type IProvider

type IProvider interface {
	GetName() string
	GetAccount(account string) (*Account, error)
	GetFeed(accountID int64, nextPageToken string) ([]*Post, string, error)
}

func NewRapidAPIInstagramSimple

func NewRapidAPIInstagramSimple(configService config.IConfig) (IProvider, error)

type NewProviderFunc

type NewProviderFunc func(configService config.IConfig) (IProvider, error)

type Post

type Post struct {
	ID        string
	Title     string
	Images    []string
	CreatedAt int64
}

type RapidAPIInstagramSimple

type RapidAPIInstagramSimple struct {
	// contains filtered or unexported fields
}

RapidAPIInstagramSimple https://rapidapi.com/premium-apis-premium-apis-default/api/instagram85/

func (*RapidAPIInstagramSimple) APIHost

func (i *RapidAPIInstagramSimple) APIHost() string

func (*RapidAPIInstagramSimple) APIKey

func (i *RapidAPIInstagramSimple) APIKey() string

func (*RapidAPIInstagramSimple) GetAccount

func (i *RapidAPIInstagramSimple) GetAccount(account string) (*Account, error)

func (*RapidAPIInstagramSimple) GetFeed

func (i *RapidAPIInstagramSimple) GetFeed(accountID int64, nextPageToken string) ([]*Post, string, error)

func (*RapidAPIInstagramSimple) GetName

func (i *RapidAPIInstagramSimple) GetName() string

func (*RapidAPIInstagramSimple) HTTPClient

func (i *RapidAPIInstagramSimple) HTTPClient() *http.Client

type RapidAPIInstagramSimplePost

type RapidAPIInstagramSimplePost struct {
	ID          string `json:"id"`
	CreatedTime struct {
		Unix int64 `json:"unix"`
	} `json:"created_time"`
	Caption string `json:"caption"`
	Type    string `json:"type"`
	Images  struct {
		Original struct {
			High string `json:"high"`
		} `json:"original"`
	} `json:"images"`
	Videos struct {
		Standard string `json:"standard"`
	} `json:"videos"`
	Sidecar []RapidAPIInstagramSimplePost `json:"sidecar"`
}

func (RapidAPIInstagramSimplePost) ToPost

func (p RapidAPIInstagramSimplePost) ToPost() *Post

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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