taskrabbit 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/.rspec +2 -0
- data/Gemfile +22 -0
- data/Guardfile +8 -0
- data/README.md +132 -0
- data/Rakefile +53 -0
- data/lib/taskrabbit.rb +21 -0
- data/lib/taskrabbit/account.rb +7 -0
- data/lib/taskrabbit/api.rb +47 -0
- data/lib/taskrabbit/association.rb +52 -0
- data/lib/taskrabbit/city.rb +19 -0
- data/lib/taskrabbit/client.rb +47 -0
- data/lib/taskrabbit/collection.rb +17 -0
- data/lib/taskrabbit/config.rb +43 -0
- data/lib/taskrabbit/error.rb +10 -0
- data/lib/taskrabbit/location.rb +19 -0
- data/lib/taskrabbit/proxy.rb +62 -0
- data/lib/taskrabbit/smash.rb +82 -0
- data/lib/taskrabbit/task.rb +54 -0
- data/lib/taskrabbit/transformer.rb +5 -0
- data/lib/taskrabbit/user.rb +26 -0
- data/lib/taskrabbit/version.rb +3 -0
- data/spec/spec_helper.rb +33 -0
- data/spec/support/cassettes/account/no_user.yml +30 -0
- data/spec/support/cassettes/account/properties.yml +32 -0
- data/spec/support/cassettes/account/tasks.yml +63 -0
- data/spec/support/cassettes/account/with_user.yml +32 -0
- data/spec/support/cassettes/cities/all.yml +32 -0
- data/spec/support/cassettes/cities/find.yml +32 -0
- data/spec/support/cassettes/cities/properties.yml +32 -0
- data/spec/support/cassettes/errors/404.yml +362 -0
- data/spec/support/cassettes/locations/properties.yml +63 -0
- data/spec/support/cassettes/tasks/all.yml +32 -0
- data/spec/support/cassettes/tasks/create/default.yml +30 -0
- data/spec/support/cassettes/tasks/create/using_account.yml +30 -0
- data/spec/support/cassettes/tasks/create/with_location.yml +32 -0
- data/spec/support/cassettes/tasks/create/without_credit_card.yml +30 -0
- data/spec/support/cassettes/tasks/create/without_user.yml +30 -0
- data/spec/support/cassettes/tasks/delete.yml +63 -0
- data/spec/support/cassettes/tasks/find.yml +32 -0
- data/spec/support/cassettes/tasks/properties.yml +32 -0
- data/spec/support/cassettes/tasks/save.yml +63 -0
- data/spec/support/cassettes/tasks/update.yml +63 -0
- data/spec/support/cassettes/tasks/without_client.yml +30 -0
- data/spec/support/cassettes/users/find.yml +32 -0
- data/spec/support/cassettes/users/properties.yml +32 -0
- data/spec/support/cassettes/users/tasks/all.yml +32 -0
- data/spec/taskrabbit/account_spec.rb +65 -0
- data/spec/taskrabbit/api_spec.rb +34 -0
- data/spec/taskrabbit/city_spec.rb +61 -0
- data/spec/taskrabbit/collection_spec.rb +17 -0
- data/spec/taskrabbit/error_spec.rb +13 -0
- data/spec/taskrabbit/location_spec.rb +26 -0
- data/spec/taskrabbit/proxy_spec.rb +23 -0
- data/spec/taskrabbit/smash_spec.rb +129 -0
- data/spec/taskrabbit/task_spec.rb +235 -0
- data/spec/taskrabbit/taskrabbit_spec.rb +31 -0
- data/spec/taskrabbit/user_spec.rb +70 -0
- data/taskrabbit.gemspec +26 -0
- metadata +194 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: http://localhost:3000/api/v1/account?
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
x-client-application:
|
9
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
10
|
+
authorization:
|
11
|
+
- OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
etag:
|
18
|
+
- "\"1e7456943686e7860596b08fd8493a2b\""
|
19
|
+
content-type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
x-runtime:
|
22
|
+
- "3979"
|
23
|
+
server:
|
24
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
25
|
+
date:
|
26
|
+
- Sat, 17 Mar 2012 23:12:31 GMT
|
27
|
+
content-length:
|
28
|
+
- "2956"
|
29
|
+
cache-control:
|
30
|
+
- private, max-age=0, must-revalidate
|
31
|
+
body: "{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"zip_code\":\"64321\",\"id\":49720,\"tasks\":{\"items\":[{\"name\":\"My First Task\",\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"charge_price\":20,\"private_runner\":false,\"named_price\":20,\"complete_by_time\":1332093600,\"id\":22673,\"state_changed_at\":1332025380,\"cost_in_cents\":0,\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--47\",\"get\":\"/api/v1/tasks/22673\",\"delete\":\"/api/v1/tasks/22673\",\"put\":\"/api/v1/tasks/22673\",\"authenticated\":\"http://local.taskrabbit.com/go/2f249e87a04016d741f163fe991468737e367c8e334eb5d5a53a63d741ce0019ba1a9c33366a76cadc06bdcb9259c5549a44\"},\"runners\":{\"items\":[]},\"state_label\":\"posted\",\"assign_by_time\":1332082800,\"state\":\"opened\"},{\"name\":\"New Name\",\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"charge_price\":20,\"private_runner\":false,\"named_price\":20,\"complete_by_time\":1332093600,\"id\":22674,\"state_changed_at\":1332025387,\"cost_in_cents\":0,\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/new-name--3\",\"get\":\"/api/v1/tasks/22674\",\"delete\":\"/api/v1/tasks/22674\",\"put\":\"/api/v1/tasks/22674\",\"authenticated\":\"http://local.taskrabbit.com/go/459b5e05e7a6542891148717ed9cdd4a25fb5d5f71f094c098a93beb25ba26303c4ea5e2c8e01da3743703abbe1da5b46980\"},\"runners\":{\"items\":[]},\"state_label\":\"posted\",\"assign_by_time\":1332082800,\"state\":\"opened\"},{\"name\":\"My First Task\",\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"charge_price\":20,\"private_runner\":false,\"named_price\":20,\"complete_by_time\":1332093600,\"id\":22675,\"state_changed_at\":1332025394,\"cost_in_cents\":0,\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--49\",\"get\":\"/api/v1/tasks/22675\",\"delete\":\"/api/v1/tasks/22675\",\"put\":\"/api/v1/tasks/22675\",\"authenticated\":\"http://local.taskrabbit.com/go/a89862d84f6a3b8b3175c46bc824ba3c4086519395730898237d56ef90ad672e540e62370c6a87b6c6ec2f601c10e2486ba7\"},\"runners\":{\"items\":[]},\"state_label\":\"posted\",\"assign_by_time\":1332082800,\"state\":\"opened\"}],\"links\":{\"get\":\"/api/v1/users/49720/tasks\",\"last\":\"/api/v1/users/49720/tasks?page=1\",\"first\":\"/api/v1/users/49720/tasks?page=1\"}},\"short_name\":\"Bob\",\"full_name\":\"Bob Sponge\",\"last_name\":\"Sponge\",\"links\":{\"get\":\"/api/v1/users/49720\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"display_name\":\"Bob S.\",\"locations\":{\"items\":[{\"name\":\"Home\",\"city\":\"San Francisco\",\"approximate_radius\":0,\"address\":\"432 example\",\"zip\":\"94123\",\"partial\":\"example, San Francisco, Ca 94123\",\"id\":37439,\"lng\":2.108266,\"complete\":\"432 example, San Francisco, Ca 94123\",\"lat\":41.5512199,\"state\":\"Ca\"}],\"links\":{\"get\":\"/api/v1/users/49720/locations\"}},\"email\":\"bobsponge@example.com\",\"first_name\":\"Bob\",\"counts\":{\"posted_tasks\":30,\"active_tasks\":3,\"ongoing_tasks\":3}}"
|
32
|
+
http_version: "1.1"
|
33
|
+
- !ruby/struct:VCR::HTTPInteraction
|
34
|
+
request: !ruby/struct:VCR::Request
|
35
|
+
method: :get
|
36
|
+
uri: http://localhost:3000/api/v1/users/49720/locations?
|
37
|
+
body:
|
38
|
+
headers:
|
39
|
+
x-client-application:
|
40
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
41
|
+
authorization:
|
42
|
+
- OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
|
43
|
+
response: !ruby/struct:VCR::Response
|
44
|
+
status: !ruby/struct:VCR::ResponseStatus
|
45
|
+
code: 200
|
46
|
+
message: OK
|
47
|
+
headers:
|
48
|
+
etag:
|
49
|
+
- "\"c3624bebe86dbf348cd911ce2ec04bff\""
|
50
|
+
content-type:
|
51
|
+
- application/json; charset=utf-8
|
52
|
+
x-runtime:
|
53
|
+
- "273"
|
54
|
+
server:
|
55
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
56
|
+
date:
|
57
|
+
- Sat, 17 Mar 2012 23:12:33 GMT
|
58
|
+
content-length:
|
59
|
+
- "310"
|
60
|
+
cache-control:
|
61
|
+
- private, max-age=0, must-revalidate
|
62
|
+
body: "{\"items\":[{\"address\":\"432 example\",\"approximate_radius\":0,\"city\":\"San Francisco\",\"name\":\"Home\",\"zip\":\"94123\",\"partial\":\"example, San Francisco, Ca 94123\",\"lng\":2.108266,\"id\":37439,\"complete\":\"432 example, San Francisco, Ca 94123\",\"lat\":41.5512199,\"state\":\"Ca\"}],\"links\":{\"get\":\"/api/v1/users/49720/locations\"}}"
|
63
|
+
http_version: "1.1"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: http://localhost:3000/api/v1/tasks?
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
x-client-application:
|
9
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
10
|
+
authorization:
|
11
|
+
- OAuth
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
etag:
|
18
|
+
- "\"debec6619a3d3ab33811ffd7896a8da7\""
|
19
|
+
content-type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
x-runtime:
|
22
|
+
- "1348"
|
23
|
+
server:
|
24
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
25
|
+
date:
|
26
|
+
- Sat, 17 Mar 2012 23:12:37 GMT
|
27
|
+
content-length:
|
28
|
+
- "7719"
|
29
|
+
cache-control:
|
30
|
+
- private, max-age=0, must-revalidate
|
31
|
+
body: "{\"items\":[{\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"name\":\"My First Task\",\"complete_by_time\":1332093600,\"cost_in_cents\":0,\"state_changed_at\":1332025394,\"id\":22675,\"runners\":{\"items\":[]},\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--49\",\"get\":\"/api/v1/tasks/22675\"},\"state_label\":\"posted\",\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49720,\"links\":{\"get\":\"/api/v1/users/49720\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Bob S.\",\"short_name\":\"Bob\",\"display_name\":\"Bob S.\"},\"assign_by_time\":1332082800,\"state\":\"opened\"},{\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"name\":\"New Name\",\"complete_by_time\":1332093600,\"cost_in_cents\":0,\"state_changed_at\":1332025387,\"id\":22674,\"runners\":{\"items\":[]},\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/new-name--3\",\"get\":\"/api/v1/tasks/22674\"},\"state_label\":\"posted\",\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49720,\"links\":{\"get\":\"/api/v1/users/49720\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Bob S.\",\"short_name\":\"Bob\",\"display_name\":\"Bob S.\"},\"assign_by_time\":1332082800,\"state\":\"opened\"},{\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"name\":\"My First Task\",\"complete_by_time\":1332093600,\"cost_in_cents\":0,\"state_changed_at\":1332025380,\"id\":22673,\"runners\":{\"items\":[]},\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--47\",\"get\":\"/api/v1/tasks/22673\"},\"state_label\":\"posted\",\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49720,\"links\":{\"get\":\"/api/v1/users/49720\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Bob S.\",\"short_name\":\"Bob\",\"display_name\":\"Bob S.\"},\"assign_by_time\":1332082800,\"state\":\"opened\"},{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"name\":\"2 Hours of House Cleaning + 1 Hour of House Chores\",\"complete_by_time\":1330887600,\"cost_in_cents\":0,\"state_changed_at\":1330729387,\"id\":22666,\"runners\":{\"items\":[]},\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/2-hours-of-house-cleaning-1-hour-of-house-chores--2\",\"get\":\"/api/v1/tasks/22666\"},\"state_label\":\"assigned\",\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49658,\"links\":{\"get\":\"/api/v1/users/49658\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Jean-Richard L.\",\"short_name\":\"Jean-Richard\",\"display_name\":\"Jean-Richard L.\"},\"assign_by_time\":1330750800,\"state\":\"assigned\"},{\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"name\":\"My First Task\",\"complete_by_time\":1330801200,\"cost_in_cents\":0,\"state_changed_at\":1330723860,\"id\":22557,\"runners\":{\"items\":[]},\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--11\",\"get\":\"/api/v1/tasks/22557\"},\"state_label\":\"posted\",\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49658,\"links\":{\"get\":\"/api/v1/users/49658\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Jean-Richard L.\",\"short_name\":\"Jean-Richard\",\"display_name\":\"Jean-Richard L.\"},\"assign_by_time\":1330790400,\"state\":\"opened\"},{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"name\":\"Shopping at Any Store\",\"complete_by_time\":1328670000,\"cost_in_cents\":0,\"state_changed_at\":1328638929,\"id\":22659,\"runners\":{\"items\":[]},\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/shopping-at-any-store--4\",\"get\":\"/api/v1/tasks/22659\"},\"state_label\":\"assigned\",\"description\":\"test\",\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49658,\"links\":{\"get\":\"/api/v1/users/49658\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Jean-Richard L.\",\"short_name\":\"Jean-Richard\",\"display_name\":\"Jean-Richard L.\"},\"assign_by_time\":1328659200,\"state\":\"assigned\"},{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"name\":\"2 Hours of House Cleaning + 1 Hour of House Chores\",\"complete_by_time\":1318381200,\"cost_in_cents\":0,\"state_changed_at\":1317839370,\"id\":22545,\"runners\":{\"items\":[]},\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/task--278\",\"get\":\"/api/v1/tasks/22545\"},\"state_label\":\"closed\",\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49658,\"links\":{\"get\":\"/api/v1/users/49658\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Jean-Richard L.\",\"short_name\":\"Jean-Richard\",\"display_name\":\"Jean-Richard L.\"},\"assign_by_time\":1318014000,\"state\":\"closed\"},{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"name\":\"unrewoirnwiownrweiorwn\",\"complete_by_time\":1310612400,\"cost_in_cents\":0,\"state_changed_at\":1310576762,\"id\":22525,\"runners\":{\"items\":[]},\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/unrewoirnwiownrweiorwn\",\"get\":\"/api/v1/tasks/22525\"},\"state_label\":\"completed\",\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49658,\"links\":{\"get\":\"/api/v1/users/49658\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Jean-Richard L.\",\"short_name\":\"Jean-Richard\",\"display_name\":\"Jean-Richard L.\"},\"assign_by_time\":1310598000,\"state\":\"completed\"},{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"name\":\"Yo ca va !?\",\"complete_by_time\":1310594400,\"cost_in_cents\":0,\"state_changed_at\":1310576419,\"id\":22524,\"runners\":{\"items\":[]},\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/yo-ca-va\",\"get\":\"/api/v1/tasks/22524\"},\"state_label\":\"closed\",\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49658,\"links\":{\"get\":\"/api/v1/users/49658\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Jean-Richard L.\",\"short_name\":\"Jean-Richard\",\"display_name\":\"Jean-Richard L.\"},\"assign_by_time\":1310580000,\"state\":\"closed\"},{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"name\":\"ABFCEFDDDSS\",\"complete_by_time\":1310439600,\"cost_in_cents\":0,\"state_changed_at\":1310408061,\"id\":22519,\"runners\":{\"items\":[]},\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/abfcefdddss\",\"get\":\"/api/v1/tasks/22519\"},\"state_label\":\"closed\",\"description\":\"erewrewwer\\\\\\r\\n\\r\\nrew\\r\\nr\\r\\new\\r\\nw\\r\\new\",\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49658,\"links\":{\"get\":\"/api/v1/users/49658\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Jean-Richard L.\",\"short_name\":\"Jean-Richard\",\"display_name\":\"Jean-Richard L.\"},\"assign_by_time\":1310425200,\"state\":\"closed\"}],\"links\":{\"get\":\"/api/v1/tasks\",\"last\":\"/api/v1/tasks?page=844\",\"first\":\"/api/v1/tasks?page=1\",\"next\":\"/api/v1/tasks?page=2\"}}"
|
32
|
+
http_version: "1.1"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://localhost:3000/api/v1/tasks?
|
6
|
+
body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
|
7
|
+
headers:
|
8
|
+
x-client-application:
|
9
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
10
|
+
authorization:
|
11
|
+
- OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 201
|
15
|
+
message: Created
|
16
|
+
headers:
|
17
|
+
content-type:
|
18
|
+
- application/json; charset=utf-8
|
19
|
+
x-runtime:
|
20
|
+
- "3349"
|
21
|
+
server:
|
22
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
23
|
+
date:
|
24
|
+
- Sat, 17 Mar 2012 23:13:16 GMT
|
25
|
+
content-length:
|
26
|
+
- "757"
|
27
|
+
cache-control:
|
28
|
+
- no-cache
|
29
|
+
body: "{\"name\":\"My First Task\",\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"charge_price\":20,\"private_runner\":false,\"named_price\":20,\"complete_by_time\":1332093600,\"id\":22683,\"state_changed_at\":1332025993,\"cost_in_cents\":0,\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--57\",\"get\":\"/api/v1/tasks/22683\",\"delete\":\"/api/v1/tasks/22683\",\"put\":\"/api/v1/tasks/22683\",\"authenticated\":\"http://local.taskrabbit.com/go/a1f9702641a5da7cbf71f8d6a6b61451905222a5ac632d728f5ad359d3b14fef993d4da34241b5b3e2dbc1bc8ba85e3420ca\",\"redirect\":\"https://local.taskrabbit.com/tasks/my-first-task--57?card=true\"},\"runners\":{\"items\":[]},\"state_label\":\"not posted\",\"assign_by_time\":1332082800,\"state\":\"unpaid\"}"
|
30
|
+
http_version: "1.1"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://localhost:3000/api/v1/tasks?
|
6
|
+
body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
|
7
|
+
headers:
|
8
|
+
x-client-application:
|
9
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
10
|
+
authorization:
|
11
|
+
- OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 422
|
15
|
+
message:
|
16
|
+
headers:
|
17
|
+
content-type:
|
18
|
+
- application/json; charset=utf-8
|
19
|
+
x-runtime:
|
20
|
+
- "718"
|
21
|
+
server:
|
22
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
23
|
+
date:
|
24
|
+
- Sat, 17 Mar 2012 23:13:17 GMT
|
25
|
+
content-length:
|
26
|
+
- "341"
|
27
|
+
cache-control:
|
28
|
+
- no-cache
|
29
|
+
body: "{\"errors\":{\"messages\":[\"Whoa! You're posting Tasks too quickly. Our TaskRabbits need a break. Please try again later.\"],\"fields\":[[\"base\",\"Whoa! You're posting Tasks too quickly. Our TaskRabbits need a break. Please try again later.\"]]},\"error\":\"Whoa! You're posting Tasks too quickly. Our TaskRabbits need a break. Please try again later.\"}"
|
30
|
+
http_version: "1.1"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://localhost:3000/api/v1/tasks?
|
6
|
+
body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4&task[other_locations_attributes][][city]=Boston&task[other_locations_attributes][][address]=123%20Main%20St&task[other_locations_attributes][][name]=Home&task[other_locations_attributes][][zip]=02154&task[other_locations_attributes][][lng]=-71.059774&task[other_locations_attributes][][lat]=42.358432&task[other_locations_attributes][][state]=MA&task[other_locations_attributes][][name]=Middle%20of%20the%20park&task[other_locations_attributes][][lng]=-71.059772&task[other_locations_attributes][][lat]=42.358430
|
7
|
+
headers:
|
8
|
+
x-client-application:
|
9
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
10
|
+
authorization:
|
11
|
+
- OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
etag:
|
18
|
+
- "\"0ebaca3f0b5c68bd81d16a9aebc7b497\""
|
19
|
+
content-type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
x-runtime:
|
22
|
+
- "3262"
|
23
|
+
server:
|
24
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
25
|
+
date:
|
26
|
+
- Sat, 17 Mar 2012 23:13:07 GMT
|
27
|
+
content-length:
|
28
|
+
- "1074"
|
29
|
+
cache-control:
|
30
|
+
- private, max-age=0, must-revalidate
|
31
|
+
body: "{\"name\":\"My First Task\",\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"charge_price\":20,\"private_runner\":false,\"named_price\":20,\"complete_by_time\":1332093600,\"id\":22681,\"state_changed_at\":1332025986,\"cost_in_cents\":0,\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--55\",\"get\":\"/api/v1/tasks/22681\",\"delete\":\"/api/v1/tasks/22681\",\"put\":\"/api/v1/tasks/22681\",\"authenticated\":\"http://local.taskrabbit.com/go/aee487c3c205df11defb1eeb83dab50de7f670769edcd82455eae92f776d6e6ef0dd7b1aacbea7c05ede923baf3a1343bcc6\"},\"runners\":{\"items\":[]},\"state_label\":\"posted\",\"assign_by_time\":1332082800,\"location_visits\":{\"items\":[{\"address\":\"123 Main St\",\"approximate_radius\":0,\"city\":\"Boston\",\"name\":\"Home\",\"zip\":\"02154\",\"partial\":\"Main St, Boston, MA 02154\",\"lng\":-71.059774,\"id\":17754,\"complete\":\"123 Main St, Boston, MA 02154\",\"location_id\":37528,\"lat\":42.358432,\"state\":\"MA\"},{\"approximate_radius\":0,\"name\":\"Middle of the park\",\"lng\":-71.059772,\"id\":17755,\"location_id\":37529,\"lat\":42.35843}]},\"state\":\"opened\"}"
|
32
|
+
http_version: "1.1"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://localhost:3000/api/v1/tasks?
|
6
|
+
body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
|
7
|
+
headers:
|
8
|
+
x-client-application:
|
9
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
10
|
+
authorization:
|
11
|
+
- OAuth sjCuNHsxMRkFiJGpLWZzYJksDjfnXtDvDcPuuDkn
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 201
|
15
|
+
message: Created
|
16
|
+
headers:
|
17
|
+
content-type:
|
18
|
+
- application/json; charset=utf-8
|
19
|
+
x-runtime:
|
20
|
+
- "3090"
|
21
|
+
server:
|
22
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
23
|
+
date:
|
24
|
+
- Sat, 17 Mar 2012 23:13:11 GMT
|
25
|
+
content-length:
|
26
|
+
- "757"
|
27
|
+
cache-control:
|
28
|
+
- no-cache
|
29
|
+
body: "{\"name\":\"My First Task\",\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"charge_price\":20,\"private_runner\":false,\"named_price\":20,\"complete_by_time\":1332093600,\"id\":22682,\"state_changed_at\":1332025989,\"cost_in_cents\":0,\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--56\",\"get\":\"/api/v1/tasks/22682\",\"delete\":\"/api/v1/tasks/22682\",\"put\":\"/api/v1/tasks/22682\",\"authenticated\":\"http://local.taskrabbit.com/go/2ef7eadef5b87122a4ad80c90046f726b786a750e710e4cbb95ad4502b3282d61c93d126988add46d0e16916db2f622d17cb\",\"redirect\":\"https://local.taskrabbit.com/tasks/my-first-task--56?card=true\"},\"runners\":{\"items\":[]},\"state_label\":\"not posted\",\"assign_by_time\":1332082800,\"state\":\"unpaid\"}"
|
30
|
+
http_version: "1.1"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://localhost:3000/api/v1/tasks?
|
6
|
+
body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
|
7
|
+
headers:
|
8
|
+
x-client-application:
|
9
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
10
|
+
authorization:
|
11
|
+
- OAuth
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 401
|
15
|
+
message: Unauthorized
|
16
|
+
headers:
|
17
|
+
content-type:
|
18
|
+
- application/json; charset=utf-8
|
19
|
+
x-runtime:
|
20
|
+
- "72"
|
21
|
+
server:
|
22
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
23
|
+
date:
|
24
|
+
- Sat, 17 Mar 2012 23:13:03 GMT
|
25
|
+
content-length:
|
26
|
+
- "63"
|
27
|
+
cache-control:
|
28
|
+
- no-cache
|
29
|
+
body: "{\"error\":\"There must be an authenticated user for this action\"}"
|
30
|
+
http_version: "1.1"
|
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://localhost:3000/api/v1/tasks?
|
6
|
+
body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
|
7
|
+
headers:
|
8
|
+
x-client-application:
|
9
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
10
|
+
authorization:
|
11
|
+
- OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
etag:
|
18
|
+
- "\"b5bf82771fdaed13418e2307f53984e0\""
|
19
|
+
content-type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
x-runtime:
|
22
|
+
- "3862"
|
23
|
+
server:
|
24
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
25
|
+
date:
|
26
|
+
- Sat, 17 Mar 2012 23:12:44 GMT
|
27
|
+
content-length:
|
28
|
+
- "677"
|
29
|
+
cache-control:
|
30
|
+
- private, max-age=0, must-revalidate
|
31
|
+
body: "{\"name\":\"My First Task\",\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"charge_price\":20,\"private_runner\":false,\"named_price\":20,\"complete_by_time\":1332093600,\"id\":22678,\"state_changed_at\":1332025962,\"cost_in_cents\":0,\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--52\",\"get\":\"/api/v1/tasks/22678\",\"delete\":\"/api/v1/tasks/22678\",\"put\":\"/api/v1/tasks/22678\",\"authenticated\":\"http://local.taskrabbit.com/go/934e67540e5d1b027df38063af1af256f7b1c6e072ea6dd8b3d6d2dc0171e002af8346f6620b00fa6bbfc40f3a227afcab02\"},\"runners\":{\"items\":[]},\"state_label\":\"posted\",\"assign_by_time\":1332082800,\"state\":\"opened\"}"
|
32
|
+
http_version: "1.1"
|
33
|
+
- !ruby/struct:VCR::HTTPInteraction
|
34
|
+
request: !ruby/struct:VCR::Request
|
35
|
+
method: :delete
|
36
|
+
uri: http://localhost:3000/api/v1/tasks/22678?
|
37
|
+
body:
|
38
|
+
headers:
|
39
|
+
x-client-application:
|
40
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
41
|
+
authorization:
|
42
|
+
- OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
|
43
|
+
response: !ruby/struct:VCR::Response
|
44
|
+
status: !ruby/struct:VCR::ResponseStatus
|
45
|
+
code: 200
|
46
|
+
message: OK
|
47
|
+
headers:
|
48
|
+
etag:
|
49
|
+
- "\"b0133f1c7394780d0643967c0006a9cb\""
|
50
|
+
content-type:
|
51
|
+
- application/json; charset=utf-8
|
52
|
+
x-runtime:
|
53
|
+
- "1930"
|
54
|
+
server:
|
55
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
56
|
+
date:
|
57
|
+
- Sat, 17 Mar 2012 23:12:47 GMT
|
58
|
+
content-length:
|
59
|
+
- "622"
|
60
|
+
cache-control:
|
61
|
+
- private, max-age=0, must-revalidate
|
62
|
+
body: "{\"name\":\"My First Task\",\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"charge_price\":20,\"private_runner\":false,\"named_price\":20,\"complete_by_time\":1332093600,\"id\":22678,\"state_changed_at\":1332025965,\"cost_in_cents\":0,\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--52\",\"get\":\"/api/v1/tasks/22678\",\"authenticated\":\"http://local.taskrabbit.com/go/934e67540e5d1b027df38063af1af256f7b1c6e072ea6dd8b3d6d2dc0171e002af8346f6620b00fa6bbfc40f3a227afcab02\"},\"runners\":{\"items\":[]},\"state_label\":\"canceled\",\"assign_by_time\":1332082800,\"state\":\"canceled\"}"
|
63
|
+
http_version: "1.1"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: http://localhost:3000/api/v1/tasks/22545?
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
x-client-application:
|
9
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
10
|
+
authorization:
|
11
|
+
- OAuth
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
etag:
|
18
|
+
- "\"1abb040c2b73a76e1261969893a363f8\""
|
19
|
+
content-type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
x-runtime:
|
22
|
+
- "752"
|
23
|
+
server:
|
24
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
25
|
+
date:
|
26
|
+
- Sat, 17 Mar 2012 23:12:39 GMT
|
27
|
+
content-length:
|
28
|
+
- "774"
|
29
|
+
cache-control:
|
30
|
+
- private, max-age=0, must-revalidate
|
31
|
+
body: "{\"name\":\"2 Hours of House Cleaning + 1 Hour of House Chores\",\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"complete_by_time\":1318381200,\"id\":22545,\"state_changed_at\":1317839370,\"cost_in_cents\":0,\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/task--278\",\"get\":\"/api/v1/tasks/22545\"},\"runners\":{\"items\":[]},\"state_label\":\"closed\",\"assign_by_time\":1318014000,\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49658,\"links\":{\"get\":\"/api/v1/users/49658\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Jean-Richard L.\",\"short_name\":\"Jean-Richard\",\"display_name\":\"Jean-Richard L.\"},\"state\":\"closed\"}"
|
32
|
+
http_version: "1.1"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: http://localhost:3000/api/v1/tasks/22545?
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
x-client-application:
|
9
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
10
|
+
authorization:
|
11
|
+
- OAuth
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
etag:
|
18
|
+
- "\"d7e8594808d34c7e4e8d87737f8ec5dc\""
|
19
|
+
content-type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
x-runtime:
|
22
|
+
- "726"
|
23
|
+
server:
|
24
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
25
|
+
date:
|
26
|
+
- Sat, 17 Mar 2012 23:31:20 GMT
|
27
|
+
content-length:
|
28
|
+
- "1432"
|
29
|
+
cache-control:
|
30
|
+
- private, max-age=0, must-revalidate
|
31
|
+
body: "{\"name\":\"2 Hours of House Cleaning + 1 Hour of House Chores\",\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"complete_by_time\":1318381200,\"id\":22545,\"state_changed_at\":1332026993,\"cost_in_cents\":0,\"runner\":{\"city\":{\"name\":\"Boston\",\"lng\":-71.059773,\"id\":1,\"links\":{\"get\":\"/api/v1/cities/1\"},\"lat\":42.358431},\"runner\":true,\"id\":66,\"links\":{\"get\":\"/api/v1/users/66\",\"avatar_url\":\"http://s3.amazonaws.com/taskrabbit-dev/avatars/66/thumb/jordan.png?1276495549\"},\"full_name\":\"Jordan H.\",\"short_name\":\"Jordan\",\"display_name\":\"Jordan H.\"},\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/task--278\",\"get\":\"/api/v1/tasks/22545\"},\"runners\":{\"items\":[{\"city\":{\"name\":\"Boston\",\"lng\":-71.059773,\"id\":1,\"links\":{\"get\":\"/api/v1/cities/1\"},\"lat\":42.358431},\"id\":66,\"runner\":true,\"short_name\":\"Jordan\",\"full_name\":\"Jordan H.\",\"links\":{\"get\":\"/api/v1/users/66\",\"avatar_url\":\"http://s3.amazonaws.com/taskrabbit-dev/avatars/66/thumb/jordan.png?1276495549\"},\"display_name\":\"Jordan H.\"}]},\"state_label\":\"closed\",\"assign_by_time\":1318014000,\"user\":{\"city\":{\"name\":\"SF Bay Area\",\"lng\":-122.419416,\"id\":3,\"links\":{\"get\":\"/api/v1/cities/3\"},\"lat\":37.77493},\"id\":49658,\"links\":{\"get\":\"/api/v1/users/49658\",\"avatar_url\":\"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png\"},\"full_name\":\"Jean-Richard L.\",\"short_name\":\"Jean-Richard\",\"display_name\":\"Jean-Richard L.\"},\"state\":\"closed\"}"
|
32
|
+
http_version: "1.1"
|
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://localhost:3000/api/v1/tasks?
|
6
|
+
body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
|
7
|
+
headers:
|
8
|
+
x-client-application:
|
9
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
10
|
+
authorization:
|
11
|
+
- OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
etag:
|
18
|
+
- "\"4407080a5492669dc9355f1113478d03\""
|
19
|
+
content-type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
x-runtime:
|
22
|
+
- "3284"
|
23
|
+
server:
|
24
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
25
|
+
date:
|
26
|
+
- Sat, 17 Mar 2012 23:12:51 GMT
|
27
|
+
content-length:
|
28
|
+
- "677"
|
29
|
+
cache-control:
|
30
|
+
- private, max-age=0, must-revalidate
|
31
|
+
body: "{\"name\":\"My First Task\",\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"charge_price\":20,\"private_runner\":false,\"named_price\":20,\"complete_by_time\":1332093600,\"id\":22679,\"state_changed_at\":1332025970,\"cost_in_cents\":0,\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--53\",\"get\":\"/api/v1/tasks/22679\",\"delete\":\"/api/v1/tasks/22679\",\"put\":\"/api/v1/tasks/22679\",\"authenticated\":\"http://local.taskrabbit.com/go/5a5d27db65887f4b787f19c3c32dbfcf59aabd1943575f7b5d9030f9b984573dbbca1e58d2cd4297b6bf0ec7ccaa3e849db9\"},\"runners\":{\"items\":[]},\"state_label\":\"posted\",\"assign_by_time\":1332082800,\"state\":\"opened\"}"
|
32
|
+
http_version: "1.1"
|
33
|
+
- !ruby/struct:VCR::HTTPInteraction
|
34
|
+
request: !ruby/struct:VCR::Request
|
35
|
+
method: :get
|
36
|
+
uri: http://localhost:3000/api/v1/tasks/22679?
|
37
|
+
body:
|
38
|
+
headers:
|
39
|
+
x-client-application:
|
40
|
+
- euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
|
41
|
+
authorization:
|
42
|
+
- OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
|
43
|
+
response: !ruby/struct:VCR::Response
|
44
|
+
status: !ruby/struct:VCR::ResponseStatus
|
45
|
+
code: 200
|
46
|
+
message: OK
|
47
|
+
headers:
|
48
|
+
etag:
|
49
|
+
- "\"4407080a5492669dc9355f1113478d03\""
|
50
|
+
content-type:
|
51
|
+
- application/json; charset=utf-8
|
52
|
+
x-runtime:
|
53
|
+
- "1425"
|
54
|
+
server:
|
55
|
+
- WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
|
56
|
+
date:
|
57
|
+
- Sat, 17 Mar 2012 23:12:53 GMT
|
58
|
+
content-length:
|
59
|
+
- "677"
|
60
|
+
cache-control:
|
61
|
+
- private, max-age=0, must-revalidate
|
62
|
+
body: "{\"name\":\"My First Task\",\"city\":{\"name\":\"New York City\",\"lng\":-74.005973,\"id\":4,\"links\":{\"get\":\"/api/v1/cities/4\"},\"lat\":40.714353},\"charge_price\":20,\"private_runner\":false,\"named_price\":20,\"complete_by_time\":1332093600,\"id\":22679,\"state_changed_at\":1332025970,\"cost_in_cents\":0,\"links\":{\"html\":\"http://local.taskrabbit.com/tasks/my-first-task--53\",\"get\":\"/api/v1/tasks/22679\",\"delete\":\"/api/v1/tasks/22679\",\"put\":\"/api/v1/tasks/22679\",\"authenticated\":\"http://local.taskrabbit.com/go/5a5d27db65887f4b787f19c3c32dbfcf59aabd1943575f7b5d9030f9b984573dbbca1e58d2cd4297b6bf0ec7ccaa3e849db9\"},\"runners\":{\"items\":[]},\"state_label\":\"posted\",\"assign_by_time\":1332082800,\"state\":\"opened\"}"
|
63
|
+
http_version: "1.1"
|