Examples of Glucose


Examples of com.fitbit.api.common.model.glucose.Glucose

        setAccessToken(localUser);
        String url = APIUtil.contextualizeUrl(getApiBaseUrl(), getApiVersion(), "/user/-/glucose", APIFormat.JSON);

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

Examples of com.fitbit.api.common.model.glucose.Glucose

        String url = APIUtil.contextualizeUrl(getApiBaseUrl(), getApiVersion(), "/user/" + fitbitUser.getId() + "/glucose/date/" + DateTimeFormat.forPattern("yyyy-MM-dd").print(date), APIFormat.JSON);

        Response res = httpGet(url, true);
        throwExceptionIfError(res);
        try {
            return new Glucose(res.asJSONObject());
        } catch (JSONException e) {
            throw new FitbitAPIException("Error retrieving blood pressure: " + e, e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.