client

package
v1.7.1 Latest Latest
Warning

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

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

Documentation

Overview

Package client provides client for social networks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Username(ctx context.Context) string
	GetUserByName(ctx context.Context, username string) (models.User, error)
	Followers(ctx context.Context) ([]models.User, error)
	UserFollowers(ctx context.Context, user models.User) ([]models.User, error)
	Followings(ctx context.Context) ([]models.User, error)
	UserFollowings(ctx context.Context, user models.User) ([]models.User, error)
	Follow(ctx context.Context, user models.User) error
	Unfollow(ctx context.Context, user models.User) error
	Block(ctx context.Context, user models.User) error
	Unblock(ctx context.Context, user models.User) error
	IsUseless(ctx context.Context, user models.User, threshold int) (bool, error)
	Logout(ctx context.Context) error
}

Client is a common social client interface.

func New

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

New creates Client. Also returns logout func.

Directories

Path Synopsis
Package instagram provides interactions with Instagram social account.
Package instagram provides interactions with Instagram social account.

Jump to

Keyboard shortcuts

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