JNikeAPI
A Java client for the Nike+ API.
Install
case of using this code in Eclipse:
- download this code
- start the Eclipse and import this code ("file"->"import"->select this folder)
case of using jar file:
- download jar files.
- JNikeAPI.jar
- JSON.jar. (This jar file made by this site)
- setting class path
Preparation
You have to get Access_Token from Nike developer site
https://developer.nike.com/
- login to the site of nike+ developer
- go to "API CONSOLE"
- select "Get My Access Token"
- wirte nike+ account information (email & password) and push the "Go" button
- you can get your Access_Token.
How to use
First step: The JNikeAPIClient needs instantiate with your access_token.
JNikeAPIClient nikeApi = new JNikeAPIClient("your access_token");
Scond step: You can use the Nike APIs. The Nike APIs has 4 kind of methods.
- Aggregate Sport Data
- List Activities
- Activity Detail
- GPS Data
If you use this APIs, you can receive data type of JSONObject.
-
Aggregate Sport Data
AggregateSportData values = nikeApi.getAggregateSportData();
-
List Activities.
ListActivities value = nikeApi.getListActivities();
-
Activity Detail
DetailActivity value = nikeApi.getDetailActivity("activityID");
-
GPS Data
GPSData value = nikeApi.getGPSData("activityID");