BLVT
Installation
- Maven
- Gradle
pom.xml
<dependency>
<groupId>{{groupId}}</groupId>
<artifactId>{{artifactId}}</artifactId>
<version>{{version}}</version>
</dependency>
build.gradle
implementation '{{groupId}}:{{artifactId}}:{{version}}'
Client instantiation
BLVTClient client = new BLVTClient(key, secret);
Features
Get token info
- All tokens
- One token
- Sync
- Async
try{
List<Token> res = client.getTokenInfo().sync();
}catch(ApiException e){
//...
}
client.getTokenInfo().async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
- Sync
- Async
try{
List<Token> res = client.getTokenInfo(new TokenInfoParams(tokenName)).sync();
}catch(ApiException e){
//...
}
client.getTokenInfo(new TokenInfoParams(tokenName)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get subscriptions
- All tokens
- Specific token
- Framed results
- Sync
- Async
try{
SubscriptionResponse res = client.getSubscriptions().sync();
}catch(ApiException e){
//...
}
client.getSubscriptions().async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
- Sync
- Async
try{
SubscriptionResponse res = client.getSubscriptions(new TransactionRecordParams(tokenName)).sync();
}catch(ApiException e){
//...
}
client.getSubscriptions(new TransactionRecordParams(tokenName)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
- Sync
- Async
try{
SubscriptionResponse res = client.getSubscriptions(new TransactionRecordParams(tokenName), new TimeFrame(startTime,endTime,limit)).sync();
}catch(ApiException e){
//...
}
client.getSubscriptions(new TransactionRecordParams(tokenName), new TimeFrame(startTime,endTime,limit)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get redemptions
- All tokens
- Specific token
- Framed results
- Sync
- Async
try{
List<Redemption> res = client.getRedemptions().sync();
}catch(ApiException e){
//...
}
client.getRedemptions().async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
- Sync
- Async
try{
List<Redemption> res = client.getRedemptions(new TransactionRecordParams(tokenName, subscriptionId)).sync();
}catch(ApiException e){
//...
}
client.getRedemptions(new TransactionRecordParams(tokenName, subscriptionId)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
- Sync
- Async
try{
List<Redemption> res = client.getRedemptions(new TransactionRecordParams(tokenName, subscriptionId,new TimeFrame(startTime, endTime, limit))).sync();
}catch(ApiException e){
//...
}
client.getRedemptions(new TransactionRecordParams(tokenName, subscriptionId,new TimeFrame(startTime, endTime, limit))).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get user limit info
- All tokens
- One token
- Sync
- Async
try{
List<LimitInfo> res = client.getLimitInfo().sync();
}catch(ApiException e){
//...
}
client.getLimitInfo().async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
- Sync
- Async
try{
List<LimitInfo> res = client.getLimitInfo(new LimitInfoParams(tokenName)).sync();
}catch(ApiException e){
//...
}
client.getLimitInfo(new LimitInfoParams(tokenName)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Redeem
- Sync
- Async
try{
RedemptionResponse res = client.redeem(new RedemptionParams(tokenName, amount)).sync();
}catch(ApiException e){
//...
}
client.redeem(new RedemptionParams(tokenName, amount)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Subscribe
- Sync
- Async
try{
SubscriptionResponse res = client.subscribe(new SubscriptionParams(tokenName, cost)).sync();
}catch(ApiException e){
//...
}
client.subscribe(new SubscriptionParams(tokenName, cost)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});