2.0.2 • Published 6 years ago

deafvalapp-api-proxy v2.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

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

NameType
locationsmodule:Locations
announcementsmodule:Announcements
garbagemodule: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

ParamTypeDescription
zipCodestringThe zip code of the user's address
houseNumbernumberThe house number of the user's address
houseNumberAdditionstringThe 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

ParamTypeDescription
zipCodestringThe zip code of the user's address
houseNumbernumberThe house number of the user's address
houseNumberAdditionstringThe 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

ParamTypeDescription
zipCodestringThe zip code of the user's address
houseNumbernumberThe house number of the user's address
houseNumberAdditionstringThe 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

ParamTypeDescription
zipCodestringThe zip code of the user's address
houseNumbernumberThe house number of the user's address
houseNumberAdditionstringThe 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

ParamTypeDescription
zipCodestringThe zip code of the user's address
houseNumbernumberThe house number of the user's address
houseNumberAdditionstringThe house number addition of the user's address