nettob / rdw-bundle
This Symfony2 bundle provide a service to retrieve RDW data.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.2
- nettob/rdw: 1.*
- symfony/finder: ~2.6
- symfony/framework-bundle: ~2.6
This package is not auto-updated.
Last update: 2020-01-24 16:16:05 UTC
README
This Symfony2 bundle provide a service to retrieve RDW data.
Installation
Add the bunde to your composer.json
file:
require: { // ... "nettob/rdw-bundle": "1.*" // ... }
Then run a composer update:
composer.phar update # OR composer.phar update nettob/rdw-bundle # to only update the bundle
Register the bundle with your kernel:
// in AppKernel::registerBundles()
$bundles = array(
// ...
new Nettob\Bundle\RdwBundle\NettobRdwBundle(),
// ...
);
Configuration
Minimun configuration:
# app/config/config.yml nettob_rdw: api_key: "YOURAPIKEY" # [required] the api key from your dataset on azure.
Additonal options (default values are shown here):
# app/config/config.yml nettob_rdw: content_type: "json" # currently only json could be used.
Usage
Service
Both methods returns an array of Nettob\Component\Rdw\Model\Kenteken.
FindAll
$limit = 100; # Limit of number plates.
$offset = 100; # offset of number plates.
$this->get('nettob_rdw.adapter')->findAll($limit, $offset);
FindBy
Currently only one property allowed.
$key = 'Kenteken'; # See Nettob\Component\Rdw\Model\Kenteken for the available properties.
$value = 'string'; # String or number to search for.
$type = Nettob\Component\Rdw\Model\KentekenRepository::TYPE_EQ #See Nettob\Component\Rdw\Model\Kenteken::getTypes for the available types.
$limit = 100; # Limit of number plates.
$offset = 100; # offset of number plates.
$this->get('nettob_rdw.adapter')->findBy($key, $vale, $type, $limit, $offset);
Console
This bundle has an search command. This command fires the findby method from the service.
php app/console nettob_rdw:search --key="Kenteken" --value="00AABB" --type="eq" --limit=1 --offset=0
Api
The data set is avalible on the azure marktplace named [Voertuig Open Data] (https://datamarket.azure.com/dataset/opendata.rdw/vrtg.open.data) Request access to the data set and retrieve your api key from [your account] (https://datamarket.azure.com/account). You can find the manual for the data set [here] (https://www.rdw.nl/opendata/Paginas/handleidingen.aspx?Path=Portal/OpenData)