health_hero-human_api 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +126 -0
- data/Rakefile +5 -0
- data/human_api.gemspec +33 -0
- data/lib/config/initializers/core_ext.rb +16 -0
- data/lib/human_api/app.rb +40 -0
- data/lib/human_api/config.rb +37 -0
- data/lib/human_api/human.rb +106 -0
- data/lib/human_api/version.rb +3 -0
- data/lib/human_api.rb +23 -0
- data/spec/cassettes/create_human_success.yml +40 -0
- data/spec/cassettes/get_activities.yml +54 -0
- data/spec/cassettes/get_activities_a_few.yml +54 -0
- data/spec/cassettes/get_activities_fetch_all.yml +264 -0
- data/spec/cassettes/get_humans.yml +40 -0
- data/spec/cassettes/get_profile_success.yml +46 -0
- data/spec/cassettes/get_summary_success.yml +46 -0
- data/spec/lib/human_api/app_spec.rb +66 -0
- data/spec/lib/human_api/config_spec.rb +15 -0
- data/spec/lib/human_api/human_spec.rb +114 -0
- data/spec/spec_helper.rb +28 -0
- metadata +220 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.humanapi.co/v1/human/activities?access_token=token&limit=2&offset=51
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Access-Control-Allow-Headers:
|
22
|
+
- Content-Type, Authorization, Accept
|
23
|
+
Access-Control-Allow-Methods:
|
24
|
+
- OPTIONS,GET,HEAD
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- "*"
|
27
|
+
Access-Control-Max-Age:
|
28
|
+
- '86400'
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Date:
|
32
|
+
- Tue, 01 Sep 2015 19:28:39 GMT
|
33
|
+
Link:
|
34
|
+
- <https://api.humanapi.co/v1/human/activities?access_token=token&limit=2&offset=53>;
|
35
|
+
rel="next",<https://api.humanapi.co/v1/human/activities?access_token=token&limit=2&offset=49>;
|
36
|
+
rel="prev",<https://api.humanapi.co/v1/human/activities?access_token=token&limit=2&offset=234>;
|
37
|
+
rel="last",<https://api.humanapi.co/v1/human/activities?access_token=token&limit=2&offset=0>;
|
38
|
+
rel="first"
|
39
|
+
Server:
|
40
|
+
- nginx/1.4.6 (Ubuntu)
|
41
|
+
X-Powered-By:
|
42
|
+
- Express
|
43
|
+
X-Total-Count:
|
44
|
+
- '234'
|
45
|
+
Content-Length:
|
46
|
+
- '819'
|
47
|
+
Connection:
|
48
|
+
- keep-alive
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '[{"id":"55b1343cce048509007dfe1f","userId":"55b1327e7313370100c17161","startTime":"2015-06-19T08:54:00.000Z","endTime":"2015-06-19T09:24:01.000Z","tzOffset":"-06:00","type":"cycling","source":"runkeeper","duration":1801,"distance":10171.05408,"steps":0,"calories":296,"sourceData":{},"createdAt":"2015-07-23T18:36:44.461Z","updatedAt":"2015-07-23T18:36:44.461Z","humanId":"ef30511710618584fb02a34e5b5c1f7f"},{"id":"55b1343cce048509007dfe22","userId":"55b1327e7313370100c17161","startTime":"2015-06-18T09:51:14.000Z","endTime":"2015-06-18T10:23:14.000Z","tzOffset":"-06:00","type":"running","source":"runkeeper","duration":1920,"distance":6538.8163930769,"steps":0,"calories":463,"sourceData":{},"createdAt":"2015-07-23T18:36:44.468Z","updatedAt":"2015-07-23T18:36:44.468Z","humanId":"ef30511710618584fb02a34e5b5c1f7f"}]'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Tue, 01 Sep 2015 19:24:37 GMT
|
54
|
+
recorded_with: VCR 2.9.3
|