Due to the horrible format of 'De Afval App' api, I have decided to write a proxy for it.
npm install DeAfvalApp-api-proxy
yarn add DeAfvalApp-api-proxy
const proxy = require('DeAfvalApp-api-proxy')();
async function doSomethingWithAddress(){
const address = await proxy.locations.getAddress('1234AB', 1);
console.log(address);
}
Properties
Name | Type |
---|---|
locations | module:Locations |
announcements | module:Announcements |
garbage | module:Garbage |
Kind: inner class of Proxy
This return an object of all announcements made by the garbage collection company/municipality
Kind: inner method of Announcements
Returns: Promise
- Promise object represents an array of announcement objects
Param | Type | Description |
---|---|---|
zipCode | string |
The zip code of the user's address |
houseNumber | number |
The house number of the user's address |
[houseNumberAddition] | string |
The house number addition of the user's address |
This return an object array of the garbage collection schedule
Kind: inner method of Garbage
Returns: Promise
- Promise object represents an array of objects
Param | Type | Description |
---|---|---|
zipCode | string |
The zip code of the user's address |
houseNumber | number |
The house number of the user's address |
[houseNumberAddition] | string |
The house number addition of the user's address |
This return an object array filled with information about garbage collection
Kind: inner method of Garbage
Returns: Promise
- Promise object represents an object array filled with garbage collection information
Param | Type | Description |
---|---|---|
zipCode | string |
The zip code of the user's address |
houseNumber | number |
The house number of the user's address |
[houseNumberAddition] | string |
The house number addition of the user's address |
This return an Address object based on a zip code and house number
Kind: inner method of Locations
Returns: Promise
- Promise object represents an object filled with address data
Param | Type | Description |
---|---|---|
zipCode | string |
The zip code of the user's address |
houseNumber | number |
The house number of the user's address |
[houseNumberAddition] | string |
The house number addition of the user's address |
List all available municipalities in an object array
Kind: inner method of Locations
Returns: Promise
- Promise object represents an object array filled with municipality data
This return an municipality object based on a zip code and house number
Kind: inner method of Locations
Returns: Promise
- Promise object represents an object filled with municipality information
Param | Type | Description |
---|---|---|
zipCode | string |
The zip code of the user's address |
houseNumber | number |
The house number of the user's address |
[houseNumberAddition] | string |
The house number addition of the user's address |