Documentation ¶
Index ¶
- Constants
- func CreateMessage(messageData *pb.MessageData, signerPrivate []byte, signerPublic []byte) *pb.Message
- func GetFidByFname(fname string) (uint64, error)
- func Marshal(msg proto.Message, opts MarshalOptions) ([]byte, error)
- func ProcessCastBody(text string) (string, []uint32, []uint64, []*pb.Embed, string)
- type Cast
- type CastGroup
- func (grp *CastGroup) AppendCast(hub *FarcasterHub, castId *pb.CastId) *CastGroup
- func (grp *CastGroup) CollectFnames(hub *FarcasterHub) *CastGroup
- func (grp *CastGroup) FromCast(hub *FarcasterHub, castId *pb.CastId, expandTree bool) *CastGroup
- func (grp *CastGroup) FromCastFidHash(hub *FarcasterHub, fid uint64, hash string, expandTree bool) *CastGroup
- func (grp *CastGroup) FromCastIds(hub *FarcasterHub, castIds []*pb.CastId) *CastGroup
- func (grp *CastGroup) FromFid(hub *FarcasterHub, fid uint64, count uint32) *CastGroup
- func (grp *CastGroup) JsonList(hexHashes bool, realTimestamps bool) ([]byte, error)
- func (grp *CastGroup) JsonThread(hexHashes bool, realTimestamps bool) ([]byte, error)
- func (grp *CastGroup) Links() []string
- type FarcasterHub
- func (h FarcasterHub) Close()
- func (hub FarcasterHub) GetCast(fid uint64, hash []byte) (*pb.Message, error)
- func (hub FarcasterHub) GetCastReplies(fid uint64, hash []byte) (*pb.MessagesResponse, error)
- func (hub FarcasterHub) GetCastsByFid(fid uint64, pageSize uint32) ([]*pb.Message, error)
- func (hub FarcasterHub) GetFidByUsername(username string) (uint64, error)
- func (hub FarcasterHub) GetReactionsByFid(fid uint64, reaction string, pageSize uint32) ([]*pb.Message, error)
- func (hub FarcasterHub) GetUserData(fid uint64, user_data_type string) (*pb.Message, error)
- func (hub FarcasterHub) GetUserDataStr(fid uint64, user_data_type string) (string, error)
- func (hub FarcasterHub) GetUsernameProofsByFid(fid uint64) ([]string, error)
- func (hub FarcasterHub) HubInfo() ([]byte, error)
- func (hub FarcasterHub) PrxGetCast(fid uint64, hash []byte) (*pb.Message, error)
- func (hub FarcasterHub) PrxGetFidByUsername(username string) (uint64, error)
- func (hub FarcasterHub) PrxGetUserDataStr(fid uint64, user_data_type string) (string, error)
- func (hub FarcasterHub) SubmitMessage(message *pb.Message) (*pb.Message, error)
- func (hub FarcasterHub) SubmitMessageData(messageData *pb.MessageData, signerPrivate, signerPublic []byte) (*pb.Message, error)
- type Hash
- type MarshalOptions
- type Reaction
- type Reactions
- func (reactions *Reactions) CastIds() []*pb.CastId
- func (reactions *Reactions) CollectFnames(hub *FarcasterHub) *Reactions
- func (reactions *Reactions) FromFid(hub *FarcasterHub, fid uint64, reactionType string, count uint32) *Reactions
- func (reactions *Reactions) JsonList(hexHashes bool, realTimestamps bool) ([]byte, error)
- type User
- func (u *User) FetchUserData(hub *FarcasterHub, types []string) *User
- func (u *User) FromFid(fid uint64) *User
- func (u *User) FromFname(hub *FarcasterHub, fname string) *User
- func (u *User) Json(userDataType string, hexHashes bool, realTimestamps bool) ([]byte, error)
- func (u *User) String() string
- func (u *User) Value(t string) string
Constants ¶
View Source
const FARCASTER_EPOCH int64 = 1609459200
Variables ¶
This section is empty.
Functions ¶
func CreateMessage ¶
func GetFidByFname ¶
Types ¶
type CastGroup ¶
func NewCastGroup ¶
func NewCastGroup() *CastGroup
func (*CastGroup) AppendCast ¶
func (grp *CastGroup) AppendCast(hub *FarcasterHub, castId *pb.CastId) *CastGroup
func (*CastGroup) CollectFnames ¶
func (grp *CastGroup) CollectFnames(hub *FarcasterHub) *CastGroup
func (*CastGroup) FromCastFidHash ¶
func (grp *CastGroup) FromCastFidHash(hub *FarcasterHub, fid uint64, hash string, expandTree bool) *CastGroup
Populates a CastGroup with all casts in a thread that a CastId participates. Head is set to the top cast of the thread.
func (*CastGroup) FromCastIds ¶
func (grp *CastGroup) FromCastIds(hub *FarcasterHub, castIds []*pb.CastId) *CastGroup
Populates a CastGroup with recent likes from an Fid. Head is set to nil.
func (*CastGroup) FromFid ¶
func (grp *CastGroup) FromFid(hub *FarcasterHub, fid uint64, count uint32) *CastGroup
Populates a CastGroup with recent casts from an Fid. Head is set to nil.
func (*CastGroup) JsonThread ¶
JsonThread returns a JSON string. "casts" is a map hash->message "head" contains the hash of the first message in the thread. replies[casts[x]["hash"]] contains the hashes of the replies to casts[x] You can follow the thread by checking
type FarcasterHub ¶
type FarcasterHub struct {
// contains filtered or unexported fields
}
func NewFarcasterHub ¶
func NewFarcasterHub() *FarcasterHub
func (FarcasterHub) Close ¶
func (h FarcasterHub) Close()
func (FarcasterHub) GetCastReplies ¶
func (hub FarcasterHub) GetCastReplies(fid uint64, hash []byte) (*pb.MessagesResponse, error)
func (FarcasterHub) GetCastsByFid ¶
func (FarcasterHub) GetFidByUsername ¶
func (hub FarcasterHub) GetFidByUsername(username string) (uint64, error)
func (FarcasterHub) GetReactionsByFid ¶
func (FarcasterHub) GetUserData ¶
func (FarcasterHub) GetUserDataStr ¶
func (hub FarcasterHub) GetUserDataStr(fid uint64, user_data_type string) (string, error)
func (FarcasterHub) GetUsernameProofsByFid ¶
func (hub FarcasterHub) GetUsernameProofsByFid(fid uint64) ([]string, error)
func (FarcasterHub) HubInfo ¶
func (hub FarcasterHub) HubInfo() ([]byte, error)
func (FarcasterHub) PrxGetCast ¶
func (FarcasterHub) PrxGetFidByUsername ¶
func (hub FarcasterHub) PrxGetFidByUsername(username string) (uint64, error)
func (FarcasterHub) PrxGetUserDataStr ¶
func (hub FarcasterHub) PrxGetUserDataStr(fid uint64, user_data_type string) (string, error)
func (FarcasterHub) SubmitMessage ¶
func (FarcasterHub) SubmitMessageData ¶
func (hub FarcasterHub) SubmitMessageData(messageData *pb.MessageData, signerPrivate, signerPublic []byte) (*pb.Message, error)
type MarshalOptions ¶
type Reactions ¶
func NewReactions ¶
func NewReactions() *Reactions
func (*Reactions) CollectFnames ¶
func (reactions *Reactions) CollectFnames(hub *FarcasterHub) *Reactions
type User ¶
func (*User) FetchUserData ¶
func (u *User) FetchUserData(hub *FarcasterHub, types []string) *User
hub == nil --> Create new hub connection types == nil --> Fetch all USER_DATA_TYPE_*
Source Files ¶
Click to show internal directories.
Click to hide internal directories.