instagram

package
v0.0.0-...-2e27039 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package instagram helps you with requesting to Instagram without a key.

Index

Constants

View Source
const TypeCarousel = "carousel"

TypeCarousel is a string that define carousel (collection of media) type for media.

View Source
const TypeImage = "image"

TypeImage is a string that define image type for media.

View Source
const TypeVideo = "video"

TypeVideo is a string that define video type for media.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Biography       string
	ExternalURL     string
	Followers       uint32
	Follows         uint32
	FullName        string
	ID              string
	Private         bool
	Verified        bool
	MediaCount      uint32
	ProfilePicURL   string
	ProfilePicURLhd string
	Username        string
}

An Account describes an Instagram account info.

func GetAccountByUsername

func GetAccountByUsername(username string) (Account, error)

GetAccountByUsername try to find account by username.

func SearchForUsers

func SearchForUsers(username string) ([]Account, error)

SearchForUsers try to find users by given username. Return slice of Account with length of 0 or more.

func (*Account) Update

func (a *Account) Update() error

Update try to update account info

type Location

type Location struct {
	ID         string
	Name       string
	PublicPage bool
	Lat        float64
	Lng        float64
	Slug       string
}

A Location describes an Instagram location info.

func GetLocationByID

func GetLocationByID(id string) (Location, error)

GetLocationByID try to find location info by id. The id is a facebook location id.

type Media

type Media struct {
	Caption       string
	Code          string
	CommentsCount uint32
	Date          uint64
	ID            string
	AD            bool
	LikesCount    uint32
	Type          string
	MediaURL      string
	Owner         Account
	MediaList     []mediaItem
}

A Media describes an Instagram media info.

func GetAccountMedia

func GetAccountMedia(username string, limit uint16) ([]Media, error)

GetAccountMedia try to get slice of user's media. Limit set how much media you need.

func GetAllAccountMedia

func GetAllAccountMedia(username string) ([]Media, error)

GetAllAccountMedia try to get slice of all user's media. It's function the same as GetAccountMedia, except limit = count of user's media.

func GetLocationMedia

func GetLocationMedia(id string, limit uint16) ([]Media, error)

GetLocationMedia try to get slice of last location's media. The id is a facebook location id. The limit set how much media you need.

func GetLocationTopMedia

func GetLocationTopMedia(id string) ([9]Media, error)

GetLocationTopMedia try to get array of top location's media. The id is a facebook location id. Length of returned array is 9.

func GetMediaByCode

func GetMediaByCode(code string) (Media, error)

GetMediaByCode try to find media by code. Code can be find in URL to media, after p/. If URL to media is https://www.instagram.com/p/12376OtT5o/, then code of the media is 12376OtT5o.

func GetMediaByURL

func GetMediaByURL(url string) (Media, error)

GetMediaByURL try to find media by url. URL should be like https://www.instagram.com/p/12376OtT5o/

func GetTagMedia

func GetTagMedia(tag string, quantity uint16) ([]Media, error)

GetTagMedia try to get slice of last tag's media. The limit set how much media you need.

func GetTagTopMedia

func GetTagTopMedia(tag string) ([9]Media, error)

GetTagTopMedia try to get array of top tag's media. Length of returned array is 9.

func (*Media) Update

func (m *Media) Update() error

Update try to update media data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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