Longbridge OpenAPI C++ SDK
content_context.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "async_result.hpp"
4 #include "callback.hpp"
5 #include "config.hpp"
6 #include "types.hpp"
7 
9 
10 namespace longbridge {
11 namespace content {
12 
15 {
16 private:
17  const lb_content_context_t* ctx_;
18 
19 public:
25 
27 
28  static ContentContext create(const Config& config);
29 
31  void topics(const std::string& symbol,
32  AsyncCallback<ContentContext, std::vector<TopicItem>> callback) const;
33 
35  void news(const std::string& symbol,
36  AsyncCallback<ContentContext, std::vector<NewsItem>> callback) const;
37 };
38 
39 } // namespace content
40 } // namespace longbridge
Definition: config.hpp:16
Content context.
Definition: content_context.hpp:15
void news(const std::string &symbol, AsyncCallback< ContentContext, std::vector< NewsItem >> callback) const
Get news list for a symbol.
ContentContext & operator=(const ContentContext &ctx)
ContentContext(const ContentContext &ctx)
ContentContext(const lb_content_context_t *ctx)
ContentContext(ContentContext &&ctx)
static ContentContext create(const Config &config)
void topics(const std::string &symbol, AsyncCallback< ContentContext, std::vector< TopicItem >> callback) const
Get discussion topics list for a symbol.
struct lb_content_context_t lb_content_context_t
Definition: content_context.hpp:8
Definition: async_result.hpp:8
std::function< void(AsyncResult< Ctx, T >)> AsyncCallback
Definition: async_result.hpp:48