Package com.fitbit.api

Examples of com.fitbit.api.FitbitAPIException


        Response res = httpGet(url, true);
        throwExceptionIfError(res);
        try {
            return WeightLog.constructWeightLogList(res.asJSONObject().getJSONArray("weight"));
        } catch (JSONException e) {
            throw new FitbitAPIException("Error retrieving weight: " + e, e);
        }
    }
View Full Code Here


        Response res = httpGet(url, true);
        throwExceptionIfError(res);
        try {
            return WeightLog.constructWeightLogList(res.asJSONObject().getJSONArray("weight"));
        } catch (JSONException e) {
            throw new FitbitAPIException("Error retrieving weight: " + e, e);
        }
    }
View Full Code Here

        Response res = httpGet(url, true);
        throwExceptionIfError(res);
        try {
            return WeightLog.constructWeightLogList(res.asJSONObject().getJSONArray("weight"));
        } catch (JSONException e) {
            throw new FitbitAPIException("Error retrieving weight: " + e, e);
        }
    }
View Full Code Here

        String url = APIUtil.contextualizeUrl(getApiBaseUrl(), getApiVersion(),
                "/user/-/body/log/weight/" + logId, APIFormat.JSON);
        try {
            httpDelete(url, true);
        } catch (Exception e) {
            throw new FitbitAPIException("Error deleting weight: " + e, e);
        }
    }
View Full Code Here

        try {
            Response res = httpPost(url, params.toArray(new PostParameter[params.size()]), true);
            return new FatLog(res.asJSONObject().getJSONObject("fatLog"));
        } catch (FitbitAPIException e) {
            throw new FitbitAPIException("Error logging fat: " + e, e);
        } catch (JSONException e) {
            throw new FitbitAPIException("Error logging fat: " + e, e);
        }
    }
View Full Code Here

        Response res = httpGet(url, true);
        throwExceptionIfError(res);
        try {
            return FatLog.constructFatLogList(res.asJSONObject().getJSONArray("fat"));
        } catch (JSONException e) {
            throw new FitbitAPIException("Error retrieving fat: " + e, e);
        }
    }
View Full Code Here

        Response res = httpGet(url, true);
        throwExceptionIfError(res);
        try {
            return FatLog.constructFatLogList(res.asJSONObject().getJSONArray("fat"));
        } catch (JSONException e) {
            throw new FitbitAPIException("Error retrieving fat: " + e, e);
        }
    }
View Full Code Here

        Response res = httpGet(url, true);
        throwExceptionIfError(res);
        try {
            return FatLog.constructFatLogList(res.asJSONObject().getJSONArray("fat"));
        } catch (JSONException e) {
            throw new FitbitAPIException("Error retrieving fat: " + e, e);
        }
    }
View Full Code Here

        Response res = httpGet(url, true);
        throwExceptionIfError(res);
        try {
            return FatLog.constructFatLogList(res.asJSONObject().getJSONArray("fat"));
        } catch (JSONException e) {
            throw new FitbitAPIException("Error retrieving fat: " + e, e);
        }
    }
View Full Code Here

        String url = APIUtil.contextualizeUrl(getApiBaseUrl(), getApiVersion(),
                "/user/-/body/log/fat/" + logId, APIFormat.JSON);
        try {
            httpDelete(url, true);
        } catch (Exception e) {
            throw new FitbitAPIException("Error deleting fat: " + e, e);
        }
    }
View Full Code Here

TOP

Related Classes of com.fitbit.api.FitbitAPIException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.