Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Java Library for the Bananatag API

Usage

Get All Opened Tags in Date-Range

import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.json.simple.JSONObject;

BtagAPI btag = new BtagAPI("Your AuthID", "Your Access Key");
HashMap<String, Object> params = new HashMap<String, Object>();
JSONObject result = new JSONObject();

// build parameters to map
params.put("rtn", "json");
params.put("start", "2015-01-01");
params.put("end", "2015-01-30");
params.put("isOpened", true);

do {
	result = btag.request("tags", params);
	System.out.println(result);
	TimeUnit.SECONDS.sleep(1);
} while (!result.isEmpty());

Get Aggregate Stats Over Date-Range

import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.json.simple.JSONObject;

BtagAPI btag = new BtagAPI("Your AuthID", "Your Access Key");
HashMap<String, Object> params = new HashMap<String, Object>();
JSONObject result = new JSONObject();

// build parameters to map
params.put("rtn", "json");
params.put("start", "2015-01-01");
params.put("end", "2015-01-30");
params.put("aggregateData", true);

do {
	result = btag.request("stats", params);
	System.out.println(result);
	TimeUnit.SECONDS.sleep(1);
} while (!result.isEmpty());

License

Licensed under the MIT License.

About

The Bananatag API Java Library is used in conjunction with Bananatag's REST API. The Bananatag REST API allows users access to all data associated with their account and sub-accounts

Resources

License

Releases

No releases published

Packages

No packages published