ideal_postcodes 2.0.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -16
  3. data/LICENSE +1 -21
  4. data/README.md +13 -332
  5. data/lib/ideal_postcodes/base_client.rb +88 -0
  6. data/lib/ideal_postcodes/client.rb +42 -0
  7. data/lib/ideal_postcodes/errors.rb +59 -0
  8. data/lib/ideal_postcodes/generated.rb +83 -0
  9. data/lib/ideal_postcodes/model.rb +73 -0
  10. data/lib/ideal_postcodes/operations.rb +866 -0
  11. data/lib/ideal_postcodes/responses/address_response.rb +19 -0
  12. data/lib/ideal_postcodes/responses/api_key_details_response.rb +21 -0
  13. data/lib/ideal_postcodes/responses/api_key_response.rb +21 -0
  14. data/lib/ideal_postcodes/responses/api_key_usage_response.rb +21 -0
  15. data/lib/ideal_postcodes/responses/autocomplete_response.rb +19 -0
  16. data/lib/ideal_postcodes/responses/cleanse_response.rb +31 -0
  17. data/lib/ideal_postcodes/responses/config_response.rb +21 -0
  18. data/lib/ideal_postcodes/responses/configs_response.rb +21 -0
  19. data/lib/ideal_postcodes/responses/delete_config_response.rb +19 -0
  20. data/lib/ideal_postcodes/responses/delete_licensee_response.rb +19 -0
  21. data/lib/ideal_postcodes/responses/email_response.rb +31 -0
  22. data/lib/ideal_postcodes/responses/gbr_resolve_address_response.rb +21 -0
  23. data/lib/ideal_postcodes/responses/licensee_response.rb +21 -0
  24. data/lib/ideal_postcodes/responses/licensees_response.rb +21 -0
  25. data/lib/ideal_postcodes/responses/phone_number_response.rb +31 -0
  26. data/lib/ideal_postcodes/responses/place_response.rb +19 -0
  27. data/lib/ideal_postcodes/responses/postcode_response.rb +30 -0
  28. data/lib/ideal_postcodes/responses/resolve_place_response.rb +24 -0
  29. data/lib/ideal_postcodes/transport.rb +61 -0
  30. data/lib/ideal_postcodes/types/ab_address.rb +283 -0
  31. data/lib/ideal_postcodes/types/abp_address.rb +674 -0
  32. data/lib/ideal_postcodes/types/address.rb +290 -0
  33. data/lib/ideal_postcodes/types/address_list_item.rb +592 -0
  34. data/lib/ideal_postcodes/types/address_result.rb +24 -0
  35. data/lib/ideal_postcodes/types/address_suggestion.rb +27 -0
  36. data/lib/ideal_postcodes/types/api_key.rb +27 -0
  37. data/lib/ideal_postcodes/types/api_key_automated_topup.rb +17 -0
  38. data/lib/ideal_postcodes/types/api_key_current_purchase.rb +27 -0
  39. data/lib/ideal_postcodes/types/api_key_daily_limit.rb +21 -0
  40. data/lib/ideal_postcodes/types/api_key_datasets.rb +202 -0
  41. data/lib/ideal_postcodes/types/api_key_details.rb +90 -0
  42. data/lib/ideal_postcodes/types/api_key_individual_limit.rb +16 -0
  43. data/lib/ideal_postcodes/types/api_key_monthly_limit.rb +21 -0
  44. data/lib/ideal_postcodes/types/api_key_notifications.rb +35 -0
  45. data/lib/ideal_postcodes/types/autocomplete_result.rb +25 -0
  46. data/lib/ideal_postcodes/types/available_context.rb +35 -0
  47. data/lib/ideal_postcodes/types/ban_address.rb +179 -0
  48. data/lib/ideal_postcodes/types/bev_address.rb +288 -0
  49. data/lib/ideal_postcodes/types/cannar_address.rb +297 -0
  50. data/lib/ideal_postcodes/types/carrier.rb +31 -0
  51. data/lib/ideal_postcodes/types/config.rb +34 -0
  52. data/lib/ideal_postcodes/types/configs_result.rb +15 -0
  53. data/lib/ideal_postcodes/types/deleted_config.rb +13 -0
  54. data/lib/ideal_postcodes/types/deleted_licensee.rb +13 -0
  55. data/lib/ideal_postcodes/types/ecad_address.rb +393 -0
  56. data/lib/ideal_postcodes/types/ecaf_address.rb +204 -0
  57. data/lib/ideal_postcodes/types/email.rb +45 -0
  58. data/lib/ideal_postcodes/types/fodbosa_address.rb +201 -0
  59. data/lib/ideal_postcodes/types/gbr_cleanse_match.rb +70 -0
  60. data/lib/ideal_postcodes/types/gbr_cleanse_no_match.rb +47 -0
  61. data/lib/ideal_postcodes/types/geonames_place.rb +153 -0
  62. data/lib/ideal_postcodes/types/gnaf_address.rb +463 -0
  63. data/lib/ideal_postcodes/types/here_address.rb +174 -0
  64. data/lib/ideal_postcodes/types/invalid_phone_number.rb +50 -0
  65. data/lib/ideal_postcodes/types/kadaster_address.rb +480 -0
  66. data/lib/ideal_postcodes/types/kartverket_address.rb +342 -0
  67. data/lib/ideal_postcodes/types/key_usage_day.rb +16 -0
  68. data/lib/ideal_postcodes/types/key_usage_result.rb +36 -0
  69. data/lib/ideal_postcodes/types/licensee.rb +50 -0
  70. data/lib/ideal_postcodes/types/licensee_daily_usage.rb +29 -0
  71. data/lib/ideal_postcodes/types/licensees_result.rb +23 -0
  72. data/lib/ideal_postcodes/types/mois_address.rb +440 -0
  73. data/lib/ideal_postcodes/types/mr_address.rb +99 -0
  74. data/lib/ideal_postcodes/types/native_record.rb +368 -0
  75. data/lib/ideal_postcodes/types/nyb_address.rb +99 -0
  76. data/lib/ideal_postcodes/types/paf_address.rb +96 -0
  77. data/lib/ideal_postcodes/types/pafa_address.rb +104 -0
  78. data/lib/ideal_postcodes/types/pafw_address.rb +99 -0
  79. data/lib/ideal_postcodes/types/phone_number.rb +50 -0
  80. data/lib/ideal_postcodes/types/place.rb +79 -0
  81. data/lib/ideal_postcodes/types/place_result.rb +21 -0
  82. data/lib/ideal_postcodes/types/place_suggestion.rb +32 -0
  83. data/lib/ideal_postcodes/types/sdfi_address.rb +520 -0
  84. data/lib/ideal_postcodes/types/swt_address.rb +247 -0
  85. data/lib/ideal_postcodes/types/uk_address_suggestion.rb +45 -0
  86. data/lib/ideal_postcodes/types/uk_address_suggestion_urls.rb +21 -0
  87. data/lib/ideal_postcodes/types/unknown_email.rb +43 -0
  88. data/lib/ideal_postcodes/types/upujp_address.rb +763 -0
  89. data/lib/ideal_postcodes/types/usps_address.rb +294 -0
  90. data/lib/ideal_postcodes/version.rb +5 -0
  91. data/lib/ideal_postcodes.rb +14 -2
  92. data/sig/ideal_postcodes/base_client.rbs +40 -0
  93. data/sig/ideal_postcodes/client.rbs +35 -0
  94. data/sig/ideal_postcodes/errors.rbs +27 -0
  95. data/sig/ideal_postcodes/model.rbs +37 -0
  96. data/sig/ideal_postcodes/operations.rbs +207 -0
  97. data/sig/ideal_postcodes/responses/address_response.rbs +13 -0
  98. data/sig/ideal_postcodes/responses/api_key_details_response.rbs +13 -0
  99. data/sig/ideal_postcodes/responses/api_key_response.rbs +13 -0
  100. data/sig/ideal_postcodes/responses/api_key_usage_response.rbs +13 -0
  101. data/sig/ideal_postcodes/responses/autocomplete_response.rbs +13 -0
  102. data/sig/ideal_postcodes/responses/cleanse_response.rbs +19 -0
  103. data/sig/ideal_postcodes/responses/config_response.rbs +13 -0
  104. data/sig/ideal_postcodes/responses/configs_response.rbs +13 -0
  105. data/sig/ideal_postcodes/responses/delete_config_response.rbs +13 -0
  106. data/sig/ideal_postcodes/responses/delete_licensee_response.rbs +13 -0
  107. data/sig/ideal_postcodes/responses/email_response.rbs +19 -0
  108. data/sig/ideal_postcodes/responses/gbr_resolve_address_response.rbs +13 -0
  109. data/sig/ideal_postcodes/responses/licensee_response.rbs +13 -0
  110. data/sig/ideal_postcodes/responses/licensees_response.rbs +13 -0
  111. data/sig/ideal_postcodes/responses/phone_number_response.rbs +19 -0
  112. data/sig/ideal_postcodes/responses/place_response.rbs +13 -0
  113. data/sig/ideal_postcodes/responses/postcode_response.rbs +16 -0
  114. data/sig/ideal_postcodes/responses/resolve_place_response.rbs +13 -0
  115. data/sig/ideal_postcodes/transport.rbs +39 -0
  116. data/sig/ideal_postcodes/types/ab_address.rbs +57 -0
  117. data/sig/ideal_postcodes/types/abp_address.rbs +126 -0
  118. data/sig/ideal_postcodes/types/address.rbs +136 -0
  119. data/sig/ideal_postcodes/types/address_list_item.rbs +160 -0
  120. data/sig/ideal_postcodes/types/address_result.rbs +12 -0
  121. data/sig/ideal_postcodes/types/address_suggestion.rbs +11 -0
  122. data/sig/ideal_postcodes/types/api_key.rbs +11 -0
  123. data/sig/ideal_postcodes/types/api_key_automated_topup.rbs +9 -0
  124. data/sig/ideal_postcodes/types/api_key_current_purchase.rbs +11 -0
  125. data/sig/ideal_postcodes/types/api_key_daily_limit.rbs +10 -0
  126. data/sig/ideal_postcodes/types/api_key_datasets.rbs +46 -0
  127. data/sig/ideal_postcodes/types/api_key_details.rbs +22 -0
  128. data/sig/ideal_postcodes/types/api_key_individual_limit.rbs +9 -0
  129. data/sig/ideal_postcodes/types/api_key_monthly_limit.rbs +10 -0
  130. data/sig/ideal_postcodes/types/api_key_notifications.rbs +13 -0
  131. data/sig/ideal_postcodes/types/autocomplete_result.rbs +15 -0
  132. data/sig/ideal_postcodes/types/available_context.rbs +13 -0
  133. data/sig/ideal_postcodes/types/ban_address.rbs +46 -0
  134. data/sig/ideal_postcodes/types/bev_address.rbs +67 -0
  135. data/sig/ideal_postcodes/types/cannar_address.rbs +62 -0
  136. data/sig/ideal_postcodes/types/carrier.rbs +14 -0
  137. data/sig/ideal_postcodes/types/config.rbs +14 -0
  138. data/sig/ideal_postcodes/types/configs_result.rbs +9 -0
  139. data/sig/ideal_postcodes/types/deleted_config.rbs +9 -0
  140. data/sig/ideal_postcodes/types/deleted_licensee.rbs +9 -0
  141. data/sig/ideal_postcodes/types/ecad_address.rbs +84 -0
  142. data/sig/ideal_postcodes/types/ecaf_address.rbs +45 -0
  143. data/sig/ideal_postcodes/types/email.rbs +16 -0
  144. data/sig/ideal_postcodes/types/fodbosa_address.rbs +43 -0
  145. data/sig/ideal_postcodes/types/gbr_cleanse_match.rbs +25 -0
  146. data/sig/ideal_postcodes/types/gbr_cleanse_no_match.rbs +28 -0
  147. data/sig/ideal_postcodes/types/geonames_place.rbs +42 -0
  148. data/sig/ideal_postcodes/types/gnaf_address.rbs +104 -0
  149. data/sig/ideal_postcodes/types/here_address.rbs +37 -0
  150. data/sig/ideal_postcodes/types/invalid_phone_number.rbs +17 -0
  151. data/sig/ideal_postcodes/types/kadaster_address.rbs +98 -0
  152. data/sig/ideal_postcodes/types/kartverket_address.rbs +78 -0
  153. data/sig/ideal_postcodes/types/key_usage_day.rbs +10 -0
  154. data/sig/ideal_postcodes/types/key_usage_result.rbs +13 -0
  155. data/sig/ideal_postcodes/types/licensee.rbs +17 -0
  156. data/sig/ideal_postcodes/types/licensee_daily_usage.rbs +12 -0
  157. data/sig/ideal_postcodes/types/licensees_result.rbs +11 -0
  158. data/sig/ideal_postcodes/types/mois_address.rbs +97 -0
  159. data/sig/ideal_postcodes/types/mr_address.rbs +27 -0
  160. data/sig/ideal_postcodes/types/native_record.rbs +34 -0
  161. data/sig/ideal_postcodes/types/nyb_address.rbs +27 -0
  162. data/sig/ideal_postcodes/types/paf_address.rbs +27 -0
  163. data/sig/ideal_postcodes/types/pafa_address.rbs +27 -0
  164. data/sig/ideal_postcodes/types/pafw_address.rbs +27 -0
  165. data/sig/ideal_postcodes/types/phone_number.rbs +17 -0
  166. data/sig/ideal_postcodes/types/place.rbs +29 -0
  167. data/sig/ideal_postcodes/types/place_result.rbs +15 -0
  168. data/sig/ideal_postcodes/types/place_suggestion.rbs +12 -0
  169. data/sig/ideal_postcodes/types/sdfi_address.rbs +108 -0
  170. data/sig/ideal_postcodes/types/swt_address.rbs +57 -0
  171. data/sig/ideal_postcodes/types/uk_address_suggestion.rbs +13 -0
  172. data/sig/ideal_postcodes/types/uk_address_suggestion_urls.rbs +10 -0
  173. data/sig/ideal_postcodes/types/unknown_email.rbs +16 -0
  174. data/sig/ideal_postcodes/types/upujp_address.rbs +156 -0
  175. data/sig/ideal_postcodes/types/usps_address.rbs +63 -0
  176. metadata +186 -174
  177. data/.github/workflows/ci.yml +0 -22
  178. data/Gemfile +0 -2
  179. data/Rakefile +0 -15
  180. data/ideal-postcodes-ruby.gemspec +0 -25
  181. data/lib/idealpostcodes/address.rb +0 -31
  182. data/lib/idealpostcodes/errors.rb +0 -38
  183. data/lib/idealpostcodes/key.rb +0 -14
  184. data/lib/idealpostcodes/postcode.rb +0 -23
  185. data/lib/idealpostcodes/util.rb +0 -42
  186. data/lib/idealpostcodes/version.rb +0 -3
  187. data/lib/idealpostcodes.rb +0 -124
  188. data/spec/addresses_spec.rb +0 -68
  189. data/spec/idealpostcodes_spec.rb +0 -56
  190. data/spec/keys_spec.rb +0 -25
  191. data/spec/postcodes_spec.rb +0 -77
  192. data/spec/spec_helper.rb +0 -89
  193. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_invalid_key.yml +0 -42
  194. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_limit_breached.yml +0 -42
  195. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_no_lookups_remaining.yml +0 -42
  196. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_returns_an_address_for_a_valid_UDPRN.yml +0 -74
  197. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_returns_nil_for_an_invalid_UDPRN.yml +0 -42
  198. data/spec/vcr_cassettes/IdealPostcodes_Address_search_is_sensitive_to_limit.yml +0 -81
  199. data/spec/vcr_cassettes/IdealPostcodes_Address_search_is_sensitive_to_page.yml +0 -369
  200. data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_invalid_key.yml +0 -42
  201. data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_limit_breached.yml +0 -42
  202. data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_no_lookups_remaining.yml +0 -42
  203. data/spec/vcr_cassettes/IdealPostcodes_Address_search_returns_results_in_a_SearchResult_object.yml +0 -273
  204. data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_details_returns_key_details.yml +0 -62
  205. data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_returns_the_availability_status_of_a_key_false_key_.yml +0 -45
  206. data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_returns_the_availability_status_of_a_key_true_key_.yml +0 -45
  207. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_is_sensitive_to_limit_parameter.yml +0 -52
  208. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_is_sensitive_to_radius_parament.yml +0 -133
  209. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_returns_an_array_of_postcodes_and_locations.yml +0 -84
  210. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_returns_an_empty_array_if_no_results_are_found.yml +0 -43
  211. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_invalid_key.yml +0 -42
  212. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_key_has_run_out_of_balance.yml +0 -42
  213. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_limit_has_been_reached.yml +0 -42
  214. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_returns_a_list_of_addresses_for_a_postcode.yml +0 -268
  215. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_returns_an_empty_array_if_postcode_does_not_exist.yml +0 -42
  216. data/spec/vcr_cassettes/IdealPostcodes_key_available_returns_false_if_key_is_unavailable.yml +0 -45
  217. data/spec/vcr_cassettes/IdealPostcodes_key_available_returns_true_if_key_is_available.yml +0 -45
  218. data/spec/vcr_cassettes/IdealPostcodes_key_details_raises_an_exception_if_no_secret_is_provided.yml +0 -45
  219. data/spec/vcr_cassettes/IdealPostcodes_key_details_returns_key_information.yml +0 -62
  220. data/spec/vcr_cassettes/IdealPostcodes_request_generates_a_HTTP_request.yml +0 -268
  221. data/spec/vcr_cassettes/IdealPostcodes_request_raises_authentication_error_if_invalid_key_is_provided.yml +0 -42
  222. data/spec/vcr_cassettes/IdealPostcodes_request_raises_limit_reached_error_if_a_limit_has_been_breached.yml +0 -42
  223. data/spec/vcr_cassettes/IdealPostcodes_request_raises_token_exhausted_error_if_key_balance_is_depleted.yml +0 -42
@@ -1,133 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://localhost:1337/v1/postcodes?api_key=gandhi&lonlat=0.6298,51.7923&radius=10
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Access-Control-Allow-Origin:
22
- - "*"
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- Content-Length:
26
- - "258"
27
- Etag:
28
- - '"-583643089"'
29
- Date:
30
- - Fri, 12 Dec 2014 17:40:28 GMT
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: |-
36
- {
37
- "result": [
38
- {
39
- "postcode": "CM8 1EF",
40
- "northings": 213679,
41
- "eastings": 581461,
42
- "longitude": 0.629834723775309,
43
- "latitude": 51.7923246977375,
44
- "distance": 3.64568457
45
- }
46
- ],
47
- "code": 2000,
48
- "message": "Success"
49
- }
50
- http_version:
51
- recorded_at: Fri, 12 Dec 2014 17:40:28 GMT
52
- - request:
53
- method: get
54
- uri: https://localhost:1337/v1/postcodes?api_key=gandhi&lonlat=0.6298,51.7923&radius=100
55
- body:
56
- encoding: US-ASCII
57
- string: ""
58
- headers:
59
- Accept:
60
- - "*/*; q=0.5, application/xml"
61
- Accept-Encoding:
62
- - gzip, deflate
63
- User-Agent:
64
- - Ruby
65
- response:
66
- status:
67
- code: 200
68
- message: OK
69
- headers:
70
- Access-Control-Allow-Origin:
71
- - "*"
72
- Content-Type:
73
- - application/json; charset=utf-8
74
- Content-Length:
75
- - "1058"
76
- Etag:
77
- - '"707345369"'
78
- Date:
79
- - Fri, 12 Dec 2014 17:40:28 GMT
80
- Connection:
81
- - keep-alive
82
- body:
83
- encoding: UTF-8
84
- string: |-
85
- {
86
- "result": [
87
- {
88
- "postcode": "CM8 1EF",
89
- "northings": 213679,
90
- "eastings": 581461,
91
- "longitude": 0.629834723775309,
92
- "latitude": 51.7923246977375,
93
- "distance": 3.64568457
94
- },
95
- {
96
- "postcode": "CM8 1EU",
97
- "northings": 213650,
98
- "eastings": 581507,
99
- "longitude": 0.630485817275861,
100
- "latitude": 51.7920493205979,
101
- "distance": 54.926867768
102
- },
103
- {
104
- "postcode": "CM8 1PH",
105
- "northings": 213741,
106
- "eastings": 581420,
107
- "longitude": 0.629273287180607,
108
- "latitude": 51.7928948417687,
109
- "distance": 75.504780435
110
- },
111
- {
112
- "postcode": "CM8 1EN",
113
- "northings": 213664,
114
- "eastings": 581366,
115
- "longitude": 0.628450923709479,
116
- "latitude": 51.7922207606932,
117
- "distance": 93.496753053
118
- },
119
- {
120
- "postcode": "CM8 1PQ",
121
- "northings": 213752,
122
- "eastings": 581403,
123
- "longitude": 0.629032807022633,
124
- "latitude": 51.7929991478552,
125
- "distance": 94.090672986
126
- }
127
- ],
128
- "code": 2000,
129
- "message": "Success"
130
- }
131
- http_version:
132
- recorded_at: Fri, 12 Dec 2014 17:40:28 GMT
133
- recorded_with: VCR 2.9.3
@@ -1,84 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://localhost:1337/v1/postcodes?api_key=gandhi&lonlat=0.6298,51.7923
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Access-Control-Allow-Origin:
22
- - "*"
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- Content-Length:
26
- - "1058"
27
- Etag:
28
- - '"707345369"'
29
- Date:
30
- - Fri, 12 Dec 2014 17:40:28 GMT
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: |-
36
- {
37
- "result": [
38
- {
39
- "postcode": "CM8 1EF",
40
- "northings": 213679,
41
- "eastings": 581461,
42
- "longitude": 0.629834723775309,
43
- "latitude": 51.7923246977375,
44
- "distance": 3.64568457
45
- },
46
- {
47
- "postcode": "CM8 1EU",
48
- "northings": 213650,
49
- "eastings": 581507,
50
- "longitude": 0.630485817275861,
51
- "latitude": 51.7920493205979,
52
- "distance": 54.926867768
53
- },
54
- {
55
- "postcode": "CM8 1PH",
56
- "northings": 213741,
57
- "eastings": 581420,
58
- "longitude": 0.629273287180607,
59
- "latitude": 51.7928948417687,
60
- "distance": 75.504780435
61
- },
62
- {
63
- "postcode": "CM8 1EN",
64
- "northings": 213664,
65
- "eastings": 581366,
66
- "longitude": 0.628450923709479,
67
- "latitude": 51.7922207606932,
68
- "distance": 93.496753053
69
- },
70
- {
71
- "postcode": "CM8 1PQ",
72
- "northings": 213752,
73
- "eastings": 581403,
74
- "longitude": 0.629032807022633,
75
- "latitude": 51.7929991478552,
76
- "distance": 94.090672986
77
- }
78
- ],
79
- "code": 2000,
80
- "message": "Success"
81
- }
82
- http_version:
83
- recorded_at: Fri, 12 Dec 2014 17:40:28 GMT
84
- recorded_with: VCR 2.9.3
@@ -1,43 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://localhost:1337/v1/postcodes?api_key=gandhi&lonlat=0,0
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Access-Control-Allow-Origin:
22
- - "*"
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- Content-Length:
26
- - "58"
27
- Etag:
28
- - '"-963557841"'
29
- Date:
30
- - Fri, 12 Dec 2014 17:40:28 GMT
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: |-
36
- {
37
- "result": [],
38
- "code": 2000,
39
- "message": "Success"
40
- }
41
- http_version:
42
- recorded_at: Fri, 12 Dec 2014 17:40:28 GMT
43
- recorded_with: VCR 2.9.3
@@ -1,42 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://localhost:1337/v1/postcodes/ID1%201QD?api_key=foo
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 401
19
- message: Unauthorized
20
- headers:
21
- Access-Control-Allow-Origin:
22
- - "*"
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- Content-Length:
26
- - "135"
27
- Etag:
28
- - '"-632160061"'
29
- Date:
30
- - Fri, 12 Dec 2014 17:40:28 GMT
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: |-
36
- {
37
- "code": 4010,
38
- "message": "Invalid Key. For more information see http://ideal-postcodes.co.uk/documentation/response-codes#4010"
39
- }
40
- http_version:
41
- recorded_at: Fri, 12 Dec 2014 17:40:28 GMT
42
- recorded_with: VCR 2.9.3
@@ -1,42 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://localhost:1337/v1/postcodes/ID1%20CLIP?api_key=gandhi
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 402
19
- message: Payment Required
20
- headers:
21
- Access-Control-Allow-Origin:
22
- - "*"
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- Content-Length:
26
- - "146"
27
- Etag:
28
- - '"1304241290"'
29
- Date:
30
- - Fri, 12 Dec 2014 17:40:28 GMT
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: |-
36
- {
37
- "code": 4020,
38
- "message": "Token balance depleted. For more information see http://ideal-postcodes.co.uk/documentation/response-codes#4020"
39
- }
40
- http_version:
41
- recorded_at: Fri, 12 Dec 2014 17:40:28 GMT
42
- recorded_with: VCR 2.9.3
@@ -1,42 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://localhost:1337/v1/postcodes/ID1%20CHOP?api_key=gandhi
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 402
19
- message: Payment Required
20
- headers:
21
- Access-Control-Allow-Origin:
22
- - "*"
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- Content-Length:
26
- - "144"
27
- Etag:
28
- - '"1445167850"'
29
- Date:
30
- - Fri, 12 Dec 2014 17:40:28 GMT
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: |-
36
- {
37
- "code": 4021,
38
- "message": "Lookup Limit Reached. For more information see http://ideal-postcodes.co.uk/documentation/response-codes#4021"
39
- }
40
- http_version:
41
- recorded_at: Fri, 12 Dec 2014 17:40:28 GMT
42
- recorded_with: VCR 2.9.3
@@ -1,268 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://localhost:1337/v1/postcodes/ID1%201QD?api_key=gandhi
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Access-Control-Allow-Origin:
22
- - "*"
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- Content-Length:
26
- - "6683"
27
- Etag:
28
- - '"1136868456"'
29
- Date:
30
- - Fri, 12 Dec 2014 17:40:27 GMT
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: |-
36
- {
37
- "result": [
38
- {
39
- "postcode": "ID1 1QD",
40
- "postcode_inward": "1QD",
41
- "postcode_outward": "ID1",
42
- "post_town": "LONDON",
43
- "dependant_locality": "",
44
- "double_dependant_locality": "",
45
- "thoroughfare": "Barons Court Road",
46
- "dependant_thoroughfare": "",
47
- "building_number": "2",
48
- "building_name": "",
49
- "sub_building_name": "",
50
- "po_box": "",
51
- "department_name": "",
52
- "organisation_name": "",
53
- "udprn": 25962203,
54
- "postcode_type": "S",
55
- "su_organisation_indicator": "",
56
- "delivery_point_suffix": "1G",
57
- "line_1": "2 Barons Court Road",
58
- "line_2": "",
59
- "line_3": "",
60
- "premise": "2",
61
- "country": "England",
62
- "county": "",
63
- "district": "Hammersmith and Fulham",
64
- "ward": "North End",
65
- "longitude": -0.208644362766368,
66
- "latitude": 51.4899488390558,
67
- "eastings": 524466,
68
- "northings": 178299
69
- },
70
- {
71
- "postcode": "ID1 1QD",
72
- "postcode_inward": "1QD",
73
- "postcode_outward": "ID1",
74
- "post_town": "LONDON",
75
- "dependant_locality": "",
76
- "double_dependant_locality": "",
77
- "thoroughfare": "Barons Court Road",
78
- "dependant_thoroughfare": "",
79
- "building_number": "2",
80
- "building_name": "Basement Flat",
81
- "sub_building_name": "",
82
- "po_box": "",
83
- "department_name": "",
84
- "organisation_name": "",
85
- "udprn": 52618355,
86
- "postcode_type": "S",
87
- "su_organisation_indicator": "",
88
- "delivery_point_suffix": "3A",
89
- "line_1": "Basement Flat",
90
- "line_2": "2 Barons Court Road",
91
- "line_3": "",
92
- "premise": "Basement Flat, 2",
93
- "country": "England",
94
- "county": "",
95
- "district": "Hammersmith and Fulham",
96
- "ward": "North End",
97
- "longitude": -0.208644362766368,
98
- "latitude": 51.4899488390558,
99
- "eastings": 524466,
100
- "northings": 178299
101
- },
102
- {
103
- "postcode": "ID1 1QD",
104
- "postcode_inward": "1QD",
105
- "postcode_outward": "ID1",
106
- "post_town": "LONDON",
107
- "dependant_locality": "",
108
- "double_dependant_locality": "",
109
- "thoroughfare": "Barons Court Road",
110
- "dependant_thoroughfare": "",
111
- "building_number": "4",
112
- "building_name": "",
113
- "sub_building_name": "",
114
- "po_box": "",
115
- "department_name": "",
116
- "organisation_name": "",
117
- "udprn": 25962215,
118
- "postcode_type": "S",
119
- "su_organisation_indicator": "",
120
- "delivery_point_suffix": "1W",
121
- "line_1": "4 Barons Court Road",
122
- "line_2": "",
123
- "line_3": "",
124
- "premise": "4",
125
- "country": "England",
126
- "county": "",
127
- "district": "Hammersmith and Fulham",
128
- "ward": "North End",
129
- "longitude": -0.208644362766368,
130
- "latitude": 51.4899488390558,
131
- "eastings": 524466,
132
- "northings": 178299
133
- },
134
- {
135
- "postcode": "ID1 1QD",
136
- "postcode_inward": "1QD",
137
- "postcode_outward": "ID1",
138
- "post_town": "LONDON",
139
- "dependant_locality": "",
140
- "double_dependant_locality": "",
141
- "thoroughfare": "Barons Court Road",
142
- "dependant_thoroughfare": "",
143
- "building_number": "4",
144
- "building_name": "",
145
- "sub_building_name": "Basement",
146
- "po_box": "",
147
- "department_name": "",
148
- "organisation_name": "",
149
- "udprn": 25962189,
150
- "postcode_type": "S",
151
- "su_organisation_indicator": "",
152
- "delivery_point_suffix": "2P",
153
- "line_1": "Basement",
154
- "line_2": "4 Barons Court Road",
155
- "line_3": "",
156
- "premise": "Basement, 4",
157
- "country": "England",
158
- "county": "",
159
- "district": "Hammersmith and Fulham",
160
- "ward": "North End",
161
- "longitude": -0.208644362766368,
162
- "latitude": 51.4899488390558,
163
- "eastings": 524466,
164
- "northings": 178299
165
- },
166
- {
167
- "postcode": "ID1 1QD",
168
- "postcode_inward": "1QD",
169
- "postcode_outward": "ID1",
170
- "post_town": "LONDON",
171
- "dependant_locality": "",
172
- "double_dependant_locality": "",
173
- "thoroughfare": "Barons Court Road",
174
- "dependant_thoroughfare": "",
175
- "building_number": "6",
176
- "building_name": "",
177
- "sub_building_name": "",
178
- "po_box": "",
179
- "department_name": "",
180
- "organisation_name": "",
181
- "udprn": 25962218,
182
- "postcode_type": "S",
183
- "su_organisation_indicator": "",
184
- "delivery_point_suffix": "1Y",
185
- "line_1": "6 Barons Court Road",
186
- "line_2": "",
187
- "line_3": "",
188
- "premise": "6",
189
- "country": "England",
190
- "county": "",
191
- "district": "Hammersmith and Fulham",
192
- "ward": "North End",
193
- "longitude": -0.208644362766368,
194
- "latitude": 51.4899488390558,
195
- "eastings": 524466,
196
- "northings": 178299
197
- },
198
- {
199
- "postcode": "ID1 1QD",
200
- "postcode_inward": "1QD",
201
- "postcode_outward": "ID1",
202
- "post_town": "LONDON",
203
- "dependant_locality": "",
204
- "double_dependant_locality": "",
205
- "thoroughfare": "Barons Court Road",
206
- "dependant_thoroughfare": "",
207
- "building_number": "8",
208
- "building_name": "",
209
- "sub_building_name": "",
210
- "po_box": "",
211
- "department_name": "",
212
- "organisation_name": "",
213
- "udprn": 25962219,
214
- "postcode_type": "S",
215
- "su_organisation_indicator": "",
216
- "delivery_point_suffix": "1Z",
217
- "line_1": "8 Barons Court Road",
218
- "line_2": "",
219
- "line_3": "",
220
- "premise": "8",
221
- "country": "England",
222
- "county": "",
223
- "district": "Hammersmith and Fulham",
224
- "ward": "North End",
225
- "longitude": -0.208644362766368,
226
- "latitude": 51.4899488390558,
227
- "eastings": 524466,
228
- "northings": 178299
229
- },
230
- {
231
- "postcode": "ID1 1QD",
232
- "postcode_inward": "1QD",
233
- "postcode_outward": "ID1",
234
- "post_town": "LONDON",
235
- "dependant_locality": "",
236
- "double_dependant_locality": "",
237
- "thoroughfare": "Barons Court Road",
238
- "dependant_thoroughfare": "",
239
- "building_number": "59",
240
- "building_name": "",
241
- "sub_building_name": "",
242
- "po_box": "",
243
- "department_name": "",
244
- "organisation_name": "ID Consulting Limited",
245
- "udprn": 25946509,
246
- "postcode_type": "S",
247
- "su_organisation_indicator": "Y",
248
- "delivery_point_suffix": "1N",
249
- "line_1": "ID Consulting Limited",
250
- "line_2": "59 Barons Court Road",
251
- "line_3": "",
252
- "premise": "59",
253
- "country": "England",
254
- "county": "",
255
- "district": "Hammersmith and Fulham",
256
- "ward": "North End",
257
- "longitude": -0.208644362766368,
258
- "latitude": 51.4899488390558,
259
- "eastings": 524466,
260
- "northings": 178299
261
- }
262
- ],
263
- "code": 2000,
264
- "message": "Success"
265
- }
266
- http_version:
267
- recorded_at: Fri, 12 Dec 2014 17:40:27 GMT
268
- recorded_with: VCR 2.9.3