public class DataSiftHistorics extends DataSiftApiClient
| Modifier and Type | Field and Description |
|---|---|
String |
DELETE |
String |
GET |
String |
PREPARE |
String |
START |
String |
STATUS |
String |
STOP |
String |
UPDATE |
config| Constructor and Description |
|---|
DataSiftHistorics(DataSiftConfig config) |
| Modifier and Type | Method and Description |
|---|---|
FutureData<DataSiftResult> |
delete(PreparedHistoricsQuery query) |
FutureData<DataSiftResult> |
delete(String id)
Delete the historic with the given ID
|
FutureData<HistoricsQuery> |
get(String id) |
FutureData<HistoricsQuery> |
get(String id,
boolean withEstimate)
Get detailed information about a historics query
|
FutureData<HistoricsQueryList> |
list() |
FutureData<HistoricsQueryList> |
list(int page) |
FutureData<HistoricsQueryList> |
list(int max,
int page) |
FutureData<HistoricsQueryList> |
list(int max,
int page,
boolean withEstimate)
Retrieve a list of
HistoricsQuery objects |
FutureData<PreparedHistoricsQuery> |
prepare(String hash,
org.joda.time.DateTime start,
org.joda.time.DateTime end,
String name) |
FutureData<PreparedHistoricsQuery> |
prepare(String hash,
long start,
long end,
String name,
int sample,
String... sources) |
FutureData<PreparedHistoricsQuery> |
prepare(String hash,
long start,
long end,
String name,
String... sources) |
FutureData<DataSiftResult> |
start(FutureData<PreparedHistoricsQuery> query)
Start the historics query given
|
FutureData<DataSiftResult> |
start(PreparedHistoricsQuery query) |
FutureData<DataSiftResult> |
start(String id)
Start the historics query with the given ID
|
protected FutureData<DataSiftResult> |
start(String id,
FutureData<DataSiftResult> f) |
FutureData<HistoricsStatus> |
status(org.joda.time.DateTime start,
org.joda.time.DateTime end,
String... sources)
Check the status of data availability in our archive for the given time period
|
FutureData<DataSiftResult> |
stop(PreparedHistoricsQuery query,
String reason) |
FutureData<DataSiftResult> |
stop(String id,
String reason)
Stop a given historics query
|
FutureData<DataSiftResult> |
update(String id,
String name)
Update the name of a historics query
|
failNotify, newParams, newRequestCallback, performRequest, unwrapFuturepublic final String PREPARE
public final String START
public final String STOP
public final String UPDATE
public final String STATUS
public final String DELETE
public final String GET
public DataSiftHistorics(DataSiftConfig config)
public FutureData<DataSiftResult> start(PreparedHistoricsQuery query)
public FutureData<DataSiftResult> start(FutureData<PreparedHistoricsQuery> query)
BaseDataSiftResult.isSuccessful()public FutureData<DataSiftResult> start(String id)
id - the historics idBaseDataSiftResult.isSuccessful()protected FutureData<DataSiftResult> start(String id, FutureData<DataSiftResult> f)
public FutureData<DataSiftResult> stop(PreparedHistoricsQuery query, String reason)
public FutureData<DataSiftResult> stop(String id, String reason)
id - the historics IDreason - an optional IDpublic FutureData<DataSiftResult> delete(PreparedHistoricsQuery query)
public FutureData<DataSiftResult> delete(String id)
id - an historic IDpublic FutureData<DataSiftResult> update(String id, String name)
id - the ID of the historics to updatename - the new name for the historicspublic FutureData<HistoricsStatus> status(org.joda.time.DateTime start, org.joda.time.DateTime end, String... sources)
start - the dat from which the archive should be checkedend - the up to which the archive should be checkedsources - an optional list of data sources that should be queried, e.g. [facebook,twitter,...]public FutureData<HistoricsQuery> get(String id)
public FutureData<HistoricsQuery> get(String id, boolean withEstimate)
id - the id of the historics to listwithEstimate - if true then an estimated completion time is include in the responsepublic FutureData<HistoricsQueryList> list()
public FutureData<HistoricsQueryList> list(int max, int page)
public FutureData<HistoricsQueryList> list(int page)
public FutureData<HistoricsQueryList> list(int max, int page, boolean withEstimate)
HistoricsQuery objectsmax - max number of objects to listpage - a page numberwithEstimate - if true, include an estimated completion timeHistoricsQueryspublic FutureData<PreparedHistoricsQuery> prepare(String hash, org.joda.time.DateTime start, org.joda.time.DateTime end, String name)
hash - The hash of the CSDL for your historics query.
Example values: 2459b03a13577579bca76471778a5c3dstart - Unix timestamp for the start time.
Example values: 1325548800end - nix timestamp for the end time. Must be at least 24 in the past.
Example values: 1325548800name - The name you assign to your historics query.
Example values: Footballpublic FutureData<PreparedHistoricsQuery> prepare(String hash, long start, long end, String name, String... sources)
hash - The hash of the CSDL for your historics query.
Example values: 2459b03a13577579bca76471778a5c3dstart - Unix timestamp for the start time.
Example values: 1325548800end - nix timestamp for the end time. Must be at least 24 in the past.
Example values: 1325548800name - The name you assign to your historics query.
Example values: Footballsources - Comma-separated list of data sources to include. Currently,
the only source you can use is twitter. In the future, you will be able to choose any source
listed as a valid value that you would use in the interaction.type target.
Example values: twitterpublic FutureData<PreparedHistoricsQuery> prepare(String hash, long start, long end, String name, int sample, String... sources)
Copyright © 2015. All Rights Reserved.