ideal_postcodes 2.0.0 → 2.0.1
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.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +22 -0
- data/lib/ideal_postcodes.rb +1 -1
- data/lib/idealpostcodes/address.rb +28 -28
- data/lib/idealpostcodes/errors.rb +31 -26
- data/lib/idealpostcodes/key.rb +12 -11
- data/lib/idealpostcodes/postcode.rb +21 -20
- data/lib/idealpostcodes/util.rb +38 -25
- data/lib/idealpostcodes/version.rb +2 -2
- data/lib/idealpostcodes.rb +104 -92
- data/spec/addresses_spec.rb +63 -63
- data/spec/idealpostcodes_spec.rb +51 -51
- data/spec/keys_spec.rb +21 -21
- data/spec/postcodes_spec.rb +74 -63
- data/spec/spec_helper.rb +50 -29
- data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_invalid_key.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_limit_breached.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_no_lookups_remaining.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_returns_an_address_for_a_valid_UDPRN.yml +71 -71
- data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_returns_nil_for_an_invalid_UDPRN.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_is_sensitive_to_limit.yml +78 -78
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_is_sensitive_to_page.yml +366 -366
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_invalid_key.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_limit_breached.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_no_lookups_remaining.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_returns_results_in_a_SearchResult_object.yml +270 -270
- data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_details_returns_key_details.yml +58 -58
- data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_returns_the_availability_status_of_a_key_false_key_.yml +42 -42
- data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_returns_the_availability_status_of_a_key_true_key_.yml +42 -42
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_is_sensitive_to_limit_parameter.yml +49 -49
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_is_sensitive_to_radius_parament.yml +130 -130
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_returns_an_array_of_postcodes_and_locations.yml +81 -81
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_returns_an_empty_array_if_no_results_are_found.yml +40 -40
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_invalid_key.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_key_has_run_out_of_balance.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_limit_has_been_reached.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_returns_a_list_of_addresses_for_a_postcode.yml +265 -265
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_returns_an_empty_array_if_postcode_does_not_exist.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_key_available_returns_false_if_key_is_unavailable.yml +42 -42
- data/spec/vcr_cassettes/IdealPostcodes_key_available_returns_true_if_key_is_available.yml +42 -42
- data/spec/vcr_cassettes/IdealPostcodes_key_details_raises_an_exception_if_no_secret_is_provided.yml +42 -42
- data/spec/vcr_cassettes/IdealPostcodes_key_details_returns_key_information.yml +58 -58
- data/spec/vcr_cassettes/IdealPostcodes_request_generates_a_HTTP_request.yml +265 -265
- data/spec/vcr_cassettes/IdealPostcodes_request_raises_authentication_error_if_invalid_key_is_provided.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_request_raises_limit_reached_error_if_a_limit_has_been_breached.yml +39 -39
- data/spec/vcr_cassettes/IdealPostcodes_request_raises_token_exhausted_error_if_key_balance_is_depleted.yml +39 -39
- metadata +4 -5
- data/.travis.yml +0 -9
|
@@ -1,268 +1,268 @@
|
|
|
1
1
|
---
|
|
2
2
|
http_interactions:
|
|
3
|
-
- request:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
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
268
|
recorded_with: VCR 2.9.3
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
http_interactions:
|
|
3
|
-
- request:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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:27 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:27 GMT
|
|
42
42
|
recorded_with: VCR 2.9.3
|