jsontypes

package
v0.23.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewsItem

type NewsItem struct {
	Id            string `json:"id"`
	Title         string `json:"title"`
	Description   string `json:"description"`
	Url           string `json:"url"`
	PublishedAt   int64  `json:"published_at,string"`
	CommentsCount int32  `json:"comments_count"`
	LikesCount    int32  `json:"likes_count"`
	SharesCount   int32  `json:"shares_count"`
}

type NewsList

type NewsList struct {
	Items []*NewsItem `json:"items"`
}

type OwnedTopic added in v0.23.0

type OwnedTopic struct {
	ID            string       `json:"id"`
	Title         string       `json:"title"`
	Description   string       `json:"description"`
	Body          string       `json:"body"`
	Author        TopicAuthor  `json:"author"`
	Tickers       []string     `json:"tickers"`
	Hashtags      []string     `json:"hashtags"`
	Images        []TopicImage `json:"images"`
	LikesCount    string       `json:"likes_count"`
	CommentsCount string       `json:"comments_count"`
	ViewsCount    string       `json:"views_count"`
	SharesCount   string       `json:"shares_count"`
	TopicType     string       `json:"topic_type"`
	DetailURL     string       `json:"detail_url"`
	CreatedAt     string       `json:"created_at"`
	UpdatedAt     string       `json:"updated_at"`
}

OwnedTopic is a topic created by the authenticated user, returned by topic detail or list-mine.

type TopicAuthor added in v0.23.0

type TopicAuthor struct {
	MemberID string `json:"member_id"`
	Name     string `json:"name"`
	Avatar   string `json:"avatar"`
}

TopicAuthor is the author of a topic or reply.

type TopicDetailResponse added in v0.23.0

type TopicDetailResponse struct {
	Item OwnedTopic `json:"item"`
}

TopicDetailResponse wraps a single OwnedTopic from the detail endpoint.

type TopicImage added in v0.23.0

type TopicImage struct {
	URL string `json:"url"`
	Sm  string `json:"sm"`
	Lg  string `json:"lg"`
}

TopicImage is an image attached to a topic or reply.

type TopicItem

type TopicItem struct {
	Id            string `json:"id"`
	Title         string `json:"title"`
	Description   string `json:"description"`
	Url           string `json:"url"`
	PublishedAt   int64  `json:"published_at,string"`
	CommentsCount int32  `json:"comments_count"`
	LikesCount    int32  `json:"likes_count"`
	SharesCount   int32  `json:"shares_count"`
}

type TopicList

type TopicList struct {
	Items []*TopicItem `json:"items"`
}

type TopicRepliesResponse added in v0.23.0

type TopicRepliesResponse struct {
	Items []*TopicReply `json:"items"`
}

TopicRepliesResponse wraps a list of replies.

type TopicReply added in v0.23.0

type TopicReply struct {
	ID            string       `json:"id"`
	TopicID       string       `json:"topic_id"`
	Body          string       `json:"body"`
	ReplyToID     string       `json:"reply_to_id"`
	Author        TopicAuthor  `json:"author"`
	Images        []TopicImage `json:"images"`
	LikesCount    string       `json:"likes_count"`
	CommentsCount string       `json:"comments_count"`
	CreatedAt     string       `json:"created_at"`
}

TopicReply is a reply on a topic.

type TopicReplyResponse added in v0.23.0

type TopicReplyResponse struct {
	Item TopicReply `json:"item"`
}

TopicReplyResponse wraps a single reply (create response).

Jump to

Keyboard shortcuts

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