casts

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: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cast

type Cast struct {
	Hash          string         `json:"hash"`
	ThreadHash    string         `json:"threadHash"`
	ParentHash    string         `json:"parentHash"`
	ParentAuthor  *users.User    `json:"parentAuthor"`
	Author        *users.User    `json:"author"`
	Text          string         `json:"text"`
	Timestamp     uint64         `json:"timestamp"`
	Replies       *Replies       `json:"replies"`
	Reactions     *Reactions     `json:"reactions"`
	Recasts       *Recasts       `json:"recasts"`
	Watches       *Watches       `json:"watches"`
	Recast        bool           `json:"recast"`
	ViewerContext *ViewerContext `json:"viewerContext"`
}

type CastService

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

func NewCastService

func NewCastService(account *account.AccountService, registry *registry.RegistryService) *CastService

func (*CastService) DeleteCast

func (c *CastService) DeleteCast(castHash string) error

func (*CastService) GetCastByHash

func (c *CastService) GetCastByHash(hash string) (*Cast, error)

func (*CastService) GetCastsByAddress

func (c *CastService) GetCastsByAddress(address string, limit int, cursor string) ([]Cast, string, error)

func (*CastService) GetCastsByFid

func (c *CastService) GetCastsByFid(fid uint64, limit int, cursor string) ([]Cast, string, error)

func (*CastService) GetCastsByFname

func (c *CastService) GetCastsByFname(fname string, limit int, cursor string) ([]Cast, string, error)

func (*CastService) GetCastsInThread

func (c *CastService) GetCastsInThread(threadHash string) ([]Cast, error)

func (*CastService) GetRecentCasts

func (c *CastService) GetRecentCasts(limit int) ([]Cast, string, error)

func (*CastService) PublishCast

func (c *CastService) PublishCast(text string) (*Cast, error)

func (*CastService) PublishReplyCast

func (c *CastService) PublishReplyCast(text string, fid uint64, hash string) (*Cast, error)

type CastsResponse

type CastsResponse struct {
	Result struct {
		Casts []Cast `json:"casts"`
	} `json:"result"`
	Next struct {
		Cursor string `json:"cursor"`
	} `json:"next"`
	Errors []struct {
		Message string `json:"message"`
	} `json:"errors"`
}

type Reactions

type Reactions struct {
	Count int `json:"count"`
}

type Recaster

type Recaster struct {
	Fid         uint64 `json:"fid"`
	Username    string `json:"username"`
	DisplayName string `json:"displayName"`
	RecastHash  string `json:"recastHash"`
}

type Recasts

type Recasts struct {
	Count   int         `json:"count"`
	Recasts []*Recaster `json:"recasters"`
}

type Replies

type Replies struct {
	Count int `json:"count"`
}

type ViewerContext

type ViewerContext struct {
	Reacted bool `json:"reacted"`
	Recast  bool `json:"recast"`
	Watched bool `json:"watched"`
}

type Watches

type Watches struct {
	Count int `json:"count"`
}

Jump to

Keyboard shortcuts

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