amee 4.3.2 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/CHANGELOG.txt +6 -0
  2. data/Gemfile +7 -1
  3. data/Rakefile +2 -0
  4. data/VERSION +1 -1
  5. data/amee.gemspec +57 -6
  6. data/amee_test_credentials.example.yml +11 -0
  7. data/cassettes/AMEE_Connection/v2/raising_unhandled_errors.yml +36 -0
  8. data/cassettes/AMEE_Connection/v3/retries/502.yml +36 -0
  9. data/cassettes/AMEE_Connection/v3/retries/503.yml +36 -0
  10. data/cassettes/AMEE_Connection/v3/retries/504.yml +36 -0
  11. data/cassettes/AMEE_Connection/v3/retries/AMEE_TimeOut.yml +36 -0
  12. data/cassettes/AMEE_Connection/v3/should_be_able_to_get_from_meta_server.yml +30 -0
  13. data/cassettes/AMEE_Connection/v3/should_be_able_to_handle_failed_gets_from_meta_server.yml +30 -0
  14. data/cassettes/AMEE_Connection/v3/should_be_able_to_post_to_meta_server.yml +59 -0
  15. data/cassettes/AMEE_Connection/v3/should_have_a_connection_to_meta_server.yml +36 -0
  16. data/cassettes/AMEE_Connection/v3/should_login_and_know_the_path_to_the_server.yml +36 -0
  17. data/cassettes/AMEE_Connection_Caching_Off/authenticating.yml +36 -0
  18. data/cassettes/AMEE_Connection_Caching_Off/first_request.yml +40 -0
  19. data/cassettes/AMEE_Connection_Caching_Off/second_request.yml +40 -0
  20. data/cassettes/AMEE_Connection_Caching_On/authenticating.yml +36 -0
  21. data/cassettes/AMEE_Connection_Caching_On/first_request.yml +40 -0
  22. data/cassettes/AMEE_Connection_Caching_clear_all/second_request.yml +40 -0
  23. data/cassettes/AMEE_Connection_Caching_clear_manually/second_request.yml +40 -0
  24. data/cassettes/AMEE_Connection_Caching_further_down_tree/second_request.yml +79 -0
  25. data/cassettes/AMEE_Connection_with_authentication/handling_404s.yml +69 -0
  26. data/cassettes/AMEE_Connection_with_authentication/hitting_private_urls.yml +75 -0
  27. data/cassettes/AMEE_Connection_with_authentication/raising_errors_if_permission_denied.yml +69 -0
  28. data/cassettes/AMEE_Connection_with_authentication/should_re-authenticate_and_refresh_authtoken_when_authtoken_expires.yml +104 -0
  29. data/cassettes/AMEE_Connection_with_authentication/should_refresh_authtoken_when_authtoken_is_changed.yml +114 -0
  30. data/cassettes/AMEE_Connection_with_authentication/using_a_v1_key.yml +71 -0
  31. data/cassettes/AMEE_Connection_with_authentication/using_a_v2_key/detects_the_API_version_for_JSON.yml +36 -0
  32. data/cassettes/AMEE_Connection_with_authentication/using_a_v2_key/detects_the_API_version_for_XML.yml +36 -0
  33. data/cassettes/AMEE_Connection_with_authentication_doing_write-requests.yml +75 -0
  34. data/cassettes/AMEE_Connection_with_authentication_doing_write-requests/working_with_an_existing_profile/deleting_existing_items.yml +108 -0
  35. data/cassettes/AMEE_Connection_with_authentication_doing_write-requests/working_with_an_existing_profile/sending_updates_to_existing_items.yml +108 -0
  36. data/cassettes/AMEE_Connection_with_bad_authentication_information/hitting_a_private_url.yml +29 -0
  37. data/cassettes/AMEE_Connection_with_bad_authentication_information/hitting_a_public_url.yml +32 -0
  38. data/cassettes/AMEE_Connection_with_incorrect_server_name.yml +16 -0
  39. data/cassettes/AMEE_Connection_with_retry_enabled.yml +36 -0
  40. data/lib/amee/connection.rb +234 -110
  41. data/lib/amee/data_category.rb +2 -2
  42. data/lib/amee/data_item.rb +45 -2
  43. data/lib/amee/data_item_value.rb +1 -1
  44. data/lib/amee/exceptions.rb +5 -2
  45. data/lib/amee/parse_helper.rb +2 -0
  46. data/lib/amee/profile_item.rb +6 -2
  47. data/lib/amee/v3/connection.rb +77 -70
  48. data/lib/amee/v3/item_value_definition.rb +1 -1
  49. data/lib/amee/v3/return_value_definition.rb +1 -1
  50. data/spec/cache_spec.rb +107 -48
  51. data/spec/connection_spec.rb +224 -183
  52. data/spec/data_item_spec.rb +12 -0
  53. data/spec/data_item_value_history_spec.rb +4 -4
  54. data/spec/data_item_value_spec.rb +2 -2
  55. data/spec/fixtures/AD63A83B4D41.json +1 -1
  56. data/spec/fixtures/AD63A83B4D41.xml +1 -1
  57. data/spec/profile_item_spec.rb +14 -10
  58. data/spec/spec_helper.rb +29 -0
  59. data/spec/v3/connection_spec.rb +77 -65
  60. data/spec/v3/item_value_definition_spec.rb +1 -0
  61. data/spec/v3/return_value_definition_spec.rb +1 -1
  62. metadata +140 -24
  63. 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_V3_API_KEY>&password=<AMEE_V3_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 22:59:27 GMT
17
+ last-modified:
18
+ - Mon, 28 Nov 2011 22:59:27 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 22:59:27 GMT
27
+ set-cookie:
28
+ - authToken=QVrVlNyNpBjlDUx9Yb+G+5BMdLZv+mbTNrVzRjMnG/t/rUJ7/AqS+YJYxzOVXAsM+zvmdSTKAeey2qXrgJ+FiLrA+pl/DNY9U9E8KiODwTY=; Path=/
29
+ authtoken:
30
+ - QVrVlNyNpBjlDUx9Yb+G+5BMdLZv+mbTNrVzRjMnG/t/rUJ7/AqS+YJYxzOVXAsM+zvmdSTKAeey2qXrgJ+FiLrA+pl/DNY9U9E8KiODwTY=
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="9D376C97D76F"><Status>ACTIVE</Status><Type>STANDARD</Type><ApiVersion>2.0</ApiVersion><Locale>en_GB</Locale><TimeZone>Europe/London</TimeZone></User></SignInResource></Resources>
36
+ 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_V3_API_KEY>&password=<AMEE_V3_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 22:59:27 GMT
17
+ last-modified:
18
+ - Mon, 28 Nov 2011 22:59:27 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 22:59:27 GMT
27
+ set-cookie:
28
+ - authToken=4iVug0Nx3N+F/xHPBmUzFEoPYC/QHULCrlw9iM+O4Lywov1gSispAwyf8YkWyWfUVpagMW2Vq28YmLbyPDSJNVj1cY8BmMdhbPFbrpgEryI=; Path=/
29
+ authtoken:
30
+ - 4iVug0Nx3N+F/xHPBmUzFEoPYC/QHULCrlw9iM+O4Lywov1gSispAwyf8YkWyWfUVpagMW2Vq28YmLbyPDSJNVj1cY8BmMdhbPFbrpgEryI=
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="9D376C97D76F"><Status>ACTIVE</Status><Type>STANDARD</Type><ApiVersion>2.0</ApiVersion><Locale>en_GB</Locale><TimeZone>Europe/London</TimeZone></User></SignInResource></Resources>
36
+ 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
+ - Sun, 27 Nov 2011 00:29:12 GMT
17
+ last-modified:
18
+ - Mon, 28 Nov 2011 00:29:12 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 00:29:12 GMT
27
+ set-cookie:
28
+ - authToken=BbWxnaWcPONGvJ6nL3YTw1qT1DCOSJVpAnJk3GbpBNLNYRdVhJw0lorzK1zoZTqKpODaWab9yyjkehCuKSgS5XUQP1YhVaaEM3P4/wB2Brs=; Path=/
29
+ authtoken:
30
+ - BbWxnaWcPONGvJ6nL3YTw1qT1DCOSJVpAnJk3GbpBNLNYRdVhJw0lorzK1zoZTqKpODaWab9yyjkehCuKSgS5XUQP1YhVaaEM3P4/wB2Brs=
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,40 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: get
5
+ uri: https://stage.amee.com:443/data/home/energy/quantity?itemsPerPage=10
6
+ body:
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ cookie:
11
+ - AuthToken=BbWxnaWcPONGvJ6nL3YTw1qT1DCOSJVpAnJk3GbpBNLNYRdVhJw0lorzK1zoZTqKpODaWab9yyjkehCuKSgS5XUQP1YhVaaEM3P4/wB2Brs=
12
+ authtoken:
13
+ - BbWxnaWcPONGvJ6nL3YTw1qT1DCOSJVpAnJk3GbpBNLNYRdVhJw0lorzK1zoZTqKpODaWab9yyjkehCuKSgS5XUQP1YhVaaEM3P4/wB2Brs=
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 00:29:12 GMT
21
+ last-modified:
22
+ - Mon, 28 Nov 2011 00:29:12 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 00:29:12 GMT
31
+ content-length:
32
+ - "4349"
33
+ set-cookie:
34
+ - authToken=BbWxnaWcPONGvJ6nL3YTw1qT1DCOSJVpAnJk3GbpBNLNYRdVhJw0lorzK1zoZTqKpODaWab9yyjkehCuKSgS5XUQP1YhVaaEM3P4/wB2Brs=; Path=/
35
+ authtoken:
36
+ - BbWxnaWcPONGvJ6nL3YTw1qT1DCOSJVpAnJk3GbpBNLNYRdVhJw0lorzK1zoZTqKpODaWab9yyjkehCuKSgS5XUQP1YhVaaEM3P4/wB2Brs=
37
+ vary:
38
+ - Accept-Charset,Accept-Encoding,Accept-Language,Accept
39
+ body: "{\"apiVersion\":\"2.0\",\"dataCategory\":{\"uid\":\"A92693A99BAD\",\"dataCategory\":{\"uid\":\"30BA55A0C472\",\"deprecated\":false,\"name\":\"Energy\",\"path\":\"energy\"},\"deprecated\":false,\"environment\":{\"uid\":\"5F5887BCF726\",\"itemsPerFeed\":10,\"description\":\"\",\"name\":\"AMEE\",\"owner\":\"\",\"path\":\"\",\"itemsPerPage\":10},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Quantity\",\"path\":\"quantity\",\"itemDefinition\":{\"uid\":\"212C818D8F16\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Energy Quantity\",\"drillDown\":\"type\",\"modified\":\"2011-02-16 08:00:50.0\"},\"modified\":\"2011-02-16 08:02:10.0\"},\"path\":\"/home/energy/quantity\",\"children\":{\"pager\":{\"to\":10,\"lastPage\":2,\"nextPage\":2,\"items\":12,\"start\":0,\"itemsFound\":10,\"requestedPage\":1,\"currentPage\":1,\"from\":1,\"itemsPerPage\":10,\"previousPage\":-1},\"dataItems\":{\"label\":\"DataItems\",\"rows\":[{\"uid\":\"878854C275BC\",\"startDate\":\"\",\"kgCO2PerKg\":\"\",\"kgCO2PerKWh\":\"\",\"source\":\"net CV RME-type Wells to wheels/European Commission/JRC 2006 http://ies.jrc.ec.europa.eu/our-activities/support-to-eu-policies/well-to-wheels-analysis/WTW.html\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"878854C275BC\",\"endDate\":\"\",\"label\":\"biodiesel\",\"kgCO2PerLitre\":\"2.5\",\"type\":\"biodiesel\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"CFA7F3896189\",\"startDate\":\"\",\"kgCO2PerKg\":\"0.1215\",\"kgCO2PerKWh\":\"0.0263\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"CFA7F3896189\",\"endDate\":\"\",\"label\":\"biomass\",\"kgCO2PerLitre\":\"\",\"type\":\"biomass\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"A70149AF0F26\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.5063\",\"kgCO2PerKWh\":\"0.3114\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"A70149AF0F26\",\"endDate\":\"\",\"label\":\"coal\",\"kgCO2PerLitre\":\"\",\"type\":\"coal\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"0093104E595C\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.81\",\"kgCO2PerKWh\":\"0.349\",\"source\":\"defra/amee 2008\",\"created\":\"2008-09-22 09:24:16.0\",\"path\":\"0093104E595C\",\"endDate\":\"\",\"label\":\"coking coal\",\"kgCO2PerLitre\":\"\",\"type\":\"coking coal\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"D6C9BC81155D\",\"startDate\":\"\",\"kgCO2PerKg\":\"3.1643\",\"kgCO2PerKWh\":\"0.2748\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"D6C9BC81155D\",\"endDate\":\"\",\"label\":\"diesel\",\"kgCO2PerLitre\":\"2.6391\",\"type\":\"diesel\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"CDC2A0BA8DF3\",\"startDate\":\"\",\"kgCO2PerKg\":\"\",\"kgCO2PerKWh\":\"\",\"source\":\"uses data in /home/energy/electricity\",\"created\":\"2008-10-22 06:24:32.0\",\"path\":\"CDC2A0BA8DF3\",\"endDate\":\"\",\"label\":\"electricity\",\"kgCO2PerLitre\":\"\",\"type\":\"electricity\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"66056991EE23\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.6935\",\"kgCO2PerKWh\":\"0.2037\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"66056991EE23\",\"endDate\":\"\",\"label\":\"gas\",\"kgCO2PerLitre\":\"0.0020091\",\"type\":\"gas\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"67D147AF530B\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.4269\",\"kgCO2PerKWh\":\"0.1836\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2009-07-09 14:53:18.0\",\"path\":\"67D147AF530B\",\"endDate\":\"\",\"label\":\"gas gross CV\",\"kgCO2PerLitre\":\"0.0018102\",\"type\":\"gas gross CV\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"C024BCE859BB\",\"startDate\":\"\",\"kgCO2PerKg\":\"3.1496\",\"kgCO2PerKWh\":\"0.2584\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"C024BCE859BB\",\"endDate\":\"\",\"label\":\"kerosene\",\"kgCO2PerLitre\":\"2.5278\",\"type\":\"kerosene\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"26709055568C\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.9424\",\"kgCO2PerKWh\":\"0.2255\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"26709055568C\",\"endDate\":\"\",\"label\":\"lpg\",\"kgCO2PerLitre\":\"1.4951\",\"type\":\"lpg\",\"modified\":\"2009-09-10 10:08:00.0\"}]},\"dataCategories\":[]}}"
40
+ http_version: "1.1"
@@ -0,0 +1,40 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: get
5
+ uri: https://stage.amee.com:443/data/home/energy/quantity?itemsPerPage=10
6
+ body:
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ cookie:
11
+ - AuthToken=BbWxnaWcPONGvJ6nL3YTw1qT1DCOSJVpAnJk3GbpBNLNYRdVhJw0lorzK1zoZTqKpODaWab9yyjkehCuKSgS5XUQP1YhVaaEM3P4/wB2Brs=
12
+ authtoken:
13
+ - BbWxnaWcPONGvJ6nL3YTw1qT1DCOSJVpAnJk3GbpBNLNYRdVhJw0lorzK1zoZTqKpODaWab9yyjkehCuKSgS5XUQP1YhVaaEM3P4/wB2Brs=
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 00:29:12 GMT
21
+ last-modified:
22
+ - Mon, 28 Nov 2011 00:29:12 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 00:29:12 GMT
31
+ content-length:
32
+ - "4349"
33
+ set-cookie:
34
+ - authToken=BbWxnaWcPONGvJ6nL3YTw1qT1DCOSJVpAnJk3GbpBNLNYRdVhJw0lorzK1zoZTqKpODaWab9yyjkehCuKSgS5XUQP1YhVaaEM3P4/wB2Brs=; Path=/
35
+ authtoken:
36
+ - BbWxnaWcPONGvJ6nL3YTw1qT1DCOSJVpAnJk3GbpBNLNYRdVhJw0lorzK1zoZTqKpODaWab9yyjkehCuKSgS5XUQP1YhVaaEM3P4/wB2Brs=
37
+ vary:
38
+ - Accept-Charset,Accept-Encoding,Accept-Language,Accept
39
+ body: "{\"apiVersion\":\"2.0\",\"dataCategory\":{\"uid\":\"A92693A99BAD\",\"dataCategory\":{\"uid\":\"30BA55A0C472\",\"deprecated\":false,\"name\":\"Energy\",\"path\":\"energy\"},\"deprecated\":false,\"environment\":{\"uid\":\"5F5887BCF726\",\"itemsPerFeed\":10,\"description\":\"\",\"name\":\"AMEE\",\"owner\":\"\",\"path\":\"\",\"itemsPerPage\":10},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Quantity\",\"path\":\"quantity\",\"itemDefinition\":{\"uid\":\"212C818D8F16\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Energy Quantity\",\"drillDown\":\"type\",\"modified\":\"2011-02-16 08:00:50.0\"},\"modified\":\"2011-02-16 08:02:10.0\"},\"path\":\"/home/energy/quantity\",\"children\":{\"pager\":{\"to\":10,\"lastPage\":2,\"nextPage\":2,\"items\":12,\"start\":0,\"itemsFound\":10,\"requestedPage\":1,\"currentPage\":1,\"from\":1,\"itemsPerPage\":10,\"previousPage\":-1},\"dataItems\":{\"label\":\"DataItems\",\"rows\":[{\"uid\":\"878854C275BC\",\"startDate\":\"\",\"kgCO2PerKg\":\"\",\"kgCO2PerKWh\":\"\",\"source\":\"net CV RME-type Wells to wheels/European Commission/JRC 2006 http://ies.jrc.ec.europa.eu/our-activities/support-to-eu-policies/well-to-wheels-analysis/WTW.html\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"878854C275BC\",\"endDate\":\"\",\"label\":\"biodiesel\",\"kgCO2PerLitre\":\"2.5\",\"type\":\"biodiesel\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"CFA7F3896189\",\"startDate\":\"\",\"kgCO2PerKg\":\"0.1215\",\"kgCO2PerKWh\":\"0.0263\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"CFA7F3896189\",\"endDate\":\"\",\"label\":\"biomass\",\"kgCO2PerLitre\":\"\",\"type\":\"biomass\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"A70149AF0F26\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.5063\",\"kgCO2PerKWh\":\"0.3114\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"A70149AF0F26\",\"endDate\":\"\",\"label\":\"coal\",\"kgCO2PerLitre\":\"\",\"type\":\"coal\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"0093104E595C\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.81\",\"kgCO2PerKWh\":\"0.349\",\"source\":\"defra/amee 2008\",\"created\":\"2008-09-22 09:24:16.0\",\"path\":\"0093104E595C\",\"endDate\":\"\",\"label\":\"coking coal\",\"kgCO2PerLitre\":\"\",\"type\":\"coking coal\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"D6C9BC81155D\",\"startDate\":\"\",\"kgCO2PerKg\":\"3.1643\",\"kgCO2PerKWh\":\"0.2748\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"D6C9BC81155D\",\"endDate\":\"\",\"label\":\"diesel\",\"kgCO2PerLitre\":\"2.6391\",\"type\":\"diesel\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"CDC2A0BA8DF3\",\"startDate\":\"\",\"kgCO2PerKg\":\"\",\"kgCO2PerKWh\":\"\",\"source\":\"uses data in /home/energy/electricity\",\"created\":\"2008-10-22 06:24:32.0\",\"path\":\"CDC2A0BA8DF3\",\"endDate\":\"\",\"label\":\"electricity\",\"kgCO2PerLitre\":\"\",\"type\":\"electricity\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"66056991EE23\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.6935\",\"kgCO2PerKWh\":\"0.2037\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"66056991EE23\",\"endDate\":\"\",\"label\":\"gas\",\"kgCO2PerLitre\":\"0.0020091\",\"type\":\"gas\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"67D147AF530B\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.4269\",\"kgCO2PerKWh\":\"0.1836\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2009-07-09 14:53:18.0\",\"path\":\"67D147AF530B\",\"endDate\":\"\",\"label\":\"gas gross CV\",\"kgCO2PerLitre\":\"0.0018102\",\"type\":\"gas gross CV\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"C024BCE859BB\",\"startDate\":\"\",\"kgCO2PerKg\":\"3.1496\",\"kgCO2PerKWh\":\"0.2584\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"C024BCE859BB\",\"endDate\":\"\",\"label\":\"kerosene\",\"kgCO2PerLitre\":\"2.5278\",\"type\":\"kerosene\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"26709055568C\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.9424\",\"kgCO2PerKWh\":\"0.2255\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"26709055568C\",\"endDate\":\"\",\"label\":\"lpg\",\"kgCO2PerLitre\":\"1.4951\",\"type\":\"lpg\",\"modified\":\"2009-09-10 10:08:00.0\"}]},\"dataCategories\":[]}}"
40
+ 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
+ - Sun, 27 Nov 2011 00:36:49 GMT
17
+ last-modified:
18
+ - Mon, 28 Nov 2011 00:36:49 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 00:36:49 GMT
27
+ set-cookie:
28
+ - authToken=7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=; Path=/
29
+ authtoken:
30
+ - 7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
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,40 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: get
5
+ uri: https://stage.amee.com:443/data/home/energy/quantity?itemsPerPage=10
6
+ body:
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ cookie:
11
+ - AuthToken=7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
12
+ authtoken:
13
+ - 7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
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 00:36:49 GMT
21
+ last-modified:
22
+ - Mon, 28 Nov 2011 00:36:49 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 00:36:49 GMT
31
+ content-length:
32
+ - "4349"
33
+ set-cookie:
34
+ - authToken=7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=; Path=/
35
+ authtoken:
36
+ - 7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
37
+ vary:
38
+ - Accept-Charset,Accept-Encoding,Accept-Language,Accept
39
+ body: "{\"apiVersion\":\"2.0\",\"dataCategory\":{\"uid\":\"A92693A99BAD\",\"dataCategory\":{\"uid\":\"30BA55A0C472\",\"deprecated\":false,\"name\":\"Energy\",\"path\":\"energy\"},\"deprecated\":false,\"environment\":{\"uid\":\"5F5887BCF726\",\"itemsPerFeed\":10,\"description\":\"\",\"name\":\"AMEE\",\"owner\":\"\",\"path\":\"\",\"itemsPerPage\":10},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Quantity\",\"path\":\"quantity\",\"itemDefinition\":{\"uid\":\"212C818D8F16\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Energy Quantity\",\"drillDown\":\"type\",\"modified\":\"2011-02-16 08:00:50.0\"},\"modified\":\"2011-02-16 08:02:10.0\"},\"path\":\"/home/energy/quantity\",\"children\":{\"pager\":{\"to\":10,\"lastPage\":2,\"nextPage\":2,\"items\":12,\"start\":0,\"itemsFound\":10,\"requestedPage\":1,\"currentPage\":1,\"from\":1,\"itemsPerPage\":10,\"previousPage\":-1},\"dataItems\":{\"label\":\"DataItems\",\"rows\":[{\"uid\":\"878854C275BC\",\"startDate\":\"\",\"kgCO2PerKg\":\"\",\"kgCO2PerKWh\":\"\",\"source\":\"net CV RME-type Wells to wheels/European Commission/JRC 2006 http://ies.jrc.ec.europa.eu/our-activities/support-to-eu-policies/well-to-wheels-analysis/WTW.html\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"878854C275BC\",\"endDate\":\"\",\"label\":\"biodiesel\",\"kgCO2PerLitre\":\"2.5\",\"type\":\"biodiesel\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"CFA7F3896189\",\"startDate\":\"\",\"kgCO2PerKg\":\"0.1215\",\"kgCO2PerKWh\":\"0.0263\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"CFA7F3896189\",\"endDate\":\"\",\"label\":\"biomass\",\"kgCO2PerLitre\":\"\",\"type\":\"biomass\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"A70149AF0F26\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.5063\",\"kgCO2PerKWh\":\"0.3114\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"A70149AF0F26\",\"endDate\":\"\",\"label\":\"coal\",\"kgCO2PerLitre\":\"\",\"type\":\"coal\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"0093104E595C\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.81\",\"kgCO2PerKWh\":\"0.349\",\"source\":\"defra/amee 2008\",\"created\":\"2008-09-22 09:24:16.0\",\"path\":\"0093104E595C\",\"endDate\":\"\",\"label\":\"coking coal\",\"kgCO2PerLitre\":\"\",\"type\":\"coking coal\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"D6C9BC81155D\",\"startDate\":\"\",\"kgCO2PerKg\":\"3.1643\",\"kgCO2PerKWh\":\"0.2748\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"D6C9BC81155D\",\"endDate\":\"\",\"label\":\"diesel\",\"kgCO2PerLitre\":\"2.6391\",\"type\":\"diesel\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"CDC2A0BA8DF3\",\"startDate\":\"\",\"kgCO2PerKg\":\"\",\"kgCO2PerKWh\":\"\",\"source\":\"uses data in /home/energy/electricity\",\"created\":\"2008-10-22 06:24:32.0\",\"path\":\"CDC2A0BA8DF3\",\"endDate\":\"\",\"label\":\"electricity\",\"kgCO2PerLitre\":\"\",\"type\":\"electricity\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"66056991EE23\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.6935\",\"kgCO2PerKWh\":\"0.2037\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"66056991EE23\",\"endDate\":\"\",\"label\":\"gas\",\"kgCO2PerLitre\":\"0.0020091\",\"type\":\"gas\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"67D147AF530B\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.4269\",\"kgCO2PerKWh\":\"0.1836\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2009-07-09 14:53:18.0\",\"path\":\"67D147AF530B\",\"endDate\":\"\",\"label\":\"gas gross CV\",\"kgCO2PerLitre\":\"0.0018102\",\"type\":\"gas gross CV\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"C024BCE859BB\",\"startDate\":\"\",\"kgCO2PerKg\":\"3.1496\",\"kgCO2PerKWh\":\"0.2584\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"C024BCE859BB\",\"endDate\":\"\",\"label\":\"kerosene\",\"kgCO2PerLitre\":\"2.5278\",\"type\":\"kerosene\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"26709055568C\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.9424\",\"kgCO2PerKWh\":\"0.2255\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"26709055568C\",\"endDate\":\"\",\"label\":\"lpg\",\"kgCO2PerLitre\":\"1.4951\",\"type\":\"lpg\",\"modified\":\"2009-09-10 10:08:00.0\"}]},\"dataCategories\":[]}}"
40
+ http_version: "1.1"
@@ -0,0 +1,40 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: get
5
+ uri: https://stage.amee.com:443/data/home/energy/quantity?itemsPerPage=10
6
+ body:
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ cookie:
11
+ - AuthToken=7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
12
+ authtoken:
13
+ - 7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
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 00:42:04 GMT
21
+ last-modified:
22
+ - Mon, 28 Nov 2011 00:42:04 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 00:42:04 GMT
31
+ content-length:
32
+ - "4349"
33
+ set-cookie:
34
+ - authToken=/GtLagog4PlDX3b2A4Hn4o5danNq168DLVLJpYM3+i57EL1VlAnxL3/qFaS3kX+BM0tbuvWQBBqWipKXzMeKHi5+tZBGUzwv4TJkPWfT+Go=; Path=/
35
+ authtoken:
36
+ - /GtLagog4PlDX3b2A4Hn4o5danNq168DLVLJpYM3+i57EL1VlAnxL3/qFaS3kX+BM0tbuvWQBBqWipKXzMeKHi5+tZBGUzwv4TJkPWfT+Go=
37
+ vary:
38
+ - Accept-Charset,Accept-Encoding,Accept-Language,Accept
39
+ body: "{\"apiVersion\":\"2.0\",\"dataCategory\":{\"uid\":\"A92693A99BAD\",\"dataCategory\":{\"uid\":\"30BA55A0C472\",\"deprecated\":false,\"name\":\"Energy\",\"path\":\"energy\"},\"deprecated\":false,\"environment\":{\"uid\":\"5F5887BCF726\",\"itemsPerFeed\":10,\"description\":\"\",\"name\":\"AMEE\",\"owner\":\"\",\"path\":\"\",\"itemsPerPage\":10},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Quantity\",\"path\":\"quantity\",\"itemDefinition\":{\"uid\":\"212C818D8F16\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Energy Quantity\",\"drillDown\":\"type\",\"modified\":\"2011-02-16 08:00:50.0\"},\"modified\":\"2011-02-16 08:02:10.0\"},\"path\":\"/home/energy/quantity\",\"children\":{\"pager\":{\"to\":10,\"lastPage\":2,\"nextPage\":2,\"items\":12,\"start\":0,\"itemsFound\":10,\"requestedPage\":1,\"currentPage\":1,\"from\":1,\"itemsPerPage\":10,\"previousPage\":-1},\"dataItems\":{\"label\":\"DataItems\",\"rows\":[{\"uid\":\"878854C275BC\",\"startDate\":\"\",\"kgCO2PerKg\":\"\",\"kgCO2PerKWh\":\"\",\"source\":\"net CV RME-type Wells to wheels/European Commission/JRC 2006 http://ies.jrc.ec.europa.eu/our-activities/support-to-eu-policies/well-to-wheels-analysis/WTW.html\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"878854C275BC\",\"endDate\":\"\",\"label\":\"biodiesel\",\"kgCO2PerLitre\":\"2.5\",\"type\":\"biodiesel\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"CFA7F3896189\",\"startDate\":\"\",\"kgCO2PerKg\":\"0.1215\",\"kgCO2PerKWh\":\"0.0263\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"CFA7F3896189\",\"endDate\":\"\",\"label\":\"biomass\",\"kgCO2PerLitre\":\"\",\"type\":\"biomass\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"A70149AF0F26\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.5063\",\"kgCO2PerKWh\":\"0.3114\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"A70149AF0F26\",\"endDate\":\"\",\"label\":\"coal\",\"kgCO2PerLitre\":\"\",\"type\":\"coal\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"0093104E595C\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.81\",\"kgCO2PerKWh\":\"0.349\",\"source\":\"defra/amee 2008\",\"created\":\"2008-09-22 09:24:16.0\",\"path\":\"0093104E595C\",\"endDate\":\"\",\"label\":\"coking coal\",\"kgCO2PerLitre\":\"\",\"type\":\"coking coal\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"D6C9BC81155D\",\"startDate\":\"\",\"kgCO2PerKg\":\"3.1643\",\"kgCO2PerKWh\":\"0.2748\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"D6C9BC81155D\",\"endDate\":\"\",\"label\":\"diesel\",\"kgCO2PerLitre\":\"2.6391\",\"type\":\"diesel\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"CDC2A0BA8DF3\",\"startDate\":\"\",\"kgCO2PerKg\":\"\",\"kgCO2PerKWh\":\"\",\"source\":\"uses data in /home/energy/electricity\",\"created\":\"2008-10-22 06:24:32.0\",\"path\":\"CDC2A0BA8DF3\",\"endDate\":\"\",\"label\":\"electricity\",\"kgCO2PerLitre\":\"\",\"type\":\"electricity\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"66056991EE23\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.6935\",\"kgCO2PerKWh\":\"0.2037\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"66056991EE23\",\"endDate\":\"\",\"label\":\"gas\",\"kgCO2PerLitre\":\"0.0020091\",\"type\":\"gas\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"67D147AF530B\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.4269\",\"kgCO2PerKWh\":\"0.1836\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2009-07-09 14:53:18.0\",\"path\":\"67D147AF530B\",\"endDate\":\"\",\"label\":\"gas gross CV\",\"kgCO2PerLitre\":\"0.0018102\",\"type\":\"gas gross CV\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"C024BCE859BB\",\"startDate\":\"\",\"kgCO2PerKg\":\"3.1496\",\"kgCO2PerKWh\":\"0.2584\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"C024BCE859BB\",\"endDate\":\"\",\"label\":\"kerosene\",\"kgCO2PerLitre\":\"2.5278\",\"type\":\"kerosene\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"26709055568C\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.9424\",\"kgCO2PerKWh\":\"0.2255\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"26709055568C\",\"endDate\":\"\",\"label\":\"lpg\",\"kgCO2PerLitre\":\"1.4951\",\"type\":\"lpg\",\"modified\":\"2009-09-10 10:08:00.0\"}]},\"dataCategories\":[]}}"
40
+ http_version: "1.1"
@@ -0,0 +1,40 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: get
5
+ uri: https://stage.amee.com:443/data/home/energy/quantity?itemsPerPage=10
6
+ body:
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ cookie:
11
+ - AuthToken=7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
12
+ authtoken:
13
+ - 7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
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 00:46:43 GMT
21
+ last-modified:
22
+ - Mon, 28 Nov 2011 00:46:43 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 00:46:43 GMT
31
+ content-length:
32
+ - "4349"
33
+ set-cookie:
34
+ - authToken=/GtLagog4PlDX3b2A4Hn4o5danNq168DLVLJpYM3+i7wwh3RRZM0P0nD3xeI5QrBlFhtGrqtDmSis1dGlBADtS2+JX8R7FO2nyu1M/DjFyM=; Path=/
35
+ authtoken:
36
+ - /GtLagog4PlDX3b2A4Hn4o5danNq168DLVLJpYM3+i7wwh3RRZM0P0nD3xeI5QrBlFhtGrqtDmSis1dGlBADtS2+JX8R7FO2nyu1M/DjFyM=
37
+ vary:
38
+ - Accept-Charset,Accept-Encoding,Accept-Language,Accept
39
+ body: "{\"apiVersion\":\"2.0\",\"dataCategory\":{\"uid\":\"A92693A99BAD\",\"dataCategory\":{\"uid\":\"30BA55A0C472\",\"deprecated\":false,\"name\":\"Energy\",\"path\":\"energy\"},\"deprecated\":false,\"environment\":{\"uid\":\"5F5887BCF726\",\"itemsPerFeed\":10,\"description\":\"\",\"name\":\"AMEE\",\"owner\":\"\",\"path\":\"\",\"itemsPerPage\":10},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Quantity\",\"path\":\"quantity\",\"itemDefinition\":{\"uid\":\"212C818D8F16\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Energy Quantity\",\"drillDown\":\"type\",\"modified\":\"2011-02-16 08:00:50.0\"},\"modified\":\"2011-02-16 08:02:10.0\"},\"path\":\"/home/energy/quantity\",\"children\":{\"pager\":{\"to\":10,\"lastPage\":2,\"nextPage\":2,\"items\":12,\"start\":0,\"itemsFound\":10,\"requestedPage\":1,\"currentPage\":1,\"from\":1,\"itemsPerPage\":10,\"previousPage\":-1},\"dataItems\":{\"label\":\"DataItems\",\"rows\":[{\"uid\":\"878854C275BC\",\"startDate\":\"\",\"kgCO2PerKg\":\"\",\"kgCO2PerKWh\":\"\",\"source\":\"net CV RME-type Wells to wheels/European Commission/JRC 2006 http://ies.jrc.ec.europa.eu/our-activities/support-to-eu-policies/well-to-wheels-analysis/WTW.html\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"878854C275BC\",\"endDate\":\"\",\"label\":\"biodiesel\",\"kgCO2PerLitre\":\"2.5\",\"type\":\"biodiesel\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"CFA7F3896189\",\"startDate\":\"\",\"kgCO2PerKg\":\"0.1215\",\"kgCO2PerKWh\":\"0.0263\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"CFA7F3896189\",\"endDate\":\"\",\"label\":\"biomass\",\"kgCO2PerLitre\":\"\",\"type\":\"biomass\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"A70149AF0F26\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.5063\",\"kgCO2PerKWh\":\"0.3114\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"A70149AF0F26\",\"endDate\":\"\",\"label\":\"coal\",\"kgCO2PerLitre\":\"\",\"type\":\"coal\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"0093104E595C\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.81\",\"kgCO2PerKWh\":\"0.349\",\"source\":\"defra/amee 2008\",\"created\":\"2008-09-22 09:24:16.0\",\"path\":\"0093104E595C\",\"endDate\":\"\",\"label\":\"coking coal\",\"kgCO2PerLitre\":\"\",\"type\":\"coking coal\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"D6C9BC81155D\",\"startDate\":\"\",\"kgCO2PerKg\":\"3.1643\",\"kgCO2PerKWh\":\"0.2748\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"D6C9BC81155D\",\"endDate\":\"\",\"label\":\"diesel\",\"kgCO2PerLitre\":\"2.6391\",\"type\":\"diesel\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"CDC2A0BA8DF3\",\"startDate\":\"\",\"kgCO2PerKg\":\"\",\"kgCO2PerKWh\":\"\",\"source\":\"uses data in /home/energy/electricity\",\"created\":\"2008-10-22 06:24:32.0\",\"path\":\"CDC2A0BA8DF3\",\"endDate\":\"\",\"label\":\"electricity\",\"kgCO2PerLitre\":\"\",\"type\":\"electricity\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"66056991EE23\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.6935\",\"kgCO2PerKWh\":\"0.2037\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"66056991EE23\",\"endDate\":\"\",\"label\":\"gas\",\"kgCO2PerLitre\":\"0.0020091\",\"type\":\"gas\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"67D147AF530B\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.4269\",\"kgCO2PerKWh\":\"0.1836\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2009-07-09 14:53:18.0\",\"path\":\"67D147AF530B\",\"endDate\":\"\",\"label\":\"gas gross CV\",\"kgCO2PerLitre\":\"0.0018102\",\"type\":\"gas gross CV\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"C024BCE859BB\",\"startDate\":\"\",\"kgCO2PerKg\":\"3.1496\",\"kgCO2PerKWh\":\"0.2584\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"C024BCE859BB\",\"endDate\":\"\",\"label\":\"kerosene\",\"kgCO2PerLitre\":\"2.5278\",\"type\":\"kerosene\",\"modified\":\"2009-09-10 10:08:00.0\"},{\"uid\":\"26709055568C\",\"startDate\":\"\",\"kgCO2PerKg\":\"2.9424\",\"kgCO2PerKWh\":\"0.2255\",\"source\":\"http://www.defra.gov.uk/environment/business/reporting/pdf/20090717-guidelines-ghg-conversion-factors.xls\",\"created\":\"2007-07-27 09:49:32.0\",\"path\":\"26709055568C\",\"endDate\":\"\",\"label\":\"lpg\",\"kgCO2PerLitre\":\"1.4951\",\"type\":\"lpg\",\"modified\":\"2009-09-10 10:08:00.0\"}]},\"dataCategories\":[]}}"
40
+ http_version: "1.1"
@@ -0,0 +1,79 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: get
5
+ uri: https://stage.amee.com:443/data/home/energy/quantity/878854C275BC
6
+ body:
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ cookie:
11
+ - AuthToken=7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
12
+ authtoken:
13
+ - 7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
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 00:50:38 GMT
21
+ last-modified:
22
+ - Mon, 28 Nov 2011 00:50:38 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 00:50:38 GMT
31
+ content-length:
32
+ - "4140"
33
+ set-cookie:
34
+ - authToken=/GtLagog4PlDX3b2A4Hn4o5danNq168DLVLJpYM3+i5gyUWNO0eW9IRXPY02HuxqaGx9wJ+fd61ZPXeoEaZhCJDg8Xf959zqYHiHR2AntIo=; Path=/
35
+ authtoken:
36
+ - /GtLagog4PlDX3b2A4Hn4o5danNq168DLVLJpYM3+i5gyUWNO0eW9IRXPY02HuxqaGx9wJ+fd61ZPXeoEaZhCJDg8Xf959zqYHiHR2AntIo=
37
+ vary:
38
+ - Accept-Charset,Accept-Encoding,Accept-Language,Accept
39
+ body: "{\"apiVersion\":\"2.0\",\"amount\":{\"unit\":\"kg/year\",\"value\":0},\"amounts\":{\"amount\":[{\"perUnit\":\"year\",\"unit\":\"kg\",\"default\":\"true\",\"value\":0,\"type\":\"CO2\"}]},\"path\":\"/home/energy/quantity/878854C275BC\",\"userValueChoices\":{\"choices\":[{\"name\":\"currentReading\",\"value\":\"0\"},{\"name\":\"energyConsumption\",\"value\":\"0\"},{\"name\":\"greenTariff\",\"value\":\"\"},{\"name\":\"includesHeating\",\"value\":\"false\"},{\"name\":\"lastReading\",\"value\":\"0\"},{\"name\":\"massPerTime\",\"value\":\"0\"},{\"name\":\"deliveries\",\"value\":\"\"},{\"name\":\"paymentFrequency\",\"value\":\"\"},{\"name\":\"season\",\"value\":\"\"},{\"name\":\"volumePerTime\",\"value\":\"0\"}],\"name\":\"userValueChoices\"},\"dataItem\":{\"uid\":\"878854C275BC\",\"startDate\":\"1970-01-01T00:00:00Z\",\"dataCategory\":{\"uid\":\"A92693A99BAD\",\"deprecated\":false,\"name\":\"Quantity\",\"path\":\"quantity\"},\"itemValues\":[{\"itemValueDefinition\":{\"uid\":\"B5AC731EF1D5\",\"name\":\"kgCO2 Per Kg\",\"fromData\":true,\"path\":\"kgCO2PerKg\",\"fromProfile\":false,\"valueDefinition\":{\"uid\":\"F066E097D76D\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"description\":\"\",\"name\":\"kgCO2PerKg\",\"valueType\":\"DECIMAL\",\"modified\":\"2007-07-27 07:30:44.0\"},\"drillDown\":false},\"perUnit\":\"\",\"uid\":\"7071F0E96196\",\"startDate\":\"1970-01-01T00:00:00Z\",\"unit\":\"\",\"name\":\"kgCO2 Per Kg\",\"value\":\"\",\"path\":\"kgCO2PerKg\",\"displayPath\":\"kgCO2PerKg\",\"displayName\":\"kgCO2 Per Kg\"},{\"itemValueDefinition\":{\"uid\":\"469C1AE4B79A\",\"name\":\"kgCO2 Per KWh\",\"fromData\":true,\"path\":\"kgCO2PerKWh\",\"fromProfile\":false,\"valueDefinition\":{\"uid\":\"3EA39C552E81\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"description\":\"\",\"name\":\"kgCO2PerKWh\",\"valueType\":\"DECIMAL\",\"modified\":\"2007-07-27 07:30:44.0\"},\"drillDown\":false},\"perUnit\":\"\",\"uid\":\"1DFEF8E6D7E5\",\"startDate\":\"1970-01-01T00:00:00Z\",\"unit\":\"\",\"name\":\"kgCO2 Per KWh\",\"value\":\"\",\"path\":\"kgCO2PerKWh\",\"displayPath\":\"kgCO2PerKWh\",\"displayName\":\"kgCO2 Per KWh\"},{\"itemValueDefinition\":{\"uid\":\"75DE0251B056\",\"name\":\"Source\",\"fromData\":true,\"path\":\"source\",\"fromProfile\":false,\"valueDefinition\":{\"uid\":\"CCEB59CACE1B\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"description\":\"\",\"name\":\"text\",\"valueType\":\"TEXT\",\"modified\":\"2007-07-27 07:30:44.0\"},\"drillDown\":false},\"perUnit\":\"\",\"uid\":\"015D3ACF02BD\",\"startDate\":\"1970-01-01T00:00:00Z\",\"unit\":\"\",\"name\":\"Source\",\"value\":\"net CV RME-type Wells to wheels/European Commission/JRC 2006 http://ies.jrc.ec.europa.eu/our-activities/support-to-eu-policies/well-to-wheels-analysis/WTW.html\",\"path\":\"source\",\"displayPath\":\"source\",\"displayName\":\"Source\"},{\"itemValueDefinition\":{\"uid\":\"EAFBD1CA93E8\",\"name\":\"kgCO2 Per Litre\",\"fromData\":true,\"path\":\"kgCO2PerLitre\",\"fromProfile\":false,\"valueDefinition\":{\"uid\":\"C809A0FE1918\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"description\":\"\",\"name\":\"kgCO2PerLitre\",\"valueType\":\"DECIMAL\",\"modified\":\"2007-07-27 07:30:44.0\"},\"drillDown\":false},\"perUnit\":\"\",\"uid\":\"219EE9D836E0\",\"startDate\":\"1970-01-01T00:00:00Z\",\"unit\":\"\",\"name\":\"kgCO2 Per Litre\",\"value\":\"2.5\",\"path\":\"kgCO2PerLitre\",\"displayPath\":\"kgCO2PerLitre\",\"displayName\":\"kgCO2 Per Litre\"},{\"itemValueDefinition\":{\"uid\":\"5DF1F01B2106\",\"name\":\"Type\",\"fromData\":true,\"path\":\"type\",\"fromProfile\":false,\"valueDefinition\":{\"uid\":\"CCEB59CACE1B\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"description\":\"\",\"name\":\"text\",\"valueType\":\"TEXT\",\"modified\":\"2007-07-27 07:30:44.0\"},\"drillDown\":true},\"perUnit\":\"\",\"uid\":\"5A46861E475C\",\"startDate\":\"1970-01-01T00:00:00Z\",\"unit\":\"\",\"name\":\"Type\",\"value\":\"biodiesel\",\"path\":\"type\",\"displayPath\":\"type\",\"displayName\":\"Type\"}],\"environment\":{\"uid\":\"5F5887BCF726\",\"itemsPerFeed\":10,\"created\":\"Fri Jul 27 08:30:44 UTC 2007\",\"description\":\"\",\"name\":\"AMEE\",\"owner\":\"\",\"path\":\"\",\"itemsPerPage\":10,\"modified\":\"Fri Jul 27 08:30:44 UTC 2007\"},\"created\":\"2007-07-27 09:49:32.0\",\"name\":\"878854C275BC\",\"path\":\"\",\"itemDefinition\":{\"uid\":\"212C818D8F16\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Energy Quantity\",\"drillDown\":\"type\",\"modified\":\"2011-02-16 08:00:50.0\"},\"endDate\":\"\",\"label\":\"biodiesel\",\"modified\":\"2009-09-10 10:08:00.0\"},\"amountPerMonth\":0}"
40
+ http_version: "1.1"
41
+ - !ruby/struct:VCR::HTTPInteraction
42
+ request: !ruby/struct:VCR::Request
43
+ method: get
44
+ uri: https://stage.amee.com:443/data/home/energy/quantity/878854C275BC
45
+ body:
46
+ headers:
47
+ accept:
48
+ - application/json
49
+ cookie:
50
+ - AuthToken=7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
51
+ authtoken:
52
+ - 7xaj94uNzpKDnVswdfe+cvbyfFn3yqTA9TWYjLkP2okAGu96iA48Y+5uCBBTmsGaCmMFmQk5UY3TtpDSdWzCOsLS2qs1hzx6dNT4+rIr42I=
53
+ response: !ruby/struct:VCR::Response
54
+ status: !ruby/struct:VCR::ResponseStatus
55
+ code: 200
56
+ message: OK
57
+ headers:
58
+ expires:
59
+ - Sun, 27 Nov 2011 00:50:39 GMT
60
+ last-modified:
61
+ - Mon, 28 Nov 2011 00:50:39 GMT
62
+ content-type:
63
+ - application/json; charset=UTF-8
64
+ via:
65
+ - 1.1 stage.amee.com
66
+ server:
67
+ - Noelios-Restlet-Engine/1.1.10
68
+ date:
69
+ - Mon, 28 Nov 2011 00:50:39 GMT
70
+ content-length:
71
+ - "4140"
72
+ set-cookie:
73
+ - authToken=/GtLagog4PlDX3b2A4Hn4o5danNq168DLVLJpYM3+i7MfFEA71I6TSUEqWo4RXzu7SRClW5j2RuTISstOP2pU4NqI9k8Y7Qf8xlNIsj2fas=; Path=/
74
+ authtoken:
75
+ - /GtLagog4PlDX3b2A4Hn4o5danNq168DLVLJpYM3+i7MfFEA71I6TSUEqWo4RXzu7SRClW5j2RuTISstOP2pU4NqI9k8Y7Qf8xlNIsj2fas=
76
+ vary:
77
+ - Accept-Charset,Accept-Encoding,Accept-Language,Accept
78
+ body: "{\"apiVersion\":\"2.0\",\"amount\":{\"unit\":\"kg/year\",\"value\":0},\"amounts\":{\"amount\":[{\"perUnit\":\"year\",\"unit\":\"kg\",\"default\":\"true\",\"value\":0,\"type\":\"CO2\"}]},\"path\":\"/home/energy/quantity/878854C275BC\",\"userValueChoices\":{\"choices\":[{\"name\":\"currentReading\",\"value\":\"0\"},{\"name\":\"energyConsumption\",\"value\":\"0\"},{\"name\":\"greenTariff\",\"value\":\"\"},{\"name\":\"includesHeating\",\"value\":\"false\"},{\"name\":\"lastReading\",\"value\":\"0\"},{\"name\":\"massPerTime\",\"value\":\"0\"},{\"name\":\"deliveries\",\"value\":\"\"},{\"name\":\"paymentFrequency\",\"value\":\"\"},{\"name\":\"season\",\"value\":\"\"},{\"name\":\"volumePerTime\",\"value\":\"0\"}],\"name\":\"userValueChoices\"},\"dataItem\":{\"uid\":\"878854C275BC\",\"startDate\":\"1970-01-01T00:00:00Z\",\"dataCategory\":{\"uid\":\"A92693A99BAD\",\"deprecated\":false,\"name\":\"Quantity\",\"path\":\"quantity\"},\"itemValues\":[{\"itemValueDefinition\":{\"uid\":\"B5AC731EF1D5\",\"name\":\"kgCO2 Per Kg\",\"fromData\":true,\"path\":\"kgCO2PerKg\",\"fromProfile\":false,\"valueDefinition\":{\"uid\":\"F066E097D76D\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"description\":\"\",\"name\":\"kgCO2PerKg\",\"valueType\":\"DECIMAL\",\"modified\":\"2007-07-27 07:30:44.0\"},\"drillDown\":false},\"perUnit\":\"\",\"uid\":\"7071F0E96196\",\"startDate\":\"1970-01-01T00:00:00Z\",\"unit\":\"\",\"name\":\"kgCO2 Per Kg\",\"value\":\"\",\"path\":\"kgCO2PerKg\",\"displayPath\":\"kgCO2PerKg\",\"displayName\":\"kgCO2 Per Kg\"},{\"itemValueDefinition\":{\"uid\":\"469C1AE4B79A\",\"name\":\"kgCO2 Per KWh\",\"fromData\":true,\"path\":\"kgCO2PerKWh\",\"fromProfile\":false,\"valueDefinition\":{\"uid\":\"3EA39C552E81\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"description\":\"\",\"name\":\"kgCO2PerKWh\",\"valueType\":\"DECIMAL\",\"modified\":\"2007-07-27 07:30:44.0\"},\"drillDown\":false},\"perUnit\":\"\",\"uid\":\"1DFEF8E6D7E5\",\"startDate\":\"1970-01-01T00:00:00Z\",\"unit\":\"\",\"name\":\"kgCO2 Per KWh\",\"value\":\"\",\"path\":\"kgCO2PerKWh\",\"displayPath\":\"kgCO2PerKWh\",\"displayName\":\"kgCO2 Per KWh\"},{\"itemValueDefinition\":{\"uid\":\"75DE0251B056\",\"name\":\"Source\",\"fromData\":true,\"path\":\"source\",\"fromProfile\":false,\"valueDefinition\":{\"uid\":\"CCEB59CACE1B\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"description\":\"\",\"name\":\"text\",\"valueType\":\"TEXT\",\"modified\":\"2007-07-27 07:30:44.0\"},\"drillDown\":false},\"perUnit\":\"\",\"uid\":\"015D3ACF02BD\",\"startDate\":\"1970-01-01T00:00:00Z\",\"unit\":\"\",\"name\":\"Source\",\"value\":\"net CV RME-type Wells to wheels/European Commission/JRC 2006 http://ies.jrc.ec.europa.eu/our-activities/support-to-eu-policies/well-to-wheels-analysis/WTW.html\",\"path\":\"source\",\"displayPath\":\"source\",\"displayName\":\"Source\"},{\"itemValueDefinition\":{\"uid\":\"EAFBD1CA93E8\",\"name\":\"kgCO2 Per Litre\",\"fromData\":true,\"path\":\"kgCO2PerLitre\",\"fromProfile\":false,\"valueDefinition\":{\"uid\":\"C809A0FE1918\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"description\":\"\",\"name\":\"kgCO2PerLitre\",\"valueType\":\"DECIMAL\",\"modified\":\"2007-07-27 07:30:44.0\"},\"drillDown\":false},\"perUnit\":\"\",\"uid\":\"219EE9D836E0\",\"startDate\":\"1970-01-01T00:00:00Z\",\"unit\":\"\",\"name\":\"kgCO2 Per Litre\",\"value\":\"2.5\",\"path\":\"kgCO2PerLitre\",\"displayPath\":\"kgCO2PerLitre\",\"displayName\":\"kgCO2 Per Litre\"},{\"itemValueDefinition\":{\"uid\":\"5DF1F01B2106\",\"name\":\"Type\",\"fromData\":true,\"path\":\"type\",\"fromProfile\":false,\"valueDefinition\":{\"uid\":\"CCEB59CACE1B\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"description\":\"\",\"name\":\"text\",\"valueType\":\"TEXT\",\"modified\":\"2007-07-27 07:30:44.0\"},\"drillDown\":true},\"perUnit\":\"\",\"uid\":\"5A46861E475C\",\"startDate\":\"1970-01-01T00:00:00Z\",\"unit\":\"\",\"name\":\"Type\",\"value\":\"biodiesel\",\"path\":\"type\",\"displayPath\":\"type\",\"displayName\":\"Type\"}],\"environment\":{\"uid\":\"5F5887BCF726\",\"itemsPerFeed\":10,\"created\":\"Fri Jul 27 08:30:44 UTC 2007\",\"description\":\"\",\"name\":\"AMEE\",\"owner\":\"\",\"path\":\"\",\"itemsPerPage\":10,\"modified\":\"Fri Jul 27 08:30:44 UTC 2007\"},\"created\":\"2007-07-27 09:49:32.0\",\"name\":\"878854C275BC\",\"path\":\"\",\"itemDefinition\":{\"uid\":\"212C818D8F16\",\"environment\":{\"uid\":\"5F5887BCF726\"},\"created\":\"2007-07-27 07:30:44.0\",\"name\":\"Energy Quantity\",\"drillDown\":\"type\",\"modified\":\"2011-02-16 08:00:50.0\"},\"endDate\":\"\",\"label\":\"biodiesel\",\"modified\":\"2009-09-10 10:08:00.0\"},\"amountPerMonth\":0}"
79
+ http_version: "1.1"
@@ -0,0 +1,69 @@
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:14:55 GMT
17
+ last-modified:
18
+ - Mon, 28 Nov 2011 01:14:55 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:14:55 GMT
27
+ set-cookie:
28
+ - authToken=ddCIbjrqHdU7lFdl3950alKnoT40xeOsU24Eng/hF5NOV3J+c+c7gDyA6+y7CV8As5aKtbrzw1mmj1ulALGjWjtWfEptjlSOb6qhX/morAs=; Path=/
29
+ authtoken:
30
+ - ddCIbjrqHdU7lFdl3950alKnoT40xeOsU24Eng/hF5NOV3J+c+c7gDyA6+y7CV8As5aKtbrzw1mmj1ulALGjWjtWfEptjlSOb6qhX/morAs=
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: get
40
+ uri: https://stage.amee.com:443/missing_url
41
+ body:
42
+ headers:
43
+ accept:
44
+ - application/json
45
+ cookie:
46
+ - AuthToken=ddCIbjrqHdU7lFdl3950alKnoT40xeOsU24Eng/hF5NOV3J+c+c7gDyA6+y7CV8As5aKtbrzw1mmj1ulALGjWjtWfEptjlSOb6qhX/morAs=
47
+ authtoken:
48
+ - ddCIbjrqHdU7lFdl3950alKnoT40xeOsU24Eng/hF5NOV3J+c+c7gDyA6+y7CV8As5aKtbrzw1mmj1ulALGjWjtWfEptjlSOb6qhX/morAs=
49
+ response: !ruby/struct:VCR::Response
50
+ status: !ruby/struct:VCR::ResponseStatus
51
+ code: 404
52
+ message: Not Found
53
+ headers:
54
+ content-type:
55
+ - application/json; charset=UTF-8
56
+ via:
57
+ - 1.1 stage.amee.com
58
+ server:
59
+ - Noelios-Restlet-Engine/1.1.10
60
+ date:
61
+ - Mon, 28 Nov 2011 01:14:55 GMT
62
+ content-length:
63
+ - "190"
64
+ set-cookie:
65
+ - authToken=ddCIbjrqHdU7lFdl3950alKnoT40xeOsU24Eng/hF5NOV3J+c+c7gDyA6+y7CV8As5aKtbrzw1mmj1ulALGjWjtWfEptjlSOb6qhX/morAs=; Path=/
66
+ authtoken:
67
+ - ddCIbjrqHdU7lFdl3950alKnoT40xeOsU24Eng/hF5NOV3J+c+c7gDyA6+y7CV8As5aKtbrzw1mmj1ulALGjWjtWfEptjlSOb6qhX/morAs=
68
+ body: "{\"status\":{\"description\":\"The server has not found anything matching the request URI\",\"name\":\"Not Found\",\"code\":404,\"uri\":\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5\"}}"
69
+ http_version: "1.1"