Android Open Source - DashBit Fitbit Api






From Project

Back to project page DashBit.

License

The source code is released under:

Apache License

If you think the Android project DashBit listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.jasonphanley.dashbit.api;
//  w  ww .  j  a  v a 2  s  . com
import org.scribe.builder.api.DefaultApi10a;
import org.scribe.model.Token;

public class FitbitApi extends DefaultApi10a {
    
    private static final String REQUEST_TOKEN_URL = "http://api.fitbit.com/oauth/request_token";
    
    private static final String ACCESS_TOKEN_URL = "http://api.fitbit.com/oauth/access_token";
    
    private static final String AUTHORIZE_URL = "https://www.fitbit.com/oauth/authenticate?oauth_token=%s";
    
    @Override
    public String getAccessTokenEndpoint() {
        return ACCESS_TOKEN_URL;
    }
    
    @Override
    public String getRequestTokenEndpoint() {
        return REQUEST_TOKEN_URL;
    }
    
    @Override
    public String getAuthorizationUrl(Token requestToken) {
        return String.format(AUTHORIZE_URL, requestToken.getToken());
    }
    
}




Java Source Code List

com.jasonphanley.dashbit.api.FitbitApi.java
com.jasonphanley.dashbit.api.FitbitClient.java
com.jasonphanley.dashbit.api.FitbitUtil.java
com.jasonphanley.dashbit.app.App.java
com.jasonphanley.dashbit.app.AuthActivity.java
com.jasonphanley.dashbit.app.FitbitExtension.java
com.jasonphanley.dashbit.app.PrefsActivity.java
com.jasonphanley.dashbit.app.PrefsFragment.java
com.jasonphanley.dashbit.model.Activities.java
com.jasonphanley.dashbit.model.Units.java