users

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 4 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bio

type Bio struct {
	Text     string   `json:"text"`
	Mentions []string `json:"mentions"`
}

type Pfp

type Pfp struct {
	Url      string `json:"url"`
	Verified bool   `json:"verified"`
}

type Profile

type Profile struct {
	Bio Bio `json:"bio"`
}

type User

type User struct {
	Fid              int            `json:"fid"`
	Username         string         `json:"username"`
	DisplayName      string         `json:"displayName"`
	Pfp              Pfp            `json:"pfp"`
	Profile          Profile        `json:"profile"`
	FollowerCount    int            `json:"followerCount"`
	FollowingCount   int            `json:"followingCount"`
	ReferrerUsername string         `json:"referrerUsername"`
	ViewerContext    *ViewerContext `json:"viewerContext"`
}

type UserResponse

type UserResponse struct {
	Result *User `json:"result"`
	Errors []struct {
		Message string `json:"message"`
	} `json:"errors"`
}

type UserService

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

func NewUserService

func NewUserService(account *account.AccountService, registry *registry.RegistryService) *UserService

func (*UserService) GetCustodyAddressByFid

func (u *UserService) GetCustodyAddressByFid(fid uint64) (string, error)

func (*UserService) GetCustodyAddressByUsername

func (u *UserService) GetCustodyAddressByUsername(username string) (string, error)

func (*UserService) GetRecentUsers

func (u *UserService) GetRecentUsers(limit int, cursor string) ([]User, string, error)

func (*UserService) GetUserByAddress

func (u *UserService) GetUserByAddress(address string) (*User, error)

func (*UserService) GetUserByFid

func (u *UserService) GetUserByFid(fid uint64) (*User, error)

func (*UserService) GetUserByUsername

func (u *UserService) GetUserByUsername(username string) (*User, error)

func (*UserService) Me

func (u *UserService) Me() (*User, error)

type ViewerContext

type ViewerContext struct {
	Following         bool `json:"following"`
	FollowedBy        bool `json:"followedBy"`
	CanSendDirectCast bool `json:"canSendDirectCast"`
}

Jump to

Keyboard shortcuts

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