public class AlchemyDataNews extends AlchemyService
Modifier and Type | Field and Description |
---|---|
static String |
COUNT
The Constant COUNT (value is "count").
|
static String |
END
The Constant END.
|
static String |
RETURN
The Constant String RETURN (value is "return").
|
static String |
START
The Constant START.
|
static String |
TIME_SLICE
The Constant TIME_SLICE.
|
ENDPOINT, JSONP, OUTPUT_MODE
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
AlchemyDataNews()
Instantiates a new alchemy data news service.
|
AlchemyDataNews(String apiKey)
Instantiates a new alchemy data news service by apiKey.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<DocumentsResult> |
getNewsDocuments(Map<String,Object> parameters)
Gets the news documents.
|
ServiceCall<VolumeResult> |
getVolume(String start,
String end,
String timeSlice)
Get a handle on how many documents are relevant for your query.
|
getInputFormat, processServiceCall, setAuthentication
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, setApiKey, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toString
public static final String COUNT
public static final String END
public static final String RETURN
public static final String START
public static final String TIME_SLICE
public AlchemyDataNews()
public AlchemyDataNews(String apiKey)
apiKey
- the api keypublic ServiceCall<DocumentsResult> getNewsDocuments(Map<String,Object> parameters)
parameters
- the parameterspublic ServiceCall<VolumeResult> getVolume(String start, String end, String timeSlice)
start
- String the time (in UTC seconds) of the beginning of the query duration,end
- String the time (in UTC seconds) of the end of the query duration.timeSlice
- String the duration (in seconds) of each time slice.VolumeResult
Copyright © 2015–2016 IBM Watson. All rights reserved.