liftapp-client 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +23 -2
- data/examples/csv_export/app.rb +3 -3
- data/lib/liftapp-client/version.rb +1 -1
- data/lib/liftapp-client.rb +2 -5
- data/liftapp-client.gemspec +3 -2
- data/spec/fixtures/3280 +1614 -0
- data/spec/fixtures/current +14 -0
- data/spec/fixtures/dashboard +14 -0
- data/spec/lift_spec.rb +12 -2
- metadata +26 -4
@@ -0,0 +1,14 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Cache-Control: must-revalidate, private, max-age=0
|
3
|
+
Content-Type: application/json; charset=utf-8
|
4
|
+
Date: Fri, 15 Feb 2013 01:09:00 GMT
|
5
|
+
Etag: "ec1be5d13e941f0a7b3cb64c70401da1"
|
6
|
+
Server: nginx
|
7
|
+
Set-Cookie: _lift_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTczNjljMzc3MWZkODk4M2JiNDU0MWIwZTIzNmU4NmI1BjsAVEkiDHVzZXJfaWQGOwBGaQKpgw%3D%3D--9fa549a44860e76f110b1ac58a73fd87cce1929a; path=/; expires=Fri, 15-Mar-2013 00:09:00 GMT; HttpOnly
|
8
|
+
X-Rack-Cache: miss
|
9
|
+
X-Runtime: 0.108068
|
10
|
+
X-Ua-Compatible: IE=Edge,chrome=1
|
11
|
+
transfer-encoding: chunked
|
12
|
+
Connection: keep-alive
|
13
|
+
|
14
|
+
{"id":33705,"name":"Neil Anderson","picture_url":"http://profile.ak.fbcdn.net/hprofile-ak-snc6/260854_100003561549613_94631864_q.jpg","profile_url":"http://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef","email":"neo@matrix.com","stats":{"total_checkin_count":92,"first_checkin_date":"2013-02-12T23:52:50Z"},"networks":["facebook"],"share_on":[{"name":"twitter","defaults_on":false,"auth_mode":"none"}]}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Cache-Control: must-revalidate, private, max-age=0
|
3
|
+
Content-Type: application/json; charset=utf-8
|
4
|
+
Date: Fri, 15 Feb 2013 01:12:27 GMT
|
5
|
+
Etag: "54951b2f45468991884b7b4c65b3614f"
|
6
|
+
Server: nginx
|
7
|
+
Set-Cookie: _lift_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTFiMjdlYWRkY2JjOTdkZjI3NzJjNDZjYzUxNzQ5YzdjBjsAVEkiDHVzZXJfaWQGOwBGaQKpgw%3D%3D--e5ae461984f5c13d596763d316dcea3fcf2102d1; path=/; expires=Fri, 15-Mar-2013 00:12:27 GMT; HttpOnly
|
8
|
+
X-Rack-Cache: miss
|
9
|
+
X-Runtime: 0.980408
|
10
|
+
X-Ua-Compatible: IE=Edge,chrome=1
|
11
|
+
transfer-encoding: chunked
|
12
|
+
Connection: keep-alive
|
13
|
+
|
14
|
+
{"subscriptions":[{"id":861436,"type":"subscription","title":"joined","created_time":"2013-02-12T22:09:00Z","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"http://profile.ak.fbcdn.net/hprofile-ak-snc6/260854_100003561549613_94631864_q.jpg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":3280,"name":"Write","slug":"write"},"comments":[],"props":[],"stats":{"total_checkins":62,"frequency":[{"start_time":"2013-02-10T00:00:00Z","count":2},{"start_time":"2013-02-03T00:00:00Z","count":0},{"start_time":"2013-01-27T00:00:00Z","count":0},{"start_time":"2013-01-20T00:00:00Z","count":0},{"start_time":"2013-01-13T00:00:00Z","count":0},{"start_time":"2013-01-06T00:00:00Z","count":0},{"start_time":"2012-12-30T00:00:00Z","count":0}]}},{"id":861399,"type":"subscription","title":"joined","created_time":"2013-02-12T22:02:07Z","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"http://profile.ak.fbcdn.net/hprofile-ak-snc6/260854_100003561549613_94631864_q.jpg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":2111,"name":"Test Lift","slug":"test-lift"},"comments":[],"props":[],"stats":{"total_checkins":8,"frequency":[{"start_time":"2013-02-10T00:00:00Z","count":4},{"start_time":"2013-02-03T00:00:00Z","count":4},{"start_time":"2013-01-27T00:00:00Z","count":0},{"start_time":"2013-01-20T00:00:00Z","count":0},{"start_time":"2013-01-13T00:00:00Z","count":0},{"start_time":"2013-01-06T00:00:00Z","count":0},{"start_time":"2012-12-30T00:00:00Z","count":0}]}},{"id":820911,"type":"subscription","title":"joined","created_time":"2013-02-03T03:23:57Z","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"http://profile.ak.fbcdn.net/hprofile-ak-snc6/260854_100003561549613_94631864_q.jpg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":2829,"name":"Keep in touch with friends","slug":"keep-in-touch-with-friends"},"comments":[],"props":[],"stats":{"total_checkins":0,"frequency":[{"start_time":"2013-02-10T00:00:00Z","count":0},{"start_time":"2013-02-03T00:00:00Z","count":0},{"start_time":"2013-01-27T00:00:00Z","count":0},{"start_time":"2013-01-20T00:00:00Z","count":0},{"start_time":"2013-01-13T00:00:00Z","count":0},{"start_time":"2013-01-06T00:00:00Z","count":0},{"start_time":"2012-12-30T00:00:00Z","count":0}]}},{"id":820910,"type":"subscription","title":"joined","created_time":"2013-02-03T03:23:29Z","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"http://profile.ak.fbcdn.net/hprofile-ak-snc6/260854_100003561549613_94631864_q.jpg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":33364,"name":"Contribute to open source","slug":"contribute-to-open-source"},"comments":[],"props":[],"stats":{"total_checkins":1,"frequency":[{"start_time":"2013-02-10T00:00:00Z","count":1},{"start_time":"2013-02-03T00:00:00Z","count":0},{"start_time":"2013-01-27T00:00:00Z","count":0},{"start_time":"2013-01-20T00:00:00Z","count":0},{"start_time":"2013-01-13T00:00:00Z","count":0},{"start_time":"2013-01-06T00:00:00Z","count":0},{"start_time":"2012-12-30T00:00:00Z","count":0}]}},{"id":820909,"type":"subscription","title":"joined","created_time":"2013-02-03T03:22:58Z","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"http://profile.ak.fbcdn.net/hprofile-ak-snc6/260854_100003561549613_94631864_q.jpg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":71452,"name":"Organize social event","slug":"organize-social-event"},"comments":[],"props":[],"stats":{"total_checkins":0,"frequency":[{"start_time":"2013-02-10T00:00:00Z","count":0},{"start_time":"2013-02-03T00:00:00Z","count":0},{"start_time":"2013-01-27T00:00:00Z","count":0},{"start_time":"2013-01-20T00:00:00Z","count":0},{"start_time":"2013-01-13T00:00:00Z","count":0},{"start_time":"2013-01-06T00:00:00Z","count":0},{"start_time":"2012-12-30T00:00:00Z","count":0}]}},{"id":820903,"type":"subscription","title":"joined","created_time":"2013-02-03T03:19:19Z","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"http://profile.ak.fbcdn.net/hprofile-ak-snc6/260854_100003561549613_94631864_q.jpg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":3943,"name":"Meet someone new","slug":"meet-someone-new"},"comments":[],"props":[],"stats":{"total_checkins":0,"frequency":[{"start_time":"2013-02-10T00:00:00Z","count":0},{"start_time":"2013-02-03T00:00:00Z","count":0},{"start_time":"2013-01-27T00:00:00Z","count":0},{"start_time":"2013-01-20T00:00:00Z","count":0},{"start_time":"2013-01-13T00:00:00Z","count":0},{"start_time":"2013-01-06T00:00:00Z","count":0},{"start_time":"2012-12-30T00:00:00Z","count":0}]}},{"id":754764,"type":"subscription","title":"joined","created_time":"2013-01-18T23:57:37Z","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"http://profile.ak.fbcdn.net/hprofile-ak-snc6/260854_100003561549613_94631864_q.jpg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"comments":[],"props":[],"stats":{"total_checkins":0,"frequency":[{"start_time":"2013-02-10T00:00:00Z","count":0},{"start_time":"2013-02-03T00:00:00Z","count":0},{"start_time":"2013-01-27T00:00:00Z","count":0},{"start_time":"2013-01-20T00:00:00Z","count":0},{"start_time":"2013-01-13T00:00:00Z","count":0},{"start_time":"2013-01-06T00:00:00Z","count":0},{"start_time":"2012-12-30T00:00:00Z","count":0}]}}],"checkin_count":92,"checkins":[{"id":3496003,"type":"checkin","created_time":"2013-02-12T21:57:07Z","source_time":"2013-02-12T21:57:06Z","title":"checked in for the 1st time","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"https://si0.twimg.com/profile_images/2561416457/88yt3ry0e2hjhdwc2tvh_bigger.jpeg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":33364,"name":"Contribute to open source","slug":"contribute-to-open-source"},"note":null,"comments":[],"props":[]},{"id":3496117,"type":"checkin","created_time":"2013-02-12T22:02:08Z","source_time":"2013-02-12T22:02:08Z","title":"checked in for the 1st time","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"https://si0.twimg.com/profile_images/2561416457/88yt3ry0e2hjhdwc2tvh_bigger.jpeg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":2111,"name":"Test Lift","slug":"test-lift"},"note":null,"comments":[],"props":[]},{"id":3496127,"type":"checkin","created_time":"2013-02-12T22:02:31Z","source_time":"2013-02-11T21:59:42Z","title":"checked in for the 1st time","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"https://si0.twimg.com/profile_images/2561416457/88yt3ry0e2hjhdwc2tvh_bigger.jpeg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":2111,"name":"Test Lift","slug":"test-lift"},"note":null,"comments":[],"props":[]},{"id":3496135,"type":"checkin","created_time":"2013-02-12T22:02:40Z","source_time":"2013-02-10T21:59:42Z","title":"checked in for the 1st time","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"https://si0.twimg.com/profile_images/2561416457/88yt3ry0e2hjhdwc2tvh_bigger.jpeg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":2111,"name":"Test Lift","slug":"test-lift"},"note":null,"comments":[],"props":[]},{"id":3496140,"type":"checkin","created_time":"2013-02-12T22:02:44Z","source_time":"2013-02-09T21:59:42Z","title":"checked in for the 1st time","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"https://si0.twimg.com/profile_images/2561416457/88yt3ry0e2hjhdwc2tvh_bigger.jpeg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":2111,"name":"Test Lift","slug":"test-lift"},"note":null,"comments":[],"props":[]},{"id":3496146,"type":"checkin","created_time":"2013-02-12T22:02:50Z","source_time":"2013-02-08T21:59:42Z","title":"checked in for the 1st time","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"https://si0.twimg.com/profile_images/2561416457/88yt3ry0e2hjhdwc2tvh_bigger.jpeg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":2111,"name":"Test Lift","slug":"test-lift"},"note":null,"comments":[],"props":[]},{"id":3496150,"type":"checkin","created_time":"2013-02-12T22:02:54Z","source_time":"2013-02-07T21:59:42Z","title":"checked in for the 1st time","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"https://si0.twimg.com/profile_images/2561416457/88yt3ry0e2hjhdwc2tvh_bigger.jpeg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":2111,"name":"Test Lift","slug":"test-lift"},"note":null,"comments":[],"props":[]},{"id":3496157,"type":"checkin","created_time":"2013-02-12T22:03:03Z","source_time":"2013-02-06T21:59:42Z","title":"checked in for the 1st time","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"https://si0.twimg.com/profile_images/2561416457/88yt3ry0e2hjhdwc2tvh_bigger.jpeg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":2111,"name":"Test Lift","slug":"test-lift"},"note":null,"comments":[],"props":[]},{"id":3498960,"type":"checkin","created_time":"2013-02-12T23:52:52Z","source_time":"2013-02-12T23:52:50Z","title":"checked in for the 61st time","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"https://si0.twimg.com/profile_images/2561416457/88yt3ry0e2hjhdwc2tvh_bigger.jpeg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":3280,"name":"Write","slug":"write"},"note":null,"comments":[],"props":[]},{"id":3498984,"type":"checkin","created_time":"2013-02-12T23:53:51Z","source_time":"2013-02-11T22:48:47Z","title":"checked in for the 61st time","user":{"name":"Jonathan Maddison","id":33705,"picture_url":"https://si0.twimg.com/profile_images/2561416457/88yt3ry0e2hjhdwc2tvh_bigger.jpeg","profile_url":"https://www.lift.do/users/e7fcd2db926273e895ef","profile_hash":"e7fcd2db926273e895ef"},"habit":{"id":3280,"name":"Write","slug":"write"},"note":null,"comments":[],"props":[]}],"activity_items":[{"id":3569577,"type":"checkin","created_time":"2013-02-15T01:01:24Z","source_time":"2013-02-15T01:01:24Z","title":"checked in for the 5th day in a row!","user":{"name":"Rachel MacBride","id":131402,"picture_url":"https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc7/371737_736669251_1972088905_q.jpg","profile_url":"https://www.lift.do/users/bc1408be57a70f58b055","profile_hash":"bc1408be57a70f58b055"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Skiing","comments":[],"props":[]},{"id":3569554,"type":"checkin","created_time":"2013-02-15T01:00:45Z","source_time":"2013-02-15T01:00:44Z","title":"checked in for the 101st time","user":{"name":"Phyllis Chua","id":91020,"picture_url":"http://profile.ak.fbcdn.net/hprofile-ak-ash4/372440_687976304_1480955452_q.jpg","profile_url":"https://www.lift.do/users/76225b17a886c9a0f9e1","profile_hash":"76225b17a886c9a0f9e1"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Run 6.10km to office 43:25 7:07min/km","comments":[],"props":[]},{"id":3569516,"type":"checkin","created_time":"2013-02-15T00:59:25Z","source_time":"2013-02-15T00:59:24Z","title":"checked in for the 1st time","user":{"name":"UC Cash","id":185924,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/1d8383d2d9317f4ef16c","profile_hash":"1d8383d2d9317f4ef16c"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Rowing machine 35 minutes","comments":[],"props":[]},{"id":3569411,"type":"checkin","created_time":"2013-02-15T00:51:33Z","source_time":"2013-02-15T00:51:34Z","title":"checked in for the 40th day in a row!","user":{"name":"LeeAnn Moore","id":144461,"picture_url":"https://twimg0-a.akamaihd.net/profile_images/1127796743/26483c0f-9b89-4773-a95e-43d270c7019e_bigger.png","profile_url":"https://www.lift.do/users/a20a55d4691efe6582c0","profile_hash":"a20a55d4691efe6582c0"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"#temt 40min #turbosculpt 20min #abjam","comments":[],"props":[]},{"id":3569403,"type":"checkin","created_time":"2013-02-15T00:51:14Z","source_time":"2013-02-15T00:51:17Z","title":"checked in for the 18th time","user":{"name":"Sabrina Fancy","id":145265,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/154e061c1f8dc2594cb0","profile_hash":"154e061c1f8dc2594cb0"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Squats lower body workout (first time in a long time!)","comments":[],"props":[]},{"id":3569396,"type":"checkin","created_time":"2013-02-15T00:50:58Z","source_time":"2013-02-15T00:50:58Z","title":"checked in for the 2nd day in a row!","user":{"name":"Nuala Barner","id":174489,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/c55f202fa08c9904eef3","profile_hash":"c55f202fa08c9904eef3"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Walk at lunchtime","comments":[],"props":[]},{"id":3568998,"type":"checkin","created_time":"2013-02-15T00:30:09Z","source_time":"2013-02-15T00:30:08Z","title":"checked in for the 2nd time","user":{"name":"Tom Myers","id":185203,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/2b409c02666d9c910f9f","profile_hash":"2b409c02666d9c910f9f"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"2 mi run nonstop for the first time. It felt Great! Looking forward to my next mile stone. Any suggestions? ","comments":[],"props":[{"id":801568,"created_time":"2013-02-15T00:53:10Z","user":{"name":"Nuala Barner","id":174489,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/c55f202fa08c9904eef3","profile_hash":"c55f202fa08c9904eef3"}},{"id":801541,"created_time":"2013-02-15T00:50:32Z","user":{"name":"Sabrina Fancy","id":145265,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/154e061c1f8dc2594cb0","profile_hash":"154e061c1f8dc2594cb0"}}]},{"id":3568940,"type":"checkin","created_time":"2013-02-15T00:27:10Z","source_time":"2013-02-15T00:27:09Z","title":"checked in for the 2nd day in a row!","user":{"name":"lynn birch","id":129509,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/1727e0515e22e4cde370","profile_hash":"1727e0515e22e4cde370"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"elliptical 30\nwalk 30\n","comments":[],"props":[{"id":801542,"created_time":"2013-02-15T00:50:36Z","user":{"name":"Sabrina Fancy","id":145265,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/154e061c1f8dc2594cb0","profile_hash":"154e061c1f8dc2594cb0"}}]},{"id":3568937,"type":"checkin","created_time":"2013-02-15T00:26:57Z","source_time":"2013-02-15T00:26:57Z","title":"checked in for the 18th time","user":{"name":"Shawn Hofing","id":166863,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/73989bb3ebee9a434b92","profile_hash":"73989bb3ebee9a434b92"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Crossfit & ran 3 miles","comments":[],"props":[{"id":801545,"created_time":"2013-02-15T00:50:38Z","user":{"name":"Sabrina Fancy","id":145265,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/154e061c1f8dc2594cb0","profile_hash":"154e061c1f8dc2594cb0"}},{"id":801514,"created_time":"2013-02-15T00:31:40Z","user":{"name":"Tom Myers","id":185203,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/2b409c02666d9c910f9f","profile_hash":"2b409c02666d9c910f9f"}}]},{"id":3568781,"type":"checkin","created_time":"2013-02-15T00:18:56Z","source_time":"2013-02-15T00:18:55Z","title":"checked in for the 23rd time","user":{"name":"Natalie R","id":156861,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/d5fcbdfbfd61ba34401f","profile_hash":"d5fcbdfbfd61ba34401f"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Upper body workout 30 minutes","comments":[],"props":[{"id":801546,"created_time":"2013-02-15T00:50:40Z","user":{"name":"Sabrina Fancy","id":145265,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/154e061c1f8dc2594cb0","profile_hash":"154e061c1f8dc2594cb0"}}]},{"id":3568702,"type":"checkin","created_time":"2013-02-15T00:15:04Z","source_time":"2013-02-15T00:15:04Z","title":"checked in for the 8th day in a row!","user":{"name":"Francisco Gozalo","id":118923,"picture_url":"https://twimg0-a.akamaihd.net/profile_images/1421831250/Avatar_bigger.PNG","profile_url":"https://www.lift.do/users/0f90db9731058739a0e3","profile_hash":"0f90db9731058739a0e3"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Pilates, tennis and gym","comments":[],"props":[{"id":801548,"created_time":"2013-02-15T00:50:42Z","user":{"name":"Sabrina Fancy","id":145265,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/154e061c1f8dc2594cb0","profile_hash":"154e061c1f8dc2594cb0"}}]},{"id":3568669,"type":"checkin","created_time":"2013-02-15T00:14:04Z","source_time":"2013-02-15T00:14:03Z","title":"checked in for the 9th day in a row!","user":{"name":"G R","id":178374,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/9c8248282cca81953b30","profile_hash":"9c8248282cca81953b30"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Stationary bike 22 minutes ","comments":[],"props":[{"id":801550,"created_time":"2013-02-15T00:50:45Z","user":{"name":"Sabrina Fancy","id":145265,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/154e061c1f8dc2594cb0","profile_hash":"154e061c1f8dc2594cb0"}}]},{"id":3568462,"type":"checkin","created_time":"2013-02-15T00:06:25Z","source_time":"2013-02-15T00:06:25Z","title":"checked in for the 3rd day in a row!","user":{"name":"John Tarr","id":124020,"picture_url":"https://si0.twimg.com/profile_images/2746326599/6511b84b1ddae3df9283b0dfbdfb8588_bigger.jpeg","profile_url":"https://www.lift.do/users/bba39265d7fae37b8677","profile_hash":"bba39265d7fae37b8677"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"P90x","comments":[],"props":[{"id":801465,"created_time":"2013-02-15T00:14:23Z","user":{"name":"G R","id":178374,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/9c8248282cca81953b30","profile_hash":"9c8248282cca81953b30"}}]},{"id":3568450,"type":"checkin","created_time":"2013-02-15T00:05:59Z","source_time":"2013-02-15T00:05:57Z","title":"checked in for the 20th time","user":{"name":"Jay Carmean","id":146905,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/b9192073afcc3e9acc04","profile_hash":"b9192073afcc3e9acc04"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"25 minutes at gym. Chest, triceps, jump rope and crunches. ","comments":[],"props":[{"id":801554,"created_time":"2013-02-15T00:51:01Z","user":{"name":"Sabrina Fancy","id":145265,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/154e061c1f8dc2594cb0","profile_hash":"154e061c1f8dc2594cb0"}}]},{"id":3568422,"type":"checkin","created_time":"2013-02-15T00:04:41Z","source_time":"2013-02-15T00:04:39Z","title":"checked in for the 4th day in a row!","user":{"name":"Lauren H.","id":159948,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/8f020062072db5e24369","profile_hash":"8f020062072db5e24369"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"20 min on bike/15 min walk","comments":[],"props":[{"id":801553,"created_time":"2013-02-15T00:51:01Z","user":{"name":"Sabrina Fancy","id":145265,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/154e061c1f8dc2594cb0","profile_hash":"154e061c1f8dc2594cb0"}}]},{"id":3566002,"type":"checkin","created_time":"2013-02-14T22:15:54Z","source_time":"2013-02-14T22:15:54Z","title":"checked in for the 2nd day in a row!","user":{"name":"chie Kawamukai","id":115991,"picture_url":"https://si0.twimg.com/profile_images/739573134/Image118_bigger.jpg","profile_url":"https://www.lift.do/users/a8fe46c36873ff871a3e","profile_hash":"a8fe46c36873ff871a3e"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"stretch and exercise of a leg","comments":[],"props":[]},{"id":3568264,"type":"checkin","created_time":"2013-02-14T23:57:53Z","source_time":"2013-02-14T23:57:54Z","title":"checked in for the 18th day in a row!","user":{"name":"Cesar L","id":148507,"picture_url":"https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc6/211248_68301059_1564054569_q.jpg","profile_url":"https://www.lift.do/users/ce73e0c0fb41dacd5318","profile_hash":"ce73e0c0fb41dacd5318"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Vday workout before the workout lol","comments":[],"props":[]},{"id":3568190,"type":"checkin","created_time":"2013-02-14T23:54:21Z","source_time":"2013-02-14T23:54:21Z","title":"checked in for the 7th time","user":{"name":"Robin Zhou","id":147257,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/6caef0248cd32f1f0461","profile_hash":"6caef0248cd32f1f0461"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Ran a treadmill 5k bc I wanted to see the rest of chopped lol","comments":[],"props":[{"id":801515,"created_time":"2013-02-15T00:32:24Z","user":{"name":"Tom Myers","id":185203,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/2b409c02666d9c910f9f","profile_hash":"2b409c02666d9c910f9f"}}]},{"id":3568128,"type":"checkin","created_time":"2013-02-14T23:51:35Z","source_time":"2013-02-14T23:51:35Z","title":"checked in for the 18th time","user":{"name":"Meri Txell","id":21478,"picture_url":"https://si0.twimg.com/profile_images/2462955639/4987DAB1-1048-4536-8697-70681D653843_bigger","profile_url":"https://www.lift.do/users/e2b2e3e9225234045617","profile_hash":"e2b2e3e9225234045617"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"30 Day Shred","comments":[],"props":[]},{"id":3567991,"type":"checkin","created_time":"2013-02-14T23:46:01Z","source_time":"2013-02-14T23:45:10Z","title":"checked in for the 6th day in a row!","user":{"name":"Brooke Avard","id":181650,"picture_url":"https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash3/173096_627581989_1477275_q.jpg","profile_url":"https://www.lift.do/users/36b430c2027682495f78","profile_hash":"36b430c2027682495f78"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Active rest day, have had a very busy day!","comments":[],"props":[]},{"id":3567813,"type":"checkin","created_time":"2013-02-14T23:35:13Z","source_time":"2013-02-14T23:35:13Z","title":"checked in for the 1st time","user":{"name":"Jesse Jesse","id":180215,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/92c610f6445db114ab2e","profile_hash":"92c610f6445db114ab2e"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Will drop 20","comments":[],"props":[]},{"id":3567753,"type":"checkin","created_time":"2013-02-14T23:32:45Z","source_time":"2013-02-14T23:32:44Z","title":"checked in for the 3rd day in a row!","user":{"name":"A J","id":134043,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/24e1fe00dd3aed2873a4","profile_hash":"24e1fe00dd3aed2873a4"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"326 cals on the treadmill. ","comments":[],"props":[]},{"id":3567736,"type":"checkin","created_time":"2013-02-14T23:31:08Z","source_time":"2013-02-14T23:31:07Z","title":"checked in for the 5th day in a row!","user":{"name":"Eric Earle","id":182919,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/2427a00dc5c1a0bc2c45","profile_hash":"2427a00dc5c1a0bc2c45"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Trying to do daily doubles!!!","comments":[],"props":[]},{"id":3567585,"type":"checkin","created_time":"2013-02-14T23:23:17Z","source_time":"2013-02-14T23:23:17Z","title":"checked in for the 2nd day in a row!","user":{"name":"Andy Friel","id":13962,"picture_url":"https://si0.twimg.com/profile_images/2738902612/481af64bf57976386a0987b9ee4ff78b_bigger.jpeg","profile_url":"https://www.lift.do/users/9c355475564451635e1d","profile_hash":"9c355475564451635e1d"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Shoulders","comments":[],"props":[]},{"id":3567240,"type":"checkin","created_time":"2013-02-14T23:09:09Z","source_time":"2013-02-14T23:09:10Z","title":"checked in for the 16th time","user":{"name":"Lizzy K","id":131704,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/bda976ea4937aebf8150","profile_hash":"bda976ea4937aebf8150"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Walk","comments":[],"props":[]},{"id":3567114,"type":"checkin","created_time":"2013-02-14T23:03:48Z","source_time":"2013-02-14T23:03:49Z","title":"checked in for the 5th time","user":{"name":"RJ Simon","id":176628,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/9445bbf200942bc63942","profile_hash":"9445bbf200942bc63942"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Train day","comments":[],"props":[]},{"id":3566950,"type":"checkin","created_time":"2013-02-14T22:58:52Z","source_time":"2013-02-14T22:58:51Z","title":"checked in for the 3rd day in a row!","user":{"name":"Chrissy Agui","id":78883,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/85862fe8a7c8b9475eec","profile_hash":"85862fe8a7c8b9475eec"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Insanity","comments":[],"props":[]},{"id":3566867,"type":"checkin","created_time":"2013-02-14T22:54:55Z","source_time":"2013-02-14T22:54:55Z","title":"checked in for the 1st time","user":{"name":"Amber Maggard","id":134382,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/8152fd6d7d735dc62571","profile_hash":"8152fd6d7d735dc62571"},"habit":{"id":2829,"name":"Keep in touch with friends","slug":"keep-in-touch-with-friends"},"note":"At lunch with a new friend ","comments":[],"props":[]},{"id":3566844,"type":"checkin","created_time":"2013-02-14T22:53:24Z","source_time":"2013-02-14T22:53:22Z","title":"checked in for the 4th day in a row!","user":{"name":"Stephanie Baker","id":182446,"picture_url":"https://twimg0-a.akamaihd.net/profile_images/2521731638/840C99D8-AF55-4911-8E2C-C58AF4665015_bigger","profile_url":"https://www.lift.do/users/14ab12607d82947488d2","profile_hash":"14ab12607d82947488d2"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"New Rules of Lifting for Women and 20,000 steps. ","comments":[],"props":[]},{"id":3566784,"type":"checkin","created_time":"2013-02-14T22:49:47Z","source_time":"2013-02-14T22:49:46Z","title":"checked in for the 13th time","user":{"name":"Mitch Green","id":172946,"picture_url":"https://twimg0-a.akamaihd.net/profile_images/61497265/n1411620097_30243399_6377_bigger.jpg","profile_url":"https://www.lift.do/users/6890b23c8079ecfe36b6","profile_hash":"6890b23c8079ecfe36b6"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"3 miles in 23 mins","comments":[],"props":[{"id":801152,"created_time":"2013-02-14T22:53:53Z","user":{"name":"Shawn Carolan","id":124970,"picture_url":"https://si0.twimg.com/profile_images/1571693168/Screen-Shot-2011-10-03-at-2.35.29-PM-150x150_bigger.png","profile_url":"https://www.lift.do/users/1a1863d41da987be6994","profile_hash":"1a1863d41da987be6994"}}]},{"id":3566728,"type":"checkin","created_time":"2013-02-14T22:47:37Z","source_time":"2013-02-14T22:49:42Z","title":"checked in for the 5th day in a row!","user":{"name":"Made Simon","id":165591,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/984e99249f2e1ee29477","profile_hash":"984e99249f2e1ee29477"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Yoga","comments":[],"props":[]},{"id":3566734,"type":"checkin","created_time":"2013-02-14T22:47:45Z","source_time":"2013-02-14T22:47:46Z","title":"checked in for the 11th time","user":{"name":"Barry Wilde","id":169786,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/5fd336a145153c97004c","profile_hash":"5fd336a145153c97004c"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Spinning","comments":[],"props":[]},{"id":3566192,"type":"checkin","created_time":"2013-02-14T22:25:10Z","source_time":"2013-02-14T22:25:10Z","title":"checked in for the 4th day in a row!","user":{"name":"Mark Denney","id":65981,"picture_url":"https://si0.twimg.com/profile_images/2930030549/115b15569fbfe86a8baaf016c0751c20_bigger.jpeg","profile_url":"https://www.lift.do/users/4da3f4f8e73c3c2b46fe","profile_hash":"4da3f4f8e73c3c2b46fe"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Step class","comments":[],"props":[{"id":801025,"created_time":"2013-02-14T22:35:42Z","user":{"name":"Hunter Haley","id":125838,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/02693cad323786390efe","profile_hash":"02693cad323786390efe"}}]},{"id":3566098,"type":"checkin","created_time":"2013-02-14T22:21:12Z","source_time":"2013-02-14T22:21:12Z","title":"checked in for the 27th time","user":{"name":"Amin Huynh","id":151614,"picture_url":"https://fbcdn-profile-a.akamaihd.net/static-ak/rsrc.php/v2/y9/r/IB7NOFmPw2a.gif","profile_url":"https://www.lift.do/users/4f850a47e5e078a22ed1","profile_hash":"4f850a47e5e078a22ed1"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"Jillian Michaels workout! ","comments":[],"props":[]},{"id":3568350,"type":"checkin","created_time":"2013-02-15T00:01:52Z","source_time":"2013-02-15T00:01:50Z","title":"checked in for the 4th time","user":{"name":"Eric Shank","id":152988,"picture_url":"http://lift.do/assets/default-pic-50x50.png","profile_url":"https://www.lift.do/users/5c4fdfbc77739096434a","profile_hash":"5c4fdfbc77739096434a"},"habit":{"id":2054,"name":"Exercise","slug":"exercise"},"note":"100 push-ups app, week 2 day 2 complete","comments":[],"props":[]}],"habit_order":{}}
|
data/spec/lift_spec.rb
CHANGED
@@ -1,19 +1,29 @@
|
|
1
|
+
require 'webmock/rspec'
|
1
2
|
require_relative '../lib/liftapp-client.rb'
|
2
3
|
|
3
4
|
describe Liftapp::Client do
|
4
5
|
|
5
6
|
it 'returns profile_hash' do
|
6
|
-
|
7
|
+
stub_request(:get, "https://neo@matrix.com:whiterabbit@www.lift.do/i/0/users/current").
|
8
|
+
to_return(File.new(File.expand_path File.dirname(__FILE__) + '/fixtures/current'))
|
9
|
+
|
10
|
+
client = Liftapp::Client.new(email: 'neo@matrix.com', password: 'whiterabbit')
|
7
11
|
expect(client.login['profile_hash']).to eq 'e7fcd2db926273e895ef'
|
8
12
|
expect(client.profile_hash).to eq 'e7fcd2db926273e895ef'
|
9
13
|
end
|
10
14
|
|
11
15
|
it 'returns habit list' do
|
12
|
-
|
16
|
+
stub_request(:get, "https://neo@matrix.com:whiterabbit@www.lift.do/api/v2/dashboard").
|
17
|
+
to_return(File.new(File.expand_path File.dirname(__FILE__) + '/fixtures/dashboard'))
|
18
|
+
|
19
|
+
client = Liftapp::Client.new(email: 'neo@matrix.com', password: 'whiterabbit')
|
13
20
|
expect(client.dashboard['subscriptions'].length).to eq 7
|
14
21
|
end
|
15
22
|
|
16
23
|
it 'returns checkin data' do
|
24
|
+
stub_request(:get, "https://www.lift.do/users/e7fcd2db926273e895ef/3280").
|
25
|
+
to_return(File.new(File.expand_path File.dirname(__FILE__) + '/fixtures/3280'))
|
26
|
+
|
17
27
|
client = Liftapp::Client.new(profile_hash: 'e7fcd2db926273e895ef')
|
18
28
|
data = client.checkin_data('3280')
|
19
29
|
data[:checkins].length.should be > 10
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liftapp-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '0'
|
22
|
-
type: :
|
22
|
+
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
@@ -35,7 +35,23 @@ dependencies:
|
|
35
35
|
- - ! '>='
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '0'
|
38
|
-
type: :
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: webmock
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
39
55
|
prerelease: false
|
40
56
|
version_requirements: !ruby/object:Gem::Requirement
|
41
57
|
none: false
|
@@ -72,6 +88,9 @@ files:
|
|
72
88
|
- lib/liftapp-client.rb
|
73
89
|
- lib/liftapp-client/version.rb
|
74
90
|
- liftapp-client.gemspec
|
91
|
+
- spec/fixtures/3280
|
92
|
+
- spec/fixtures/current
|
93
|
+
- spec/fixtures/dashboard
|
75
94
|
- spec/lift_spec.rb
|
76
95
|
homepage: ''
|
77
96
|
licenses: []
|
@@ -98,4 +117,7 @@ signing_key:
|
|
98
117
|
specification_version: 3
|
99
118
|
summary: Client allows you to access your Lift.do habits and checkins.
|
100
119
|
test_files:
|
120
|
+
- spec/fixtures/3280
|
121
|
+
- spec/fixtures/current
|
122
|
+
- spec/fixtures/dashboard
|
101
123
|
- spec/lift_spec.rb
|