amee 4.3.2 → 4.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.txt +6 -0
- data/Gemfile +7 -1
- data/Rakefile +2 -0
- data/VERSION +1 -1
- data/amee.gemspec +57 -6
- data/amee_test_credentials.example.yml +11 -0
- data/cassettes/AMEE_Connection/v2/raising_unhandled_errors.yml +36 -0
- data/cassettes/AMEE_Connection/v3/retries/502.yml +36 -0
- data/cassettes/AMEE_Connection/v3/retries/503.yml +36 -0
- data/cassettes/AMEE_Connection/v3/retries/504.yml +36 -0
- data/cassettes/AMEE_Connection/v3/retries/AMEE_TimeOut.yml +36 -0
- data/cassettes/AMEE_Connection/v3/should_be_able_to_get_from_meta_server.yml +30 -0
- data/cassettes/AMEE_Connection/v3/should_be_able_to_handle_failed_gets_from_meta_server.yml +30 -0
- data/cassettes/AMEE_Connection/v3/should_be_able_to_post_to_meta_server.yml +59 -0
- data/cassettes/AMEE_Connection/v3/should_have_a_connection_to_meta_server.yml +36 -0
- data/cassettes/AMEE_Connection/v3/should_login_and_know_the_path_to_the_server.yml +36 -0
- data/cassettes/AMEE_Connection_Caching_Off/authenticating.yml +36 -0
- data/cassettes/AMEE_Connection_Caching_Off/first_request.yml +40 -0
- data/cassettes/AMEE_Connection_Caching_Off/second_request.yml +40 -0
- data/cassettes/AMEE_Connection_Caching_On/authenticating.yml +36 -0
- data/cassettes/AMEE_Connection_Caching_On/first_request.yml +40 -0
- data/cassettes/AMEE_Connection_Caching_clear_all/second_request.yml +40 -0
- data/cassettes/AMEE_Connection_Caching_clear_manually/second_request.yml +40 -0
- data/cassettes/AMEE_Connection_Caching_further_down_tree/second_request.yml +79 -0
- data/cassettes/AMEE_Connection_with_authentication/handling_404s.yml +69 -0
- data/cassettes/AMEE_Connection_with_authentication/hitting_private_urls.yml +75 -0
- data/cassettes/AMEE_Connection_with_authentication/raising_errors_if_permission_denied.yml +69 -0
- data/cassettes/AMEE_Connection_with_authentication/should_re-authenticate_and_refresh_authtoken_when_authtoken_expires.yml +104 -0
- data/cassettes/AMEE_Connection_with_authentication/should_refresh_authtoken_when_authtoken_is_changed.yml +114 -0
- data/cassettes/AMEE_Connection_with_authentication/using_a_v1_key.yml +71 -0
- data/cassettes/AMEE_Connection_with_authentication/using_a_v2_key/detects_the_API_version_for_JSON.yml +36 -0
- data/cassettes/AMEE_Connection_with_authentication/using_a_v2_key/detects_the_API_version_for_XML.yml +36 -0
- data/cassettes/AMEE_Connection_with_authentication_doing_write-requests.yml +75 -0
- data/cassettes/AMEE_Connection_with_authentication_doing_write-requests/working_with_an_existing_profile/deleting_existing_items.yml +108 -0
- data/cassettes/AMEE_Connection_with_authentication_doing_write-requests/working_with_an_existing_profile/sending_updates_to_existing_items.yml +108 -0
- data/cassettes/AMEE_Connection_with_bad_authentication_information/hitting_a_private_url.yml +29 -0
- data/cassettes/AMEE_Connection_with_bad_authentication_information/hitting_a_public_url.yml +32 -0
- data/cassettes/AMEE_Connection_with_incorrect_server_name.yml +16 -0
- data/cassettes/AMEE_Connection_with_retry_enabled.yml +36 -0
- data/lib/amee/connection.rb +234 -110
- data/lib/amee/data_category.rb +2 -2
- data/lib/amee/data_item.rb +45 -2
- data/lib/amee/data_item_value.rb +1 -1
- data/lib/amee/exceptions.rb +5 -2
- data/lib/amee/parse_helper.rb +2 -0
- data/lib/amee/profile_item.rb +6 -2
- data/lib/amee/v3/connection.rb +77 -70
- data/lib/amee/v3/item_value_definition.rb +1 -1
- data/lib/amee/v3/return_value_definition.rb +1 -1
- data/spec/cache_spec.rb +107 -48
- data/spec/connection_spec.rb +224 -183
- data/spec/data_item_spec.rb +12 -0
- data/spec/data_item_value_history_spec.rb +4 -4
- data/spec/data_item_value_spec.rb +2 -2
- data/spec/fixtures/AD63A83B4D41.json +1 -1
- data/spec/fixtures/AD63A83B4D41.xml +1 -1
- data/spec/profile_item_spec.rb +14 -10
- data/spec/spec_helper.rb +29 -0
- data/spec/v3/connection_spec.rb +77 -65
- data/spec/v3/item_value_definition_spec.rb +1 -0
- data/spec/v3/return_value_definition_spec.rb +1 -1
- metadata +140 -24
- data/Gemfile.lock +0 -63
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: post
|
5
|
+
uri: https://stage.amee.com:443/auth/signIn
|
6
|
+
body: username=<AMEE_V2_API_KEY>&password=<AMEE_V2_PASSWORD>
|
7
|
+
headers:
|
8
|
+
accept:
|
9
|
+
- application/xml
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
expires:
|
16
|
+
- Sun, 27 Nov 2011 01:09:28 GMT
|
17
|
+
last-modified:
|
18
|
+
- Mon, 28 Nov 2011 01:09:28 GMT
|
19
|
+
content-type:
|
20
|
+
- application/xml; charset=UTF-8
|
21
|
+
via:
|
22
|
+
- 1.1 stage.amee.com
|
23
|
+
server:
|
24
|
+
- Noelios-Restlet-Engine/1.1.10
|
25
|
+
date:
|
26
|
+
- Mon, 28 Nov 2011 01:09:28 GMT
|
27
|
+
set-cookie:
|
28
|
+
- authToken=jDUjbvCYE++USQW5cRN1b3Np/3lKnGeL1k0VbsavjpIh6f2xfdoyVDLVyICBsXPH6oFpmcsfOr/YW1NXgpWCxsAy+Q8sTmr6EbyD/dvAZHQ=; Path=/
|
29
|
+
authtoken:
|
30
|
+
- jDUjbvCYE++USQW5cRN1b3Np/3lKnGeL1k0VbsavjpIh6f2xfdoyVDLVyICBsXPH6oFpmcsfOr/YW1NXgpWCxsAy+Q8sTmr6EbyD/dvAZHQ=
|
31
|
+
vary:
|
32
|
+
- Accept-Charset,Accept-Encoding,Accept-Language,Accept
|
33
|
+
transfer-encoding:
|
34
|
+
- chunked
|
35
|
+
body: <?xml version="1.0" encoding="UTF-8" standalone="no"?><Resources><SignInResource><Next>/auth</Next><User uid="58F26PHHLFEB"><Status>ACTIVE</Status><Type>STANDARD</Type><ApiVersion>2.0</ApiVersion><Locale>en_GB</Locale><TimeZone>UTC</TimeZone></User></SignInResource></Resources>
|
36
|
+
http_version: "1.1"
|
@@ -0,0 +1,75 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: post
|
5
|
+
uri: https://stage.amee.com:443/auth/signIn
|
6
|
+
body: username=<AMEE_V2_API_KEY>&password=<AMEE_V2_PASSWORD>
|
7
|
+
headers:
|
8
|
+
accept:
|
9
|
+
- application/xml
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
expires:
|
16
|
+
- Sun, 27 Nov 2011 01:16:13 GMT
|
17
|
+
last-modified:
|
18
|
+
- Mon, 28 Nov 2011 01:16:13 GMT
|
19
|
+
content-type:
|
20
|
+
- application/xml; charset=UTF-8
|
21
|
+
via:
|
22
|
+
- 1.1 stage.amee.com
|
23
|
+
server:
|
24
|
+
- Noelios-Restlet-Engine/1.1.10
|
25
|
+
date:
|
26
|
+
- Mon, 28 Nov 2011 01:16:13 GMT
|
27
|
+
set-cookie:
|
28
|
+
- authToken=JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=; Path=/
|
29
|
+
authtoken:
|
30
|
+
- JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
31
|
+
vary:
|
32
|
+
- Accept-Charset,Accept-Encoding,Accept-Language,Accept
|
33
|
+
transfer-encoding:
|
34
|
+
- chunked
|
35
|
+
body: <?xml version="1.0" encoding="UTF-8" standalone="no"?><Resources><SignInResource><Next>/auth</Next><User uid="58F26PHHLFEB"><Status>ACTIVE</Status><Type>STANDARD</Type><ApiVersion>2.0</ApiVersion><Locale>en_GB</Locale><TimeZone>UTC</TimeZone></User></SignInResource></Resources>
|
36
|
+
http_version: "1.1"
|
37
|
+
- !ruby/struct:VCR::HTTPInteraction
|
38
|
+
request: !ruby/struct:VCR::Request
|
39
|
+
method: post
|
40
|
+
uri: https://stage.amee.com:443/profiles
|
41
|
+
body: profile=true
|
42
|
+
headers:
|
43
|
+
accept:
|
44
|
+
- application/json
|
45
|
+
cookie:
|
46
|
+
- AuthToken=JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
47
|
+
authtoken:
|
48
|
+
- JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
49
|
+
response: !ruby/struct:VCR::Response
|
50
|
+
status: !ruby/struct:VCR::ResponseStatus
|
51
|
+
code: 200
|
52
|
+
message: OK
|
53
|
+
headers:
|
54
|
+
expires:
|
55
|
+
- Sun, 27 Nov 2011 01:16:13 GMT
|
56
|
+
last-modified:
|
57
|
+
- Mon, 28 Nov 2011 01:16:13 GMT
|
58
|
+
content-type:
|
59
|
+
- application/json; charset=UTF-8
|
60
|
+
via:
|
61
|
+
- 1.1 stage.amee.com
|
62
|
+
server:
|
63
|
+
- Noelios-Restlet-Engine/1.1.10
|
64
|
+
date:
|
65
|
+
- Mon, 28 Nov 2011 01:16:13 GMT
|
66
|
+
content-length:
|
67
|
+
- "277"
|
68
|
+
set-cookie:
|
69
|
+
- authToken=JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=; Path=/
|
70
|
+
authtoken:
|
71
|
+
- JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
72
|
+
vary:
|
73
|
+
- Accept-Charset,Accept-Encoding,Accept-Language,Accept
|
74
|
+
body: "{\"apiVersion\":\"2.0\",\"profile\":{\"uid\":\"8YUXNC2S1KDB\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"Mon Nov 28 01:16:13 UTC 2011\",\"name\":\"8YUXNC2S1KDB\",\"path\":\"8YUXNC2S1KDB\",\"user\":{\"uid\":\"58F26PHHLFEB\",\"username\":\"<AMEE_V2_API_KEY>\"},\"modified\":\"Mon Nov 28 01:16:13 UTC 2011\"}}"
|
75
|
+
http_version: "1.1"
|
@@ -0,0 +1,108 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: get
|
5
|
+
uri: https://stage.amee.com:443/data/test/apitests/drill
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
accept:
|
9
|
+
- application/json
|
10
|
+
cookie:
|
11
|
+
- AuthToken=JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
12
|
+
authtoken:
|
13
|
+
- JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
14
|
+
response: !ruby/struct:VCR::Response
|
15
|
+
status: !ruby/struct:VCR::ResponseStatus
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
expires:
|
20
|
+
- Sun, 27 Nov 2011 01:19:25 GMT
|
21
|
+
last-modified:
|
22
|
+
- Mon, 28 Nov 2011 01:19:25 GMT
|
23
|
+
content-type:
|
24
|
+
- application/json; charset=UTF-8
|
25
|
+
via:
|
26
|
+
- 1.1 stage.amee.com
|
27
|
+
server:
|
28
|
+
- Noelios-Restlet-Engine/1.1.10
|
29
|
+
date:
|
30
|
+
- Mon, 28 Nov 2011 01:19:25 GMT
|
31
|
+
content-length:
|
32
|
+
- "2867"
|
33
|
+
set-cookie:
|
34
|
+
- authToken=/GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyGSM1BOfQ5QkjhaCP1Uw07WEpBSF/CZvkgeLyXTOAWvpbUAVHpdb+xhvrRz6mSM91U=; Path=/
|
35
|
+
authtoken:
|
36
|
+
- /GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyGSM1BOfQ5QkjhaCP1Uw07WEpBSF/CZvkgeLyXTOAWvpbUAVHpdb+xhvrRz6mSM91U=
|
37
|
+
vary:
|
38
|
+
- Accept-Charset,Accept-Encoding,Accept-Language,Accept
|
39
|
+
body: "{\"apiVersion\":\"2.0\",\"dataCategory\":{\"uid\":\"039DCB9BA67D\",\"dataCategory\":{\"uid\":\"6153F468BE05\",\"deprecated\":false,\"name\":\"Test\",\"path\":\"test\"},\"deprecated\":false,\"environment\":{\"uid\":\"5F5887BCF726\",\"itemsPerFeed\":10,\"description\":\"\",\"name\":\"AMEE\",\"owner\":\"\",\"path\":\"\",\"itemsPerPage\":10},\"created\":\"2009-08-12 05:19:33.0\",\"name\":\"api tests\",\"path\":\"apitests\",\"itemDefinition\":{\"uid\":\"CF344E20E9AC\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2008-10-28 17:06:33.0\",\"name\":\"AAATipTest\",\"drillDown\":\"question\",\"modified\":\"2008-10-28 17:06:33.0\"},\"modified\":\"2011-05-16 09:37:01.0\"},\"choices\":{\"choices\":[{\"name\":\"0N5G8ZU3WS41\",\"value\":\"0N5G8ZU3WS41\"},{\"name\":\"183FFBE17C25\",\"value\":\"183FFBE17C25\"},{\"name\":\"1CFCEC1A472A\",\"value\":\"1CFCEC1A472A\"},{\"name\":\"2C8F8227A042\",\"value\":\"2C8F8227A042\"},{\"name\":\"37C208E87756\",\"value\":\"37C208E87756\"},{\"name\":\"3D33112A65C0\",\"value\":\"3D33112A65C0\"},{\"name\":\"407ED18C3817\",\"value\":\"407ED18C3817\"},{\"name\":\"41AED8E0EC9E\",\"value\":\"41AED8E0EC9E\"},{\"name\":\"4C2F3C271904\",\"value\":\"4C2F3C271904\"},{\"name\":\"4O7USJN9J2J3\",\"value\":\"4O7USJN9J2J3\"},{\"name\":\"5831AD8B9E7E\",\"value\":\"5831AD8B9E7E\"},{\"name\":\"5832C2374DCD\",\"value\":\"5832C2374DCD\"},{\"name\":\"59948BD49A71\",\"value\":\"59948BD49A71\"},{\"name\":\"5E9B831A406E\",\"value\":\"5E9B831A406E\"},{\"name\":\"5ED64E179495\",\"value\":\"5ED64E179495\"},{\"name\":\"65BFAF323FD5\",\"value\":\"65BFAF323FD5\"},{\"name\":\"73GGRY0D11AJ\",\"value\":\"73GGRY0D11AJ\"},{\"name\":\"8A3B5340BF7A\",\"value\":\"8A3B5340BF7A\"},{\"name\":\"8AC4A5B32373\",\"value\":\"8AC4A5B32373\"},{\"name\":\"9GFREPAVG6HZ\",\"value\":\"9GFREPAVG6HZ\"},{\"name\":\"A54520F7A30B\",\"value\":\"A54520F7A30B\"},{\"name\":\"A604B970190F\",\"value\":\"A604B970190F\"},{\"name\":\"AQ297KQMVM8U\",\"value\":\"AQ297KQMVM8U\"},{\"name\":\"B29847A544D9\",\"value\":\"B29847A544D9\"},{\"name\":\"BA4AA96D1F7F\",\"value\":\"BA4AA96D1F7F\"},{\"name\":\"BC99D35DDB12\",\"value\":\"BC99D35DDB12\"},{\"name\":\"BDD984570CEF\",\"value\":\"BDD984570CEF\"},{\"name\":\"DDCE5C51D3E1\",\"value\":\"DDCE5C51D3E1\"},{\"name\":\"E24G1S1A5U15\",\"value\":\"E24G1S1A5U15\"},{\"name\":\"EFE327521EE1\",\"value\":\"EFE327521EE1\"},{\"name\":\"EYO5KARRH4VI\",\"value\":\"EYO5KARRH4VI\"},{\"name\":\"FB2089863267\",\"value\":\"FB2089863267\"},{\"name\":\"FCEAD07C89F0\",\"value\":\"FCEAD07C89F0\"},{\"name\":\"GPIV5M3F6TWZ\",\"value\":\"GPIV5M3F6TWZ\"},{\"name\":\"KPEZCYPHISO8\",\"value\":\"KPEZCYPHISO8\"},{\"name\":\"L9J8316ZOW3P\",\"value\":\"L9J8316ZOW3P\"},{\"name\":\"LETSBYHU5T3R\",\"value\":\"LETSBYHU5T3R\"},{\"name\":\"N4F33P0U2R27\",\"value\":\"N4F33P0U2R27\"},{\"name\":\"NKYS4OCPGRXN\",\"value\":\"NKYS4OCPGRXN\"},{\"name\":\"RD6GN6RGO7JF\",\"value\":\"RD6GN6RGO7JF\"},{\"name\":\"SNNYQYS1O093\",\"value\":\"SNNYQYS1O093\"},{\"name\":\"STZKIU2EZMWS\",\"value\":\"STZKIU2EZMWS\"},{\"name\":\"T6YG5A92DKJW\",\"value\":\"T6YG5A92DKJW\"},{\"name\":\"U5OS0F2ZXC31\",\"value\":\"U5OS0F2ZXC31\"},{\"name\":\"UU0T33XGU9UZ\",\"value\":\"UU0T33XGU9UZ\"},{\"name\":\"UUKSVHNQJKBW\",\"value\":\"UUKSVHNQJKBW\"}],\"name\":\"uid\"},\"selections\":[{\"name\":\"question\",\"value\":\"\"}],\"itemDefinition\":{\"uid\":\"CF344E20E9AC\"}}"
|
40
|
+
http_version: "1.1"
|
41
|
+
- !ruby/struct:VCR::HTTPInteraction
|
42
|
+
request: !ruby/struct:VCR::Request
|
43
|
+
method: post
|
44
|
+
uri: https://stage.amee.com:443/profiles/8YUXNC2S1KDB/test/apitests
|
45
|
+
body: dataItemUid=0N5G8ZU3WS41
|
46
|
+
headers:
|
47
|
+
accept:
|
48
|
+
- application/json
|
49
|
+
cookie:
|
50
|
+
- AuthToken=JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
51
|
+
authtoken:
|
52
|
+
- JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
53
|
+
response: !ruby/struct:VCR::Response
|
54
|
+
status: !ruby/struct:VCR::ResponseStatus
|
55
|
+
code: 201
|
56
|
+
message: Created
|
57
|
+
headers:
|
58
|
+
location:
|
59
|
+
- https://stage.amee.com/profiles/8YUXNC2S1KDB/test/apitests/KSYY092PCNA7
|
60
|
+
content-type:
|
61
|
+
- text/plain
|
62
|
+
via:
|
63
|
+
- 1.1 stage.amee.com
|
64
|
+
server:
|
65
|
+
- Noelios-Restlet-Engine/1.1.10
|
66
|
+
date:
|
67
|
+
- Mon, 28 Nov 2011 01:19:25 GMT
|
68
|
+
content-length:
|
69
|
+
- "0"
|
70
|
+
set-cookie:
|
71
|
+
- authToken=/GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyE8JgdGr+4RnkooGQFGURmeckBjVffwJZl5ltq3UKMAwO3oXNMiLNUeNANCEbXFKhU=; Path=/
|
72
|
+
authtoken:
|
73
|
+
- /GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyE8JgdGr+4RnkooGQFGURmeckBjVffwJZl5ltq3UKMAwO3oXNMiLNUeNANCEbXFKhU=
|
74
|
+
body:
|
75
|
+
http_version: "1.1"
|
76
|
+
- !ruby/struct:VCR::HTTPInteraction
|
77
|
+
request: !ruby/struct:VCR::Request
|
78
|
+
method: delete
|
79
|
+
uri: https://stage.amee.com:443/profiles/8YUXNC2S1KDB/test/apitests/KSYY092PCNA7
|
80
|
+
body:
|
81
|
+
headers:
|
82
|
+
accept:
|
83
|
+
- application/json
|
84
|
+
cookie:
|
85
|
+
- AuthToken=JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
86
|
+
authtoken:
|
87
|
+
- JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
88
|
+
response: !ruby/struct:VCR::Response
|
89
|
+
status: !ruby/struct:VCR::ResponseStatus
|
90
|
+
code: 200
|
91
|
+
message: OK
|
92
|
+
headers:
|
93
|
+
content-type:
|
94
|
+
- text/plain
|
95
|
+
via:
|
96
|
+
- 1.1 stage.amee.com
|
97
|
+
server:
|
98
|
+
- Noelios-Restlet-Engine/1.1.10
|
99
|
+
date:
|
100
|
+
- Mon, 28 Nov 2011 01:19:25 GMT
|
101
|
+
content-length:
|
102
|
+
- "0"
|
103
|
+
set-cookie:
|
104
|
+
- authToken=/GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyGTEesjk+1uc2VIP7CvFJTMtutyWBcZ1tIdeKIXgCB5c3m9xPVWVBYA+Synm6cMSDU=; Path=/
|
105
|
+
authtoken:
|
106
|
+
- /GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyGTEesjk+1uc2VIP7CvFJTMtutyWBcZ1tIdeKIXgCB5c3m9xPVWVBYA+Synm6cMSDU=
|
107
|
+
body:
|
108
|
+
http_version: "1.1"
|
@@ -0,0 +1,108 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: get
|
5
|
+
uri: https://stage.amee.com:443/data/test/apitests/drill
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
accept:
|
9
|
+
- application/json
|
10
|
+
cookie:
|
11
|
+
- AuthToken=JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
12
|
+
authtoken:
|
13
|
+
- JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
14
|
+
response: !ruby/struct:VCR::Response
|
15
|
+
status: !ruby/struct:VCR::ResponseStatus
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
expires:
|
20
|
+
- Sun, 27 Nov 2011 01:23:55 GMT
|
21
|
+
last-modified:
|
22
|
+
- Mon, 28 Nov 2011 01:23:55 GMT
|
23
|
+
content-type:
|
24
|
+
- application/json; charset=UTF-8
|
25
|
+
via:
|
26
|
+
- 1.1 stage.amee.com
|
27
|
+
server:
|
28
|
+
- Noelios-Restlet-Engine/1.1.10
|
29
|
+
date:
|
30
|
+
- Mon, 28 Nov 2011 01:23:55 GMT
|
31
|
+
content-length:
|
32
|
+
- "2867"
|
33
|
+
set-cookie:
|
34
|
+
- authToken=/GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyH153tGF7+9g93PnUZfFFlTEgOWFujyW/36QbU3fW5KZEebe88LM1ZnBDGxHHQL2wE=; Path=/
|
35
|
+
authtoken:
|
36
|
+
- /GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyH153tGF7+9g93PnUZfFFlTEgOWFujyW/36QbU3fW5KZEebe88LM1ZnBDGxHHQL2wE=
|
37
|
+
vary:
|
38
|
+
- Accept-Charset,Accept-Encoding,Accept-Language,Accept
|
39
|
+
body: "{\"apiVersion\":\"2.0\",\"dataCategory\":{\"uid\":\"039DCB9BA67D\",\"dataCategory\":{\"uid\":\"6153F468BE05\",\"deprecated\":false,\"name\":\"Test\",\"path\":\"test\"},\"deprecated\":false,\"environment\":{\"uid\":\"5F5887BCF726\",\"itemsPerFeed\":10,\"description\":\"\",\"name\":\"AMEE\",\"owner\":\"\",\"path\":\"\",\"itemsPerPage\":10},\"created\":\"2009-08-12 05:19:33.0\",\"name\":\"api tests\",\"path\":\"apitests\",\"itemDefinition\":{\"uid\":\"CF344E20E9AC\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2008-10-28 17:06:33.0\",\"name\":\"AAATipTest\",\"drillDown\":\"question\",\"modified\":\"2008-10-28 17:06:33.0\"},\"modified\":\"2011-05-16 09:37:01.0\"},\"choices\":{\"choices\":[{\"name\":\"0N5G8ZU3WS41\",\"value\":\"0N5G8ZU3WS41\"},{\"name\":\"183FFBE17C25\",\"value\":\"183FFBE17C25\"},{\"name\":\"1CFCEC1A472A\",\"value\":\"1CFCEC1A472A\"},{\"name\":\"2C8F8227A042\",\"value\":\"2C8F8227A042\"},{\"name\":\"37C208E87756\",\"value\":\"37C208E87756\"},{\"name\":\"3D33112A65C0\",\"value\":\"3D33112A65C0\"},{\"name\":\"407ED18C3817\",\"value\":\"407ED18C3817\"},{\"name\":\"41AED8E0EC9E\",\"value\":\"41AED8E0EC9E\"},{\"name\":\"4C2F3C271904\",\"value\":\"4C2F3C271904\"},{\"name\":\"4O7USJN9J2J3\",\"value\":\"4O7USJN9J2J3\"},{\"name\":\"5831AD8B9E7E\",\"value\":\"5831AD8B9E7E\"},{\"name\":\"5832C2374DCD\",\"value\":\"5832C2374DCD\"},{\"name\":\"59948BD49A71\",\"value\":\"59948BD49A71\"},{\"name\":\"5E9B831A406E\",\"value\":\"5E9B831A406E\"},{\"name\":\"5ED64E179495\",\"value\":\"5ED64E179495\"},{\"name\":\"65BFAF323FD5\",\"value\":\"65BFAF323FD5\"},{\"name\":\"73GGRY0D11AJ\",\"value\":\"73GGRY0D11AJ\"},{\"name\":\"8A3B5340BF7A\",\"value\":\"8A3B5340BF7A\"},{\"name\":\"8AC4A5B32373\",\"value\":\"8AC4A5B32373\"},{\"name\":\"9GFREPAVG6HZ\",\"value\":\"9GFREPAVG6HZ\"},{\"name\":\"A54520F7A30B\",\"value\":\"A54520F7A30B\"},{\"name\":\"A604B970190F\",\"value\":\"A604B970190F\"},{\"name\":\"AQ297KQMVM8U\",\"value\":\"AQ297KQMVM8U\"},{\"name\":\"B29847A544D9\",\"value\":\"B29847A544D9\"},{\"name\":\"BA4AA96D1F7F\",\"value\":\"BA4AA96D1F7F\"},{\"name\":\"BC99D35DDB12\",\"value\":\"BC99D35DDB12\"},{\"name\":\"BDD984570CEF\",\"value\":\"BDD984570CEF\"},{\"name\":\"DDCE5C51D3E1\",\"value\":\"DDCE5C51D3E1\"},{\"name\":\"E24G1S1A5U15\",\"value\":\"E24G1S1A5U15\"},{\"name\":\"EFE327521EE1\",\"value\":\"EFE327521EE1\"},{\"name\":\"EYO5KARRH4VI\",\"value\":\"EYO5KARRH4VI\"},{\"name\":\"FB2089863267\",\"value\":\"FB2089863267\"},{\"name\":\"FCEAD07C89F0\",\"value\":\"FCEAD07C89F0\"},{\"name\":\"GPIV5M3F6TWZ\",\"value\":\"GPIV5M3F6TWZ\"},{\"name\":\"KPEZCYPHISO8\",\"value\":\"KPEZCYPHISO8\"},{\"name\":\"L9J8316ZOW3P\",\"value\":\"L9J8316ZOW3P\"},{\"name\":\"LETSBYHU5T3R\",\"value\":\"LETSBYHU5T3R\"},{\"name\":\"N4F33P0U2R27\",\"value\":\"N4F33P0U2R27\"},{\"name\":\"NKYS4OCPGRXN\",\"value\":\"NKYS4OCPGRXN\"},{\"name\":\"RD6GN6RGO7JF\",\"value\":\"RD6GN6RGO7JF\"},{\"name\":\"SNNYQYS1O093\",\"value\":\"SNNYQYS1O093\"},{\"name\":\"STZKIU2EZMWS\",\"value\":\"STZKIU2EZMWS\"},{\"name\":\"T6YG5A92DKJW\",\"value\":\"T6YG5A92DKJW\"},{\"name\":\"U5OS0F2ZXC31\",\"value\":\"U5OS0F2ZXC31\"},{\"name\":\"UU0T33XGU9UZ\",\"value\":\"UU0T33XGU9UZ\"},{\"name\":\"UUKSVHNQJKBW\",\"value\":\"UUKSVHNQJKBW\"}],\"name\":\"uid\"},\"selections\":[{\"name\":\"question\",\"value\":\"\"}],\"itemDefinition\":{\"uid\":\"CF344E20E9AC\"}}"
|
40
|
+
http_version: "1.1"
|
41
|
+
- !ruby/struct:VCR::HTTPInteraction
|
42
|
+
request: !ruby/struct:VCR::Request
|
43
|
+
method: post
|
44
|
+
uri: https://stage.amee.com:443/profiles/8YUXNC2S1KDB/test/apitests
|
45
|
+
body: dataItemUid=0N5G8ZU3WS41
|
46
|
+
headers:
|
47
|
+
accept:
|
48
|
+
- application/json
|
49
|
+
cookie:
|
50
|
+
- AuthToken=JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
51
|
+
authtoken:
|
52
|
+
- JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
53
|
+
response: !ruby/struct:VCR::Response
|
54
|
+
status: !ruby/struct:VCR::ResponseStatus
|
55
|
+
code: 201
|
56
|
+
message: Created
|
57
|
+
headers:
|
58
|
+
location:
|
59
|
+
- https://stage.amee.com/profiles/8YUXNC2S1KDB/test/apitests/BWVECUBKYLYO
|
60
|
+
content-type:
|
61
|
+
- text/plain
|
62
|
+
via:
|
63
|
+
- 1.1 stage.amee.com
|
64
|
+
server:
|
65
|
+
- Noelios-Restlet-Engine/1.1.10
|
66
|
+
date:
|
67
|
+
- Mon, 28 Nov 2011 01:23:56 GMT
|
68
|
+
content-length:
|
69
|
+
- "0"
|
70
|
+
set-cookie:
|
71
|
+
- authToken=/GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyEqVhcMQB6jrz2KWs+I9i2oRvyuCilIBBQApC9u/cUpr6RiPxbEpCkJ2+DjCdd9H/Y=; Path=/
|
72
|
+
authtoken:
|
73
|
+
- /GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyEqVhcMQB6jrz2KWs+I9i2oRvyuCilIBBQApC9u/cUpr6RiPxbEpCkJ2+DjCdd9H/Y=
|
74
|
+
body:
|
75
|
+
http_version: "1.1"
|
76
|
+
- !ruby/struct:VCR::HTTPInteraction
|
77
|
+
request: !ruby/struct:VCR::Request
|
78
|
+
method: put
|
79
|
+
uri: https://stage.amee.com:443/profiles/8YUXNC2S1KDB/test/apitests/BWVECUBKYLYO
|
80
|
+
body: dataItemUid=0N5G8ZU3WS41
|
81
|
+
headers:
|
82
|
+
accept:
|
83
|
+
- application/json
|
84
|
+
cookie:
|
85
|
+
- AuthToken=JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
86
|
+
authtoken:
|
87
|
+
- JbPhZh2bbduzF3r9cGb3YKW3gF4ZHTetT2YmsHksnPbvrzQFhmBfyin7yAJi53zp+N2jWuEK1m9gtIuNcz2u3QZakEjT/SezOAp/DOzn5I4=
|
88
|
+
response: !ruby/struct:VCR::Response
|
89
|
+
status: !ruby/struct:VCR::ResponseStatus
|
90
|
+
code: 200
|
91
|
+
message: OK
|
92
|
+
headers:
|
93
|
+
content-type:
|
94
|
+
- text/plain
|
95
|
+
via:
|
96
|
+
- 1.1 stage.amee.com
|
97
|
+
server:
|
98
|
+
- Noelios-Restlet-Engine/1.1.10
|
99
|
+
date:
|
100
|
+
- Mon, 28 Nov 2011 01:23:56 GMT
|
101
|
+
content-length:
|
102
|
+
- "0"
|
103
|
+
set-cookie:
|
104
|
+
- authToken=/GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyEDld3B5QhnVBpC2ZDdj8H/SJRKlfW02J7qEuKEXqfxpJBZ7PrFAqK0qRp46d5qmK8=; Path=/
|
105
|
+
authtoken:
|
106
|
+
- /GtLagog4PlDX3b2A4Hn4msb+XB9vhnjNR1dRJXCFyEDld3B5QhnVBpC2ZDdj8H/SJRKlfW02J7qEuKEXqfxpJBZ7PrFAqK0qRp46d5qmK8=
|
107
|
+
body:
|
108
|
+
http_version: "1.1"
|
@@ -0,0 +1,29 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: post
|
5
|
+
uri: https://stage.amee.com:443/auth/signIn
|
6
|
+
body: username=wrong&password=details
|
7
|
+
headers:
|
8
|
+
accept:
|
9
|
+
- application/xml
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
content-type:
|
16
|
+
- text/plain
|
17
|
+
via:
|
18
|
+
- 1.1 stage.amee.com
|
19
|
+
server:
|
20
|
+
- Noelios-Restlet-Engine/1.1.10
|
21
|
+
date:
|
22
|
+
- Mon, 28 Nov 2011 01:25:47 GMT
|
23
|
+
content-length:
|
24
|
+
- "0"
|
25
|
+
set-cookie:
|
26
|
+
- authToken=; Path=/; Expires=Monday, 28-Nov-11 01:25:47 GMT
|
27
|
+
- authToken=; Path=/; Expires=Monday, 28-Nov-11 01:25:47 GMT
|
28
|
+
body:
|
29
|
+
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: https://stage.amee.com:443/
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
accept:
|
9
|
+
- application/json
|
10
|
+
cookie:
|
11
|
+
- authToken=
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 406
|
15
|
+
message: Not Acceptable
|
16
|
+
headers:
|
17
|
+
via:
|
18
|
+
- 1.1 stage.amee.com
|
19
|
+
content-type:
|
20
|
+
- application/json; charset=UTF-8
|
21
|
+
server:
|
22
|
+
- Noelios-Restlet-Engine/1.1.10
|
23
|
+
date:
|
24
|
+
- Wed, 23 Nov 2011 10:29:09 GMT
|
25
|
+
content-length:
|
26
|
+
- "325"
|
27
|
+
set-cookie:
|
28
|
+
- authToken=; Path=/; Expires=Wednesday, 23-Nov-11 10:29:09 GMT
|
29
|
+
vary:
|
30
|
+
- Accept-Charset,Accept-Encoding,Accept-Language,Accept
|
31
|
+
body: "{\"status\":{\"description\":\"The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request\",\"name\":\"Not Acceptable\",\"code\":406,\"uri\":\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7\"}}"
|
32
|
+
http_version: "1.1"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: post
|
5
|
+
uri: https://badservername.example.com:443/auth/signIn
|
6
|
+
body: username=<AMEE_V2_API_KEY>&password=<AMEE_V2_PASSWORD>
|
7
|
+
headers:
|
8
|
+
accept:
|
9
|
+
- application/xml
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 0
|
13
|
+
message:
|
14
|
+
headers:
|
15
|
+
body:
|
16
|
+
http_version: "1.1"
|
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: post
|
5
|
+
uri: https://stage.amee.com:443/auth/signIn
|
6
|
+
body: username=<AMEE_V2_API_KEY>&password=<AMEE_V2_PASSWORD>
|
7
|
+
headers:
|
8
|
+
accept:
|
9
|
+
- application/xml
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
expires:
|
16
|
+
- Mon, 28 Nov 2011 01:13:17 GMT
|
17
|
+
last-modified:
|
18
|
+
- Tue, 29 Nov 2011 01:13:17 GMT
|
19
|
+
content-type:
|
20
|
+
- application/xml; charset=UTF-8
|
21
|
+
via:
|
22
|
+
- 1.1 stage.amee.com
|
23
|
+
server:
|
24
|
+
- Noelios-Restlet-Engine/1.1.10
|
25
|
+
date:
|
26
|
+
- Tue, 29 Nov 2011 01:13:17 GMT
|
27
|
+
set-cookie:
|
28
|
+
- authToken=/0ofRZmnfXmNbI9NOWg5uGZVX6nP7DFKDSeOUuVGhASi0NxWpogmzumJHmHi8YuNKEKYAD0qOiNJcq8R5vncNvJiW0Vtzn3IYEDvt+wYkGY=; Path=/
|
29
|
+
authtoken:
|
30
|
+
- /0ofRZmnfXmNbI9NOWg5uGZVX6nP7DFKDSeOUuVGhASi0NxWpogmzumJHmHi8YuNKEKYAD0qOiNJcq8R5vncNvJiW0Vtzn3IYEDvt+wYkGY=
|
31
|
+
vary:
|
32
|
+
- Accept-Charset,Accept-Encoding,Accept-Language,Accept
|
33
|
+
transfer-encoding:
|
34
|
+
- chunked
|
35
|
+
body: <?xml version="1.0" encoding="UTF-8" standalone="no"?><Resources><SignInResource><Next>/auth</Next><User uid="58F26PHHLFEB"><Status>ACTIVE</Status><Type>STANDARD</Type><ApiVersion>2.0</ApiVersion><Locale>en_GB</Locale><TimeZone>UTC</TimeZone></User></SignInResource></Resources>
|
36
|
+
http_version: "1.1"
|