Package com.longbridge.content
Class ContentContext
- java.lang.Object
-
- com.longbridge.content.ContentContext
-
- All Implemented Interfaces:
AutoCloseable
public class ContentContext extends Object implements AutoCloseable
Content context
-
-
Constructor Summary
Constructors Constructor Description ContentContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static ContentContextcreate(Config config)Create a ContentContext objectCompletableFuture<NewsItem[]>getNews(String symbol)Get news listCompletableFuture<TopicItem[]>getTopics(String symbol)Get discussion topics list
-
-
-
Method Detail
-
create
public static ContentContext create(Config config)
Create a ContentContext object- Parameters:
config- Config object- Returns:
- A ContentContext object
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getTopics
public CompletableFuture<TopicItem[]> getTopics(String symbol) throws OpenApiException
Get discussion topics list- Parameters:
symbol- Security symbol- Returns:
- A Future representing the result of the operation
- Throws:
OpenApiException- If an error occurs
-
getNews
public CompletableFuture<NewsItem[]> getNews(String symbol) throws OpenApiException
Get news list- Parameters:
symbol- Security symbol- Returns:
- A Future representing the result of the operation
- Throws:
OpenApiException- If an error occurs
-
-