deafvalapp-api-proxy
v2.0.2
Published
Proxy for 'De Afvalapp' api as this returns results in a horrible format
Downloads
5
Readme
DeAfvalApp-api-proxy
Due to the horrible format of 'De Afval App' api, I have decided to write a proxy for it.
Install
npm install DeAfvalApp-api-proxy
yarn add DeAfvalApp-api-proxy
Usage
const proxy = require('DeAfvalApp-api-proxy')();
async function doSomethingWithAddress(){
const address = await proxy.locations.getAddress('1234AB', 1);
console.log(address);
}
Modules
Proxy
Properties
| Name | Type | | --- | --- | | locations | module:Locations | | announcements | module:Announcements | | garbage | module:Garbage |
Proxy~Proxy
Kind: inner class of Proxy
Announcements
Announcements~getAnnouncements(zipCode, houseNumber, [houseNumberAddition]) ⇒ Promise
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 |
Garbage
Garbage~getSchedule(zipCode, houseNumber, [houseNumberAddition]) ⇒ Promise
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 |
Garbage~getGarbageInfo(zipCode, houseNumber, [houseNumberAddition]) ⇒ Promise
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 |
Locations
Locations~getAddress(zipCode, houseNumber, [houseNumberAddition]) ⇒ Promise
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 |
Locations~getAllMunicipalities() ⇒ Promise
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
Locations~getMunicipalityInfo(zipCode, houseNumber, [houseNumberAddition]) ⇒ Promise
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 |