Documentation
¶
Overview ¶
Package content provides ContentContext for accessing Longbridge content APIs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentContext ¶
type ContentContext struct {
// contains filtered or unexported fields
}
ContentContext is a client for interacting with Longbridge Content OpenAPI
func NewFromCfg ¶
func NewFromCfg(cfg *config.Config) (*ContentContext, error)
NewFromCfg returns a ContentContext with config.Config.
func NewFromEnv ¶
func NewFromEnv() (*ContentContext, error)
NewFromEnv returns a ContentContext configured from environment variables.
func (*ContentContext) News ¶
News returns the news list for a symbol. Reference: https://open.longbridge.com/en/docs/quote/security/news
func (*ContentContext) Topics ¶
Topics returns the discussion topics list for a symbol. Reference: https://open.longbridge.com/en/docs/quote/security/topics
type NewsItem ¶
type NewsItem struct {
// News ID
Id string
// Title
Title string
// Description
Description string
// URL
Url string
// Published time
PublishedAt time.Time
// Comments count
CommentsCount int32
// Likes count
LikesCount int32
SharesCount int32
}
NewsItem is a news article for a security
type TopicItem ¶
type TopicItem struct {
// Topic ID
Id string
// Title
Title string
// Description
Description string
// URL
Url string
// Published time
PublishedAt time.Time
// Comments count
CommentsCount int32
// Likes count
LikesCount int32
SharesCount int32
}
TopicItem is a discussion topic for a security
Click to show internal directories.
Click to hide internal directories.