Permalink
Browse files

SITE-7664 - Sync API changes for iPhone app

  • Loading branch information...
1 parent d33da5d commit 2b31a88b51cc7ab698b6eb9e73996a0a212d79e8 @kkazakevich kkazakevich committed Aug 25, 2011
@@ -4,7 +4,7 @@
<parent>
<groupId>com.fitbit</groupId>
<artifactId>fitbit-parent</artifactId>
- <version>1.0.10</version>
+ <version>1.0.11</version>
</parent>
<artifactId>fitbit-example-client</artifactId>
<packaging>war</packaging>
View
@@ -4,7 +4,7 @@
<parent>
<groupId>com.fitbit</groupId>
<artifactId>fitbit-parent</artifactId>
- <version>1.0.10</version>
+ <version>1.0.11</version>
</parent>
<artifactId>fitbit4j</artifactId>
<packaging>jar</packaging>
@@ -47,35 +47,35 @@ public NutritionalValuesEntry() {
public NutritionalValuesEntry(JSONObject json) throws JSONException {
this.calories = json.getInt("calories");
this.caloriesFromFat = json.optInt("caloriesFromFat");
- this.totalFat = (float) json.optDouble("totalFat");
- this.saturatedFat = (float) json.optDouble("saturatedFat");
- this.transFat = (float) json.optDouble("transFat");
- this.cholesterol = (float) json.optDouble("cholesterol");
- this.sodium = (float) json.optDouble("sodium");
- this.totalCarbohydrate = (float) json.optDouble("totalCarbohydrate");
- this.dietaryFiber = (float) json.optDouble("dietaryFiber");
- this.sugars = (float) json.optDouble("sugars");
- this.protein = (float) json.optDouble("protein");
- this.vitaminA = (float) json.optDouble("vitaminA");
- this.vitaminC = (float) json.optDouble("vitaminC");
- this.iron = (float) json.optDouble("iron");
- this.calcium = (float) json.optDouble("calcium");
- this.potassium = (float) json.optDouble("potassium");
- this.thiamin = (float) json.optDouble("thiamin");
- this.riboflavin = (float) json.optDouble("riboflavin");
- this.niacin = (float) json.optDouble("niacin");
- this.vitaminD = (float) json.optDouble("vitaminD");
- this.vitaminE = (float) json.optDouble("vitaminE");
- this.vitaminB6 = (float) json.optDouble("vitaminB6");
- this.folicAcid = (float) json.optDouble("folicAcid");
- this.vitaminB12 = (float) json.optDouble("vitaminB12");
- this.phosphorus = (float) json.optDouble("phosphorus");
- this.iodine = (float) json.optDouble("iodine");
- this.magnesium = (float) json.optDouble("magnesium");
- this.zinc = (float) json.optDouble("zinc");
- this.copper = (float) json.optDouble("copper");
- this.biotin = (float) json.optDouble("biotin");
- this.pantothenicAcid = (float) json.optDouble("pantothenicAcid");
+ this.totalFat = (float) json.optDouble("totalFat", 0);
+ this.saturatedFat = (float) json.optDouble("saturatedFat", 0);
+ this.transFat = (float) json.optDouble("transFat", 0);
+ this.cholesterol = (float) json.optDouble("cholesterol", 0);
+ this.sodium = (float) json.optDouble("sodium", 0);
+ this.totalCarbohydrate = (float) json.optDouble("totalCarbohydrate", 0);
+ this.dietaryFiber = (float) json.optDouble("dietaryFiber", 0);
+ this.sugars = (float) json.optDouble("sugars", 0);
+ this.protein = (float) json.optDouble("protein", 0);
+ this.vitaminA = (float) json.optDouble("vitaminA", 0);
+ this.vitaminC = (float) json.optDouble("vitaminC", 0);
+ this.iron = (float) json.optDouble("iron", 0);
+ this.calcium = (float) json.optDouble("calcium", 0);
+ this.potassium = (float) json.optDouble("potassium", 0);
+ this.thiamin = (float) json.optDouble("thiamin", 0);
+ this.riboflavin = (float) json.optDouble("riboflavin", 0);
+ this.niacin = (float) json.optDouble("niacin", 0);
+ this.vitaminD = (float) json.optDouble("vitaminD", 0);
+ this.vitaminE = (float) json.optDouble("vitaminE", 0);
+ this.vitaminB6 = (float) json.optDouble("vitaminB6", 0);
+ this.folicAcid = (float) json.optDouble("folicAcid", 0);
+ this.vitaminB12 = (float) json.optDouble("vitaminB12", 0);
+ this.phosphorus = (float) json.optDouble("phosphorus", 0);
+ this.iodine = (float) json.optDouble("iodine", 0);
+ this.magnesium = (float) json.optDouble("magnesium", 0);
+ this.zinc = (float) json.optDouble("zinc", 0);
+ this.copper = (float) json.optDouble("copper", 0);
+ this.biotin = (float) json.optDouble("biotin", 0);
+ this.pantothenicAcid = (float) json.optDouble("pantothenicAcid", 0);
}
public int getCalories() {
View
@@ -4,7 +4,7 @@
<groupId>com.fitbit</groupId>
<artifactId>fitbit-parent</artifactId>
<packaging>pom</packaging>
- <version>1.0.10</version>
+ <version>1.0.11</version>
<name>Fitbit</name>
<url>http://fitbit.com</url>

0 comments on commit 2b31a88

Please sign in to comment.