instagram

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package instagram provides interactions with Instagram social account.

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyInput = errors.New("should not be empty")

ErrEmptyInput returned in case when user input is empty.

Functions

This section is empty.

Types

type Client

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

Client represents instagram client.

func New

func New(ctx context.Context, cfgPath string) (*Client, error)

New Client constructor.

func (*Client) Block

func (i *Client) Block(ctx context.Context, user models.User) error

Block user.

func (*Client) Follow

func (i *Client) Follow(ctx context.Context, user models.User) error

Follow user.

func (*Client) Followers

func (i *Client) Followers(ctx context.Context) ([]models.User, error)

Followers returns list of followers.

func (*Client) Followings

func (i *Client) Followings(ctx context.Context) ([]models.User, error)

Followings returns list of followings.

func (*Client) GetUserByName

func (i *Client) GetUserByName(_ context.Context, username string) (models.User, error)

GetUserByName finds user by username.

func (*Client) IsUseless

func (i *Client) IsUseless(ctx context.Context, user models.User, threshold int) (bool, error)

IsUseless reports where user is useless for statistics.

func (*Client) Logout

func (i *Client) Logout(ctx context.Context) error

Logout clean session and send logout request.

func (*Client) Unblock

func (i *Client) Unblock(ctx context.Context, user models.User) error

Unblock user.

func (*Client) Unfollow

func (i *Client) Unfollow(ctx context.Context, user models.User) error

Unfollow user.

func (*Client) UserFollowers

func (i *Client) UserFollowers(ctx context.Context, user models.User) ([]models.User, error)

UserFollowers returns user followers.

func (*Client) UserFollowings

func (i *Client) UserFollowings(ctx context.Context, user models.User) ([]models.User, error)

UserFollowings returns user followings.

func (*Client) Username

func (i *Client) Username(_ context.Context) string

Username returns current account username.

Jump to

Keyboard shortcuts

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