Documentation
¶
Index ¶
- Constants
- func SetSigner(s *Signer)
- type BulkUsersResponse
- type Cast
- type CastClient
- type CastPayload
- type CastReactionObjType
- type Channel
- type ChannelResponse
- type ChannelsResponse
- type Client
- func (c *Client) FetchAllChannels() error
- func (c *Client) GetCachedChannelIds() ([]string, error)
- func (c *Client) GetCastWithReplies(signer *Signer, hash string) (*Cast, error)
- func (c *Client) GetChannelById(q string) (*Channel, error)
- func (c *Client) GetChannelByParentUrl(q string) (*Channel, error)
- func (c *Client) GetChannelUrlById(id string) string
- func (c *Client) GetFeed(r *FeedRequest) (*FeedResponse, error)
- func (c *Client) GetNotifications(fid uint64, opts ...RequestOption) (*NotificationsResponse, error)
- func (c *Client) GetUserByFID(fid uint64, viewer uint64) (*User, error)
- func (c *Client) GetUserChannels(fid uint64, active bool, opts ...RequestOption) ([]*Channel, error)
- func (c *Client) PostCast(signer *Signer, text, parent, channel string, parent_fid uint64) (*PostCastResponse, error)
- func (c *Client) React(s *Signer, cast string, t ReactionType) error
- func (c *Client) SearchChannel(q string) ([]*Channel, error)
- func (c *Client) SetAPIKey(key string)
- func (c *Client) SetOptions(opts ...RequestOption)
- type Conversation
- type ConversationResponse
- type Embed
- type FeedRequest
- type FeedResponse
- type FollowNotification
- type NeynarError
- type Notification
- type NotificationCast
- type NotificationsResponse
- type NotificationsType
- type PostCastResponse
- type Profile
- type Reaction
- type ReactionNotification
- type ReactionRequest
- type ReactionResponse
- type ReactionType
- type Reactions
- type RequestOption
- type Signer
- type User
- type VerifiedAddresses
- type ViewerContext
Constants ¶
View Source
const ( NotificationsTypeFollows NotificationsType = "follows" NotificationsTypeLikes NotificationsType = "likes" NotificationsTypeRecasts NotificationsType = "recasts" NotificationsTypeMention NotificationsType = "mention" NotificationsTypeReply NotificationsType = "reply" CastReactionObjTypeLikes CastReactionObjType = "likes" CastReactionObjTypeRecasts CastReactionObjType = "recasts" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BulkUsersResponse ¶
type BulkUsersResponse struct {
Users []*User `json:"users"`
}
type Cast ¶
type Cast struct {
Object string `json:"object"`
Hash string `json:"hash"`
ThreadHash string `json:"thread_hash"`
ParentHash string `json:"parent_hash"`
ParentURL string `json:"parent_url"`
ParentAuthor struct {
FID int32
} `json:"parent_author"`
Author User `json:"author"`
Text string `json:"text"`
Timestamp time.Time `json:"timestamp"`
Embeds []Embed `json:"embeds"`
Reactions Reactions `json:"reactions"`
Replies struct {
Count int32 `json:"count"`
}
DirectReplies []*Cast `json:"direct_replies"`
ViewerContext struct {
Liked bool `json:"liked"`
Recasted bool `json:"recasted"`
} `json:"viewer_context"`
}
type CastClient ¶
type CastClient struct {
// contains filtered or unexported fields
}
type CastPayload ¶
type CastReactionObjType ¶ added in v0.1.4
type CastReactionObjType string
type Channel ¶
type Channel struct {
ID string `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
Description string `json:"description"`
FollowerCount int32 `json:"follower_count"`
Object string `json:"object"`
ImageURL string `json:"image_url"`
CreatedAt uint `json:"created_at"`
ParentURL string `json:"parent_url"`
Lead User `json:"lead"`
Hosts []User `json:"hosts"`
}
type ChannelResponse ¶
type ChannelResponse struct {
Channel *Channel `json:"channel"`
ViewerContext ViewerContext `json:"viewer_context"`
}
type ChannelsResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) FetchAllChannels ¶
func (*Client) GetCachedChannelIds ¶
func (*Client) GetCastWithReplies ¶
func (*Client) GetChannelByParentUrl ¶
func (*Client) GetChannelUrlById ¶
func (*Client) GetFeed ¶
func (c *Client) GetFeed(r *FeedRequest) (*FeedResponse, error)
func (*Client) GetNotifications ¶ added in v0.1.4
func (c *Client) GetNotifications(fid uint64, opts ...RequestOption) (*NotificationsResponse, error)
func (*Client) GetUserByFID ¶
func (*Client) GetUserChannels ¶
func (*Client) SetOptions ¶
func (c *Client) SetOptions(opts ...RequestOption)
type Conversation ¶
type Conversation struct {
Cast
}
type ConversationResponse ¶
type ConversationResponse struct {
Conversation *struct {
Cast Cast `json:"cast"`
} `json:"conversation"`
}
type FeedRequest ¶
type FeedResponse ¶
type FeedResponse struct {
Casts []*Cast
}
type FollowNotification ¶ added in v0.1.4
type NeynarError ¶
type NeynarError struct {
// contains filtered or unexported fields
}
func (NeynarError) Error ¶
func (e NeynarError) Error() string
type Notification ¶ added in v0.1.4
type Notification struct {
Object string `json:"object"`
MostRecentTimestamp time.Time `json:"most_recent_timestamp"`
Type NotificationsType `json:"type"`
Cast *Cast `json:"cast"`
Follows []FollowNotification `json:"follows"`
Reactions []ReactionNotification `json:"reactions"`
}
type NotificationCast ¶ added in v0.1.4
type NotificationCast struct {
Cast // may be cast_dehydrated which only has hash, specifically for reactions
}
type NotificationsResponse ¶ added in v0.1.4
type NotificationsResponse struct {
Notifications []*Notification `json:"notifications"`
Next struct {
Cursor *string `json:"cursor"`
}
}
type NotificationsType ¶ added in v0.1.4
type NotificationsType string
type PostCastResponse ¶
type ReactionNotification ¶ added in v0.1.4
type ReactionNotification struct {
Object CastReactionObjType `json:"object"`
Cast NotificationCast `json:"cast"`
User User `json:"user"`
}
type ReactionRequest ¶
type ReactionRequest struct {
SignerUUID string `json:"signer_uuid"`
ReactionType ReactionType `json:"reaction_type"`
Target string `json:"target"`
}
type ReactionResponse ¶
type ReactionType ¶
type ReactionType string
const ( Like ReactionType = "like" Recast ReactionType = "recast" )
type RequestOption ¶
func WithFID ¶
func WithFID(fid uint64) RequestOption
func WithLimit ¶
func WithLimit(limit int) RequestOption
func WithQuery ¶
func WithQuery(key, value string) RequestOption
type User ¶
type User struct {
FID uint64 `json:"fid"`
Username string `json:"username"`
DisplayName string `json:"display_name"`
PfpURL string `json:"pfp_url"`
Profile Profile `json:"profile"`
FollowerCount int32 `json:"follower_count"`
FollowingCount int32 `json:"following_count"`
Verifications []string `json:"verifications"`
VerifiedAddresses VerifiedAddresses `json:"verified_addresses"`
ActiveStatus string `json:"active_status"`
PowerBadge bool `json:"power_badge"`
ViewerContext ViewerContext `json:"viewer_context"`
}
type VerifiedAddresses ¶
type ViewerContext ¶
Click to show internal directories.
Click to hide internal directories.