shared

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventType

type EventType string

Type of monitor event fired when account activity occurs.

const (
	EventTypeTweetNew     EventType = "tweet.new"
	EventTypeTweetReply   EventType = "tweet.reply"
	EventTypeTweetRetweet EventType = "tweet.retweet"
	EventTypeTweetQuote   EventType = "tweet.quote"
)

type PaginatedTweets

type PaginatedTweets struct {
	HasNextPage bool          `json:"has_next_page" api:"required"`
	NextCursor  string        `json:"next_cursor" api:"required"`
	Tweets      []SearchTweet `json:"tweets" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		HasNextPage respjson.Field
		NextCursor  respjson.Field
		Tweets      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Paginated list of tweets with cursor-based navigation.

func (PaginatedTweets) RawJSON

func (r PaginatedTweets) RawJSON() string

Returns the unmodified JSON received from the API

func (*PaginatedTweets) UnmarshalJSON

func (r *PaginatedTweets) UnmarshalJSON(data []byte) error

type PaginatedUsers

type PaginatedUsers struct {
	HasNextPage bool          `json:"has_next_page" api:"required"`
	NextCursor  string        `json:"next_cursor" api:"required"`
	Users       []UserProfile `json:"users" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		HasNextPage respjson.Field
		NextCursor  respjson.Field
		Users       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Paginated list of user profiles with cursor-based navigation.

func (PaginatedUsers) RawJSON

func (r PaginatedUsers) RawJSON() string

Returns the unmodified JSON received from the API

func (*PaginatedUsers) UnmarshalJSON

func (r *PaginatedUsers) UnmarshalJSON(data []byte) error

type SearchTweet added in v0.4.0

type SearchTweet struct {
	ID            string            `json:"id" api:"required"`
	Text          string            `json:"text" api:"required"`
	Author        SearchTweetAuthor `json:"author"`
	BookmarkCount int64             `json:"bookmarkCount"`
	CreatedAt     string            `json:"createdAt"`
	// True for Note Tweets (long-form content, up to 25,000 characters)
	IsNoteTweet  bool  `json:"isNoteTweet"`
	LikeCount    int64 `json:"likeCount"`
	QuoteCount   int64 `json:"quoteCount"`
	ReplyCount   int64 `json:"replyCount"`
	RetweetCount int64 `json:"retweetCount"`
	ViewCount    int64 `json:"viewCount"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		Text          respjson.Field
		Author        respjson.Field
		BookmarkCount respjson.Field
		CreatedAt     respjson.Field
		IsNoteTweet   respjson.Field
		LikeCount     respjson.Field
		QuoteCount    respjson.Field
		ReplyCount    respjson.Field
		RetweetCount  respjson.Field
		ViewCount     respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Tweet returned from search results with inline author info.

func (SearchTweet) RawJSON added in v0.4.0

func (r SearchTweet) RawJSON() string

Returns the unmodified JSON received from the API

func (*SearchTweet) UnmarshalJSON added in v0.4.0

func (r *SearchTweet) UnmarshalJSON(data []byte) error

type SearchTweetAuthor added in v0.4.0

type SearchTweetAuthor struct {
	ID       string `json:"id" api:"required"`
	Name     string `json:"name" api:"required"`
	Username string `json:"username" api:"required"`
	Verified bool   `json:"verified"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Name        respjson.Field
		Username    respjson.Field
		Verified    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SearchTweetAuthor) RawJSON added in v0.4.0

func (r SearchTweetAuthor) RawJSON() string

Returns the unmodified JSON received from the API

func (*SearchTweetAuthor) UnmarshalJSON added in v0.4.0

func (r *SearchTweetAuthor) UnmarshalJSON(data []byte) error

type UserProfile added in v0.4.0

type UserProfile struct {
	ID             string `json:"id" api:"required"`
	Name           string `json:"name" api:"required"`
	Username       string `json:"username" api:"required"`
	CreatedAt      string `json:"createdAt"`
	Description    string `json:"description"`
	Followers      int64  `json:"followers"`
	Following      int64  `json:"following"`
	Location       string `json:"location"`
	ProfilePicture string `json:"profilePicture"`
	StatusesCount  int64  `json:"statusesCount"`
	Verified       bool   `json:"verified"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID             respjson.Field
		Name           respjson.Field
		Username       respjson.Field
		CreatedAt      respjson.Field
		Description    respjson.Field
		Followers      respjson.Field
		Following      respjson.Field
		Location       respjson.Field
		ProfilePicture respjson.Field
		StatusesCount  respjson.Field
		Verified       respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

X user profile with bio, follower counts, and verification status.

func (UserProfile) RawJSON added in v0.4.0

func (r UserProfile) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserProfile) UnmarshalJSON added in v0.4.0

func (r *UserProfile) UnmarshalJSON(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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