You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 22, 2022. It is now read-only.
postal_codes = data["results"] # List of postal codes
43
+
next_postal_code = data["next"] # Next postal code to search from (used for pagination)
42
44
43
45
# Fetch a single postal code
44
46
postal_code = client.get_postal_code("5038EA")
45
47
```
46
48
49
+
### Exceptions
50
+
51
+
There are 5 exceptions that can occur:
52
+
53
+
-`NoAccessException`, which occurs when the current account does not have the required privileges to perform the action;
54
+
-`ResourceNotFoundException`, which occurs when the returned status_code is 404. Limited to the *get_address* and *get_postal_code* methods;
55
+
-`HouseNumberRequiresPostalCodeException`, which occurs when a house_number is given but not a postal_code. Limited to the *get_all_addresses* method;
56
+
-`InvalidPostalCodeException`, which occurs when an invalid postal code is given;
57
+
-`LimitExceededException`, which occurs when there are too many network requests or the limit has been exceeded
58
+
47
59
## Documentation
60
+
48
61
For more information about the data that is returned, please refer to the [official API documentation](https://www.postcodeapi.nu/docs/). It is written in Dutch.
49
62
50
63
## Running tests
51
-
To run the tests, make sure you have the dev dependencies installed, and run `pytest` in the root of the project.
64
+
65
+
To run the tests, make sure you install the dev dependencies by running `pipenv install --dev`, and then run `pytest` in the root of the project.
52
66
53
67
## Issues
68
+
54
69
If you have any issues with the API wrapper, please post them [here](https://github.com/infoklik/postcodeapi/issues). If you have issues with the actual API,
55
70
please post them in the [official issue tracker](https://github.com/postcodeapi/postcodeapi/issues) of Postcode API.
0 commit comments