validic 0.3.3 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.rspec +0 -1
- data/Gemfile +12 -1
- data/Gemfile.lock +32 -62
- data/README.md +442 -28
- data/lib/validic.rb +3 -20
- data/lib/validic/app.rb +11 -0
- data/lib/validic/biometrics.rb +9 -0
- data/lib/validic/client.rb +35 -77
- data/lib/validic/diabetes.rb +4 -60
- data/lib/validic/error.rb +33 -0
- data/lib/validic/extra.rb +10 -0
- data/lib/validic/fitness.rb +4 -57
- data/lib/validic/nutrition.rb +5 -61
- data/lib/validic/organization.rb +6 -13
- data/lib/validic/profile.rb +4 -39
- data/lib/validic/response.rb +15 -0
- data/lib/validic/rest/apps.rb +21 -0
- data/lib/validic/rest/biometrics.rb +39 -0
- data/lib/validic/rest/diabetes.rb +39 -0
- data/lib/validic/rest/fitness.rb +40 -0
- data/lib/validic/rest/nutrition.rb +40 -0
- data/lib/validic/rest/organizations.rb +12 -0
- data/lib/validic/rest/profile.rb +18 -0
- data/lib/validic/rest/request.rb +95 -0
- data/lib/validic/rest/routine.rb +40 -0
- data/lib/validic/rest/sleep.rb +41 -0
- data/lib/validic/rest/tobacco_cessation.rb +40 -0
- data/lib/validic/rest/users.rb +55 -0
- data/lib/validic/rest/utils.rb +28 -0
- data/lib/validic/rest/weight.rb +43 -0
- data/lib/validic/routine.rb +4 -55
- data/lib/validic/sleep.rb +4 -59
- data/lib/validic/summary.rb +18 -0
- data/lib/validic/tobacco_cessation.rb +4 -53
- data/lib/validic/user.rb +4 -99
- data/lib/validic/utils.rb +13 -0
- data/lib/validic/version.rb +1 -1
- data/lib/validic/weight.rb +4 -57
- data/spec/fixtures/apps.json +32 -0
- data/spec/fixtures/biometrics-expanded.json +56 -0
- data/spec/fixtures/biometrics-extras.json +35 -0
- data/spec/fixtures/biometrics_record.json +36 -0
- data/spec/fixtures/biometrics_records.json +54 -0
- data/spec/fixtures/bulk_biometrics_records.json +55 -0
- data/spec/fixtures/bulk_diabetes_records.json +37 -0
- data/spec/fixtures/bulk_fitnesses.json +35 -0
- data/spec/fixtures/bulk_nutritions.json +37 -0
- data/spec/fixtures/bulk_sleeps.json +35 -0
- data/spec/fixtures/bulk_tobacco_cessations.json +33 -0
- data/spec/fixtures/conflict.json +5 -0
- data/spec/fixtures/diabetes-expanded.json +38 -0
- data/spec/fixtures/diabetes-extras.json +17 -0
- data/spec/fixtures/diabetes_record.json +18 -0
- data/spec/fixtures/diabetes_records.json +36 -0
- data/spec/fixtures/fitness-expanded.json +1521 -0
- data/spec/fixtures/fitness-extras.json +15 -0
- data/spec/fixtures/fitness.json +16 -0
- data/spec/fixtures/fitnesses.json +34 -0
- data/spec/fixtures/forbidden.json +5 -0
- data/spec/fixtures/internal_server.json +4 -0
- data/spec/fixtures/me.json +5 -0
- data/spec/fixtures/not_found.json +5 -0
- data/spec/fixtures/nutrition-expanded.json +123 -0
- data/spec/fixtures/nutrition-extras.json +13 -0
- data/spec/fixtures/nutrition.json +18 -0
- data/spec/fixtures/nutritions-expanded.json +123 -0
- data/spec/fixtures/nutritions.json +36 -0
- data/spec/fixtures/organizations.json +27 -0
- data/spec/fixtures/profile.json +13 -0
- data/spec/fixtures/refresh_token.json +7 -0
- data/spec/fixtures/routine-expanded.json +749 -0
- data/spec/fixtures/routine-extras.json +14 -0
- data/spec/fixtures/routine.json +17 -0
- data/spec/fixtures/routines.json +47 -0
- data/spec/fixtures/sleep-expanded.json +51 -0
- data/spec/fixtures/sleep-extras.json +15 -0
- data/spec/fixtures/sleep.json +16 -0
- data/spec/fixtures/sleeps.json +48 -0
- data/spec/fixtures/synced_apps.json +43 -0
- data/spec/fixtures/tobacco_cessation-expanded.json +33 -0
- data/spec/fixtures/tobacco_cessation-extras.json +12 -0
- data/spec/fixtures/tobacco_cessation.json +14 -0
- data/spec/fixtures/tobacco_cessations.json +32 -0
- data/spec/fixtures/unauthorized.json +4 -0
- data/spec/fixtures/unprocessable_entity.json +5 -0
- data/spec/fixtures/updated_user.json +9 -0
- data/spec/fixtures/user.json +8 -0
- data/spec/fixtures/user_with_profile.json +14 -0
- data/spec/fixtures/users.json +23 -0
- data/spec/fixtures/weight-expanded.json +66 -0
- data/spec/fixtures/weight-extras.json +15 -0
- data/spec/fixtures/weight.json +18 -0
- data/spec/fixtures/weights.json +48 -0
- data/spec/spec_helper.rb +47 -33
- data/spec/validic/client_spec.rb +5 -38
- data/spec/validic/error_spec.rb +73 -0
- data/spec/validic/expanded_spec.rb +87 -0
- data/spec/validic/rest/apps_spec.rb +41 -0
- data/spec/validic/rest/biometrics_spec.rb +131 -0
- data/spec/validic/rest/diabetes_spec.rb +131 -0
- data/spec/validic/rest/fitness_spec.rb +131 -0
- data/spec/validic/rest/nutrition_spec.rb +144 -0
- data/spec/validic/rest/organizations_spec.rb +24 -0
- data/spec/validic/rest/profile_spec.rb +44 -0
- data/spec/validic/rest/routine_spec.rb +129 -0
- data/spec/validic/rest/sleep_spec.rb +148 -0
- data/spec/validic/rest/tobacco_cessation_spec.rb +131 -0
- data/spec/validic/rest/users_spec.rb +170 -0
- data/spec/validic/rest/weight_spec.rb +150 -0
- data/spec/validic/summary_spec.rb +3 -0
- data/spec/validic_spec.rb +19 -31
- data/validic.gemspec +0 -13
- metadata +174 -194
- data/lib/validic/biometric.rb +0 -97
- data/lib/validic/request.rb +0 -46
- data/lib/validic/third_party_app.rb +0 -32
- data/spec/validic/biometrics_spec.rb +0 -43
- data/spec/validic/diabetes_spec.rb +0 -89
- data/spec/validic/fitness_spec.rb +0 -85
- data/spec/validic/nutrition_spec.rb +0 -91
- data/spec/validic/organization_spec.rb +0 -26
- data/spec/validic/profile_spec.rb +0 -19
- data/spec/validic/routine_spec.rb +0 -82
- data/spec/validic/sleep_spec.rb +0 -86
- data/spec/validic/third_party_app_spec.rb +0 -32
- data/spec/validic/tobacco_cessation_spec.rb +0 -81
- data/spec/validic/user_spec.rb +0 -81
- data/spec/validic/weight_spec.rb +0 -88
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'validic/extra'
|
2
|
+
module Validic
|
3
|
+
module Utils
|
4
|
+
def attributes_builder(attrs, obj)
|
5
|
+
attrs.each do |k, v|
|
6
|
+
v = Validic::Extra.new(v) if k == "extras" && !v.nil?
|
7
|
+
v = Validic::Profile.new(v) if k == "profile" && !v.nil?
|
8
|
+
instance_variable_set("@#{k}", v)
|
9
|
+
obj.class.send(:attr_reader, k)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/validic/version.rb
CHANGED
data/lib/validic/weight.rb
CHANGED
@@ -1,61 +1,8 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
1
|
module Validic
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
# Default data fetched is from yesterday
|
9
|
-
#
|
10
|
-
# @params :organization_id - for organization specific
|
11
|
-
# @params :user_id - for user specific
|
12
|
-
#
|
13
|
-
# @params :start_date - optional for date range beyond yesterday
|
14
|
-
# @params :end_date - optional
|
15
|
-
# @params :access_token - override for default access_token
|
16
|
-
# @params :source - optional - data per source (e.g 'fitbit')
|
17
|
-
# @params :expanded - optional - will show the raw data
|
18
|
-
#
|
19
|
-
# @return [Hashie::Mash] with list of Weight
|
20
|
-
def get_weight(params={})
|
21
|
-
params = extract_params(params)
|
22
|
-
get_endpoint(:weight, params)
|
2
|
+
class Weight
|
3
|
+
include Validic::Utils
|
4
|
+
def initialize(attrs = {})
|
5
|
+
attributes_builder(attrs, self)
|
23
6
|
end
|
24
|
-
|
25
|
-
alias :get_weights :get_weight
|
26
|
-
|
27
|
-
##
|
28
|
-
# Create Weight base on `access_token` and `authentication_token`
|
29
|
-
#
|
30
|
-
# @params :access_token - *required if not specified on your initializer / organization access_token
|
31
|
-
# @params :authentication_token - *required / authentication_token of a specific user
|
32
|
-
#
|
33
|
-
# @params :timestamp
|
34
|
-
# @params :weight
|
35
|
-
# @params :bmi
|
36
|
-
# @params :fat_percent
|
37
|
-
# @params :mass_weight
|
38
|
-
# @params :free_mass
|
39
|
-
# @params :source
|
40
|
-
#
|
41
|
-
# @return success
|
42
|
-
def create_weight(options={})
|
43
|
-
options = {
|
44
|
-
access_token: options[:access_token],
|
45
|
-
weight: {
|
46
|
-
timestamp: options[:timestamp],
|
47
|
-
weight: options[:weight],
|
48
|
-
bmi: options[:bmi],
|
49
|
-
fat_percent: options[:fat_percent],
|
50
|
-
mass_weight: options[:mass_weight],
|
51
|
-
free_mass: options[:free_mass],
|
52
|
-
source: options[:source]
|
53
|
-
}
|
54
|
-
}
|
55
|
-
|
56
|
-
response = post("/#{Validic.api_version}/weight.json", options)
|
57
|
-
response if response
|
58
|
-
end
|
59
|
-
|
60
7
|
end
|
61
8
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{"summary":
|
2
|
+
{"status":200,
|
3
|
+
"message":"Ok",
|
4
|
+
"results":1,
|
5
|
+
"start_date":"2015-01-13T00:00:00+00:00",
|
6
|
+
"end_date":"2015-01-15T23:59:59+00:00",
|
7
|
+
"offset":0,
|
8
|
+
"limit":null,
|
9
|
+
"previous":null,
|
10
|
+
"next":null,
|
11
|
+
"params":{"start_date":null,
|
12
|
+
"end_date":null,
|
13
|
+
"offset":0,
|
14
|
+
"limit":0
|
15
|
+
}
|
16
|
+
},
|
17
|
+
"apps": [
|
18
|
+
{"name":"Healthy Yet",
|
19
|
+
"sync_url":"https://app.validic.com/organizations/549826e48ee42168f1000045/auth/healthy_yet?user_token=Z7CL7JtMgwmtNXcoza6j&format_redirect=json",
|
20
|
+
"unsync_url":"",
|
21
|
+
"refresh_url":"",
|
22
|
+
"download_link":"",
|
23
|
+
"excerpt":"Healthy Yet app",
|
24
|
+
"extra_excerpt":"Healthy Yet app",
|
25
|
+
"subname":"healthy_yet",
|
26
|
+
"kind":null,
|
27
|
+
"logo_url":"https://s3.amazonaws.com/healthyyet/healthyyet-logo-blue.png",
|
28
|
+
"platform_types":null,
|
29
|
+
"synced":false,
|
30
|
+
"last_sync":null}
|
31
|
+
]
|
32
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
{
|
2
|
+
"summary": {
|
3
|
+
"status": 200,
|
4
|
+
"message": "Ok",
|
5
|
+
"results": 1,
|
6
|
+
"start_date": "2015-01-14T00:00:00+00:00",
|
7
|
+
"end_date": "2015-01-16T23:59:59+00:00",
|
8
|
+
"offset": 0,
|
9
|
+
"limit": 100,
|
10
|
+
"previous": null,
|
11
|
+
"next": null,
|
12
|
+
"params": {
|
13
|
+
"start_date": null,
|
14
|
+
"end_date": null,
|
15
|
+
"offset": 0,
|
16
|
+
"limit": 0
|
17
|
+
}
|
18
|
+
},
|
19
|
+
"biometrics": [
|
20
|
+
{
|
21
|
+
"_id": "54b670e07b361fb5c7000353",
|
22
|
+
"timestamp": "2015-01-14T13:22:55+00:00",
|
23
|
+
"utc_offset": "+00:00",
|
24
|
+
"blood_calcium": null,
|
25
|
+
"blood_chromium": null,
|
26
|
+
"blood_folic_acid": null,
|
27
|
+
"blood_magnesium": null,
|
28
|
+
"blood_potassium": null,
|
29
|
+
"blood_sodium": null,
|
30
|
+
"blood_vitamin_b12": null,
|
31
|
+
"blood_zinc": null,
|
32
|
+
"creatine_kinase": null,
|
33
|
+
"crp": null,
|
34
|
+
"diastolic": 58,
|
35
|
+
"ferritin": null,
|
36
|
+
"hdl": null,
|
37
|
+
"hscrp": null,
|
38
|
+
"il6": null,
|
39
|
+
"ldl": null,
|
40
|
+
"resting_heartrate": 88,
|
41
|
+
"systolic": 118,
|
42
|
+
"testosterone": null,
|
43
|
+
"total_cholesterol": null,
|
44
|
+
"tsh": null,
|
45
|
+
"uric_acid": null,
|
46
|
+
"vitamin_d": null,
|
47
|
+
"white_cell_count": null,
|
48
|
+
"spo2": null,
|
49
|
+
"temperature": null,
|
50
|
+
"source": "vitadock",
|
51
|
+
"source_name": "Vitadock",
|
52
|
+
"last_updated": "2015-01-14T13:36:32+00:00",
|
53
|
+
"user_id": "52ffcb4bf1f70eefba000004"
|
54
|
+
}
|
55
|
+
]
|
56
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
{
|
2
|
+
"biometrics": {
|
3
|
+
"timestamp": "2013-03-10T07:12:16+00:00",
|
4
|
+
"utc_offset": "+00:00",
|
5
|
+
"blood_calcium": 9.2,
|
6
|
+
"blood_chromium": 1.32,
|
7
|
+
"blood_folic_acid": 8.1,
|
8
|
+
"blood_magnesium": 1.89,
|
9
|
+
"blood_potassium": 3.9,
|
10
|
+
"blood_sodium": 137.8,
|
11
|
+
"blood_vitamin_b12": 612,
|
12
|
+
"blood_zinc": 93,
|
13
|
+
"creatine_kinase": 87,
|
14
|
+
"crp": 0,
|
15
|
+
"diastolic": 73,
|
16
|
+
"ferritin": 189,
|
17
|
+
"hdl": 44,
|
18
|
+
"hscrp": 0.3,
|
19
|
+
"il6": 6.4,
|
20
|
+
"ldl": 156,
|
21
|
+
"resting_heartrate": 74,
|
22
|
+
"systolic": 122,
|
23
|
+
"testosterone": 457,
|
24
|
+
"total_cholesterol": 208,
|
25
|
+
"tsh": 0.6,
|
26
|
+
"uric_acid": 4.2,
|
27
|
+
"vitamin_d": 54.8,
|
28
|
+
"white_cell_count": 7453,
|
29
|
+
"spo2": 96,
|
30
|
+
"temperature": 37,
|
31
|
+
"data_id": "12345",
|
32
|
+
"extras": {"stars": 3}
|
33
|
+
},
|
34
|
+
"access_token": "e7ba1f04e88f25d399a91c8cbcd72300e01309e96b7725e40b49cd1effaa5deb"
|
35
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"biometrics": {
|
3
|
+
"_id": "51552cdcfded0807c4000075",
|
4
|
+
"timestamp": "2013-03-10T07:12:16+00:00",
|
5
|
+
"utc_offset": "+00:00",
|
6
|
+
"blood_calcium": 9.2,
|
7
|
+
"blood_chromium": 1.32,
|
8
|
+
"blood_folic_acid": 8.1,
|
9
|
+
"blood_magnesium": 1.89,
|
10
|
+
"blood_potassium": 3.9,
|
11
|
+
"blood_sodium": 137.8,
|
12
|
+
"blood_vitamin_b12": 612,
|
13
|
+
"blood_zinc": 93,
|
14
|
+
"creatine_kinase": 87,
|
15
|
+
"crp": 0,
|
16
|
+
"diastolic": 73,
|
17
|
+
"ferritin": 189,
|
18
|
+
"hdl": 44,
|
19
|
+
"hscrp": 0.3,
|
20
|
+
"il6": 6.4,
|
21
|
+
"ldl": 156,
|
22
|
+
"resting_heartrate": 74,
|
23
|
+
"systolic": 122,
|
24
|
+
"testosterone": 457,
|
25
|
+
"total_cholesterol": 208,
|
26
|
+
"tsh": 0.6,
|
27
|
+
"uric_acid": 4.2,
|
28
|
+
"vitamin_d": 54.8,
|
29
|
+
"white_cell_count": 7453,
|
30
|
+
"spo2": 96,
|
31
|
+
"temperature": 37,
|
32
|
+
"source": "sample_app",
|
33
|
+
"source_name": "Sample App",
|
34
|
+
"last_updated": "2013-03-10T07:12:16+00:00"
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
{
|
2
|
+
"summary": {
|
3
|
+
"status": 200,
|
4
|
+
"message": "OK",
|
5
|
+
"results": 3,
|
6
|
+
"start_date": "2013-03-27T00:00:00+00:00",
|
7
|
+
"end_date": "2013-03-27T23:59:59+00:00",
|
8
|
+
"offset": 0,
|
9
|
+
"limit": 100,
|
10
|
+
"previous": null,
|
11
|
+
"next": null,
|
12
|
+
"params": {
|
13
|
+
"start_date": null,
|
14
|
+
"end_date": null,
|
15
|
+
"offset": null,
|
16
|
+
"limit": null
|
17
|
+
}
|
18
|
+
}, "biometrics": [
|
19
|
+
{
|
20
|
+
"_id": "51552cdcfded0807c4000075",
|
21
|
+
"timestamp": "2013-03-10T07:12:16+00:00",
|
22
|
+
"utc_offset": "+00:00",
|
23
|
+
"blood_calcium": 9.2,
|
24
|
+
"blood_chromium": 1.32,
|
25
|
+
"blood_folic_acid": 8.1,
|
26
|
+
"blood_magnesium": 1.89,
|
27
|
+
"blood_potassium": 3.9,
|
28
|
+
"blood_sodium": 137.8,
|
29
|
+
"blood_vitamin_b12": 612,
|
30
|
+
"blood_zinc": 93,
|
31
|
+
"creatine_kinase": 87,
|
32
|
+
"crp": 0,
|
33
|
+
"diastolic": 73,
|
34
|
+
"ferritin": 189,
|
35
|
+
"hdl": 44,
|
36
|
+
"hscrp": 0.3,
|
37
|
+
"il6": 6.4,
|
38
|
+
"ldl": 156,
|
39
|
+
"resting_heartrate": 74,
|
40
|
+
"systolic": 122,
|
41
|
+
"testosterone": 457,
|
42
|
+
"total_cholesterol": 208,
|
43
|
+
"tsh": 0.6,
|
44
|
+
"uric_acid": 4.2,
|
45
|
+
"vitamin_d": 54.8,
|
46
|
+
"white_cell_count": 7453,
|
47
|
+
"spo2": 96,
|
48
|
+
"temperature": 37,
|
49
|
+
"source": "sample_app",
|
50
|
+
"source_name": "Sample App",
|
51
|
+
"last_updated": "2013-03-10T07:12:16+00:00"
|
52
|
+
}
|
53
|
+
]
|
54
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
{
|
2
|
+
"summary": {
|
3
|
+
"status": 200,
|
4
|
+
"message": "OK",
|
5
|
+
"results": 3,
|
6
|
+
"start_date": "2013-03-27T00:00:00+00:00",
|
7
|
+
"end_date": "2013-03-27T23:59:59+00:00",
|
8
|
+
"offset": 0,
|
9
|
+
"limit": 100,
|
10
|
+
"previous": null,
|
11
|
+
"next": null,
|
12
|
+
"params": {
|
13
|
+
"start_date": null,
|
14
|
+
"end_date": null,
|
15
|
+
"offset": null,
|
16
|
+
"limit": null
|
17
|
+
}
|
18
|
+
}, "biometrics": [
|
19
|
+
{
|
20
|
+
"_id": "51552cdcfded0807c4000075",
|
21
|
+
"timestamp": "2013-03-10T07:12:16+00:00",
|
22
|
+
"utc_offset": "+00:00",
|
23
|
+
"blood_calcium": 9.2,
|
24
|
+
"blood_chromium": 1.32,
|
25
|
+
"blood_folic_acid": 8.1,
|
26
|
+
"blood_magnesium": 1.89,
|
27
|
+
"blood_potassium": 3.9,
|
28
|
+
"blood_sodium": 137.8,
|
29
|
+
"blood_vitamin_b12": 612,
|
30
|
+
"blood_zinc": 93,
|
31
|
+
"creatine_kinase": 87,
|
32
|
+
"crp": 0,
|
33
|
+
"diastolic": 73,
|
34
|
+
"ferritin": 189,
|
35
|
+
"hdl": 44,
|
36
|
+
"hscrp": 0.3,
|
37
|
+
"il6": 6.4,
|
38
|
+
"ldl": 156,
|
39
|
+
"resting_heartrate": 74,
|
40
|
+
"systolic": 122,
|
41
|
+
"testosterone": 457,
|
42
|
+
"total_cholesterol": 208,
|
43
|
+
"tsh": 0.6,
|
44
|
+
"uric_acid": 4.2,
|
45
|
+
"vitamin_d": 54.8,
|
46
|
+
"white_cell_count": 7453,
|
47
|
+
"spo2": 96,
|
48
|
+
"temperature": 37,
|
49
|
+
"source": "sample_app",
|
50
|
+
"source_name": "Sample App",
|
51
|
+
"last_updated": "2013-03-10T07:12:16+00:00",
|
52
|
+
"user_id": "51552cd7fded0807c4000017"
|
53
|
+
}
|
54
|
+
]
|
55
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"summary": {
|
3
|
+
"status": 200,
|
4
|
+
"message": "OK",
|
5
|
+
"results": 3,
|
6
|
+
"start_date": "2013-03-27T00:00:00+00:00",
|
7
|
+
"end_date": "2013-03-27T23:59:59+00:00",
|
8
|
+
"offset": 0,
|
9
|
+
"limit": 100,
|
10
|
+
"previous": null,
|
11
|
+
"next": null,
|
12
|
+
"params": {
|
13
|
+
"start_date": null,
|
14
|
+
"end_date": null,
|
15
|
+
"offset": null,
|
16
|
+
"limit": null
|
17
|
+
}
|
18
|
+
}, "diabetes": [
|
19
|
+
{
|
20
|
+
"_id": "51552cd6fded0807c4000007",
|
21
|
+
"timestamp": "2013-03-10T07:12:16+00:00",
|
22
|
+
"utc_offset": "+00:00",
|
23
|
+
"c_peptide": 0.6,
|
24
|
+
"fasting_plasma_glucose_test": 95,
|
25
|
+
"hba1c": 4.8,
|
26
|
+
"insulin": 460,
|
27
|
+
"oral_glucose_tolerance_test": 137,
|
28
|
+
"random_plasma_glucose_test": 256,
|
29
|
+
"triglyceride": 128,
|
30
|
+
"blood_glucose": 120,
|
31
|
+
"source": "sample_app",
|
32
|
+
"source_name": "Sample App",
|
33
|
+
"last_updated": "2013-03-10T07:12:16+00:00",
|
34
|
+
"user_id": "51552cd7fded0807c4000017"
|
35
|
+
}
|
36
|
+
]
|
37
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
{
|
2
|
+
"summary": {
|
3
|
+
"status": 200,
|
4
|
+
"message": "OK",
|
5
|
+
"results": 3,
|
6
|
+
"start_date": "2013-03-27T00:00:00+00:00",
|
7
|
+
"end_date": "2013-03-27T23:59:59+00:00",
|
8
|
+
"offset": 0,
|
9
|
+
"limit": 100,
|
10
|
+
"previous": null,
|
11
|
+
"next": null,
|
12
|
+
"params": {
|
13
|
+
"start_date": null,
|
14
|
+
"end_date": null,
|
15
|
+
"offset": null,
|
16
|
+
"limit": null
|
17
|
+
}
|
18
|
+
}, "fitness": [
|
19
|
+
{
|
20
|
+
"_id": "51552cd7fded0807c400001f",
|
21
|
+
"timestamp": "2013-03-10T07:12:16+00:00",
|
22
|
+
"utc_offset": "+00:00",
|
23
|
+
"type": "Walking",
|
24
|
+
"intensity": "low",
|
25
|
+
"start_time": "2013-03-10T07:12:16+00:00",
|
26
|
+
"distance": 2600,
|
27
|
+
"duration": 2460,
|
28
|
+
"calories": 350,
|
29
|
+
"source": "sample_app",
|
30
|
+
"source_name": "Sample App",
|
31
|
+
"last_updated": "2013-03-10T07:12:16+00:00",
|
32
|
+
"user_id": "51552cd7fded0807c4000017"
|
33
|
+
}
|
34
|
+
]
|
35
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"summary": {
|
3
|
+
"status": 200,
|
4
|
+
"message": "OK",
|
5
|
+
"results": 3,
|
6
|
+
"start_date": "2013-03-27T00:00:00+00:00",
|
7
|
+
"end_date": "2013-03-27T23:59:59+00:00",
|
8
|
+
"offset": 0,
|
9
|
+
"limit": 100,
|
10
|
+
"previous": null,
|
11
|
+
"next": null,
|
12
|
+
"params": {
|
13
|
+
"start_date": null,
|
14
|
+
"end_date": null,
|
15
|
+
"offset": null,
|
16
|
+
"limit": null
|
17
|
+
}
|
18
|
+
}, "nutrition": [
|
19
|
+
{
|
20
|
+
"_id": "51552cd9fded0807c4000043",
|
21
|
+
"timestamp": "2013-03-10T07:12:16+00:00",
|
22
|
+
"utc_offset": "+00:00",
|
23
|
+
"calories": 865,
|
24
|
+
"carbohydrates": 121,
|
25
|
+
"fat": 31,
|
26
|
+
"fiber": 9,
|
27
|
+
"protein": 21,
|
28
|
+
"sodium": 1129,
|
29
|
+
"water": 14,
|
30
|
+
"meal": "lunch",
|
31
|
+
"source": "sample_app",
|
32
|
+
"source_name": "Sample App",
|
33
|
+
"last_updated": "2013-03-10T07:12:16+00:00",
|
34
|
+
"user_id": "51552cd7fded0807c4000017"
|
35
|
+
}
|
36
|
+
]
|
37
|
+
}
|