public class DataSiftAccount extends DataSiftApiClient
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
IDENTITY |
java.lang.String |
USAGE |
config| Constructor and Description |
|---|
DataSiftAccount(DataSiftConfig config) |
| Modifier and Type | Method and Description |
|---|---|
FutureData<Identity> |
create(java.lang.String label) |
FutureData<Identity> |
create(java.lang.String label,
boolean active) |
FutureData<Identity> |
create(java.lang.String label,
boolean active,
boolean master)
Create a new Identity
|
FutureData<Limit> |
createLimit(java.lang.String identity,
java.lang.String service,
java.lang.Long allowance)
Create a Limit
|
FutureData<Token> |
createToken(java.lang.String identity,
java.lang.String service,
java.lang.String token)
Create a new token
|
FutureData<DataSiftResult> |
delete(java.lang.String id)
Delete an Identity using it's ID
|
FutureData<DataSiftResult> |
deleteLimit(java.lang.String identity,
java.lang.String service)
Delete a limit
|
FutureData<DataSiftResult> |
deleteToken(java.lang.String identity,
java.lang.String service)
Delete a service token
|
FutureData<Identity> |
get(java.lang.String id)
Fetch an Identity using it's ID
|
FutureData<Limit> |
getLimit(java.lang.String identity,
java.lang.String service)
Fetch a Limit
|
FutureData<Token> |
getToken(java.lang.String identity,
java.lang.String service)
Fetch a token using it's service ID and it's Identity's ID
|
FutureData<UsageResult> |
getUsage(java.lang.String period,
int start,
int end)
Get the usage for the current account.
|
FutureData<IdentityList> |
list() |
FutureData<IdentityList> |
list(int page) |
FutureData<IdentityList> |
list(int page,
int perPage) |
FutureData<IdentityList> |
list(java.lang.String label) |
FutureData<IdentityList> |
list(java.lang.String label,
int page) |
FutureData<IdentityList> |
list(java.lang.String label,
int page,
int perPage)
List identities with a given label and page details
|
FutureData<LimitList> |
listLimits(java.lang.String service) |
FutureData<LimitList> |
listLimits(java.lang.String service,
int page) |
FutureData<LimitList> |
listLimits(java.lang.String service,
int page,
int perPage)
List limits for the given service
|
FutureData<TokenList> |
listTokens(java.lang.String identity) |
FutureData<TokenList> |
listTokens(java.lang.String identity,
int page) |
FutureData<TokenList> |
listTokens(java.lang.String identity,
int page,
int perPage)
List tokens associated with an identity
|
FutureData<Identity> |
update(java.lang.String id,
java.lang.String label,
java.lang.Boolean active,
java.lang.Boolean master)
Update an existing identity with values
|
FutureData<Limit> |
updateLimit(java.lang.String identity,
java.lang.String service,
java.lang.Long allowance)
Update a token
|
FutureData<Token> |
updateToken(java.lang.String identity,
java.lang.String service,
java.lang.String token)
Update a token
|
failNotify, newParams, newRequestCallback, performRequest, unwrapFuturepublic final java.lang.String IDENTITY
public final java.lang.String USAGE
public DataSiftAccount(DataSiftConfig config)
public FutureData<Identity> create(java.lang.String label)
public FutureData<Identity> create(java.lang.String label, boolean active)
public FutureData<Identity> create(java.lang.String label, boolean active, boolean master)
label - text label to tag the identity withactive - whether the identity is activemaster - if the identity is a master identitypublic FutureData<Identity> update(java.lang.String id, java.lang.String label, java.lang.Boolean active, java.lang.Boolean master)
id - target to updatelabel - new label (may be null otherwise)active - new activity (may be null otherwise)master - new master (may be null otherwise)public FutureData<IdentityList> list()
public FutureData<IdentityList> list(java.lang.String label)
public FutureData<IdentityList> list(int page)
public FutureData<IdentityList> list(java.lang.String label, int page)
public FutureData<IdentityList> list(int page, int perPage)
public FutureData<IdentityList> list(java.lang.String label, int page, int perPage)
label - which label you'd like to list (can be null)page - page number (can be 0)perPage - items per page (can be 0)public FutureData<Identity> get(java.lang.String id)
id - the ID of the identity to fetchpublic FutureData<DataSiftResult> delete(java.lang.String id)
id - the ID of the identity to deletepublic FutureData<TokenList> listTokens(java.lang.String identity)
public FutureData<TokenList> listTokens(java.lang.String identity, int page)
public FutureData<TokenList> listTokens(java.lang.String identity, int page, int perPage)
identity - which identity you want to list the tokens ofpage - page number (can be 0)perPage - items per page (can be 0)public FutureData<Token> getToken(java.lang.String identity, java.lang.String service)
identity - the ID of the identity to queryservice - the service of the token to fetchpublic FutureData<Token> createToken(java.lang.String identity, java.lang.String service, java.lang.String token)
identity - identity to store this token underservice - service name to give this tokentoken - tokenpublic FutureData<DataSiftResult> deleteToken(java.lang.String identity, java.lang.String service)
identity - identity to delete the token fromservice - service to delete the token frompublic FutureData<Token> updateToken(java.lang.String identity, java.lang.String service, java.lang.String token)
identity - identity to update a token insideservice - service to update the token fortoken - new token valuepublic FutureData<Limit> getLimit(java.lang.String identity, java.lang.String service)
identity - the ID of the identityservice - the name of the servicepublic FutureData<Limit> createLimit(java.lang.String identity, java.lang.String service, java.lang.Long allowance)
identity - ID of the identity to store the limit inservice - service to set the limit forallowance - allowance to store in the limitpublic FutureData<LimitList> listLimits(java.lang.String service)
public FutureData<LimitList> listLimits(java.lang.String service, int page)
public FutureData<LimitList> listLimits(java.lang.String service, int page, int perPage)
service - which service you want to list the limits ofpage - page number (can be 0)perPage - items per page (can be 0)public FutureData<DataSiftResult> deleteLimit(java.lang.String identity, java.lang.String service)
identity - identity to delete the limit fromservice - service to delete the limit frompublic FutureData<Limit> updateLimit(java.lang.String identity, java.lang.String service, java.lang.Long allowance)
identity - identity to update a token insideservice - service to update the token forallowance - new limit valuepublic FutureData<UsageResult> getUsage(java.lang.String period, int start, int end)
period - the frequency at which to report usage data within the query periodstart - POSIX timestamp representing the time from which to report usageend - POSIX timestamp representing the latest time at which to report usageCopyright © 2017. All Rights Reserved.