Download the PHP package label84/php-nederland-postcode without Composer

On this page you can find all versions of the php package label84/php-nederland-postcode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-nederland-postcode

Nederland Postcode PHP

Nederland Postcode PHP makes it easy to integrate Dutch address validations into your PHP application using the Nederland Postcode API.

Register for free to obtain a test API key at nederlandpostcode.nl to get started.

Requirements

Installation

Install the package via Composer:

Usage

Address Endpoint

The address endpoint allows you to fetch address information from the Nederland Postcode API.

You can search addresses using either the find method for a single address or the list method for multiple addresses. The find method will throw an exception if no address is found or if multiple addresses are found for the given postcode and house number (ie. when the house number has multiple additions like A, B, C, etc.).

The following optional attributes can be requested to be included in the response:

Single Address

To fetch a single address for a given postcode and house number, you can use the find method.

The postcode and number parameters are required. The addition parameter is optional.

This will return an Address object like this:

When no address is found for the given postcode and number, an AddressNotFoundException is thrown. If multiple addresses are found, a MultipleAddressesFoundException is thrown.

Multiple Addresses

To fetch multiple addresses for a given postcode and house number, you can use the list method.

The postcode and number parameters are required. The addition parameter is optional.

This will return an AddressCollection like this:

Energy Label Endpoint

The energy label endpoint allows you to fetch energy label information for a given postcode and house number (with optional addition).

This will return an EnergyLabelCollection like this:

Quota Endpoint

The quota endpoint allows you to check your current API usage and limits. This endpoint does not increment your usage count.

[!NOTE] Values may lag behind the actual usage. They're cached for up to five minutes, so the used and limit numbers might not be fully up-to-date.

This will return an Quota object like this:

Error Handling

The package throws a NederlandPostcodeException for any errors encountered during the API request. You can catch this exception to handle errors gracefully:

When calling the find method, if no address is found, an AddressNotFoundException is thrown. If multiple addresses are found, a MultipleAddressesFoundException is thrown.

When a network or HTTP error occurs during the API request, a NederlandPostcodeRequestException is thrown, which wraps the original RequestException.

Contributing

License

MIT


All versions of php-nederland-postcode with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.10
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package label84/php-nederland-postcode contains the following files

Loading the files please wait ...