Skip to content

Commit

Permalink
Added afvalkalender Woerden #227
Browse files Browse the repository at this point in the history
  • Loading branch information
robertraaijmakers committed Feb 22, 2025
1 parent 36735e3 commit 0d008c4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
5 changes: 5 additions & 0 deletions lib/trashapis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class TrashApis {
this.#apiList.push({ name: 'Afvalkalender Súdwest-Fryslân', id: 'swf', execute: (apiSettings) => this.#afvalkalenderSudwestFryslan(apiSettings) });
this.#apiList.push({ name: 'Afvalkalender Venray', id: 'akvr', execute: (apiSettings) => this.#afvalkalenderVenray(apiSettings) });
this.#apiList.push({ name: 'Afvalkalender Westland', id: 'akwl', execute: (apiSettings) => this.#afvalKalenderWestland(apiSettings) });
this.#apiList.push({ name: 'Afvalkalender Woerden', id: 'akwrd', execute: (apiSettings) => this.#afvalKalenderWoerden(apiSettings) });
this.#apiList.push({ name: 'Afvalkalender ZRD', id: 'afzrd', execute: (apiSettings) => this.#afvalkalenderZrd(apiSettings) });
this.#apiList.push({ name: 'Avalwijzer Montferland', id: 'mont', execute: (apiSettings) => this.#afvalwijzerMontferland(apiSettings) });
this.#apiList.push({ name: 'Afvalwijzer Pre Zero', id: 'arn', execute: (apiSettings) => this.#afvalwijzerPreZero(apiSettings) });
Expand Down Expand Up @@ -234,6 +235,10 @@ export class TrashApis {
return this.#newGeneralAfvalkalendersNederlandRest(apiSettings, 'inzamelkalender.hvcgroep.nl');
}

async #afvalKalenderWoerden(apiSettings: ApiSettings) {
return this.#generalImplementationWasteApi(apiSettings, '06856f74-6826-4c6a-aabf-69bc9d20b5a6', 'wasteprod2api.ximmio.com');
}

async #reinigingsdienstWaardlanden(apiSettings: ApiSettings) {
return this.#generalImplementationWasteApi(apiSettings, '942abcf6-3775-400d-ae5d-7380d728b23c', 'wasteapi.ximmio.com');
}
Expand Down
1 change: 1 addition & 0 deletions settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ <h1 class="homey-title" data-i18n="settings.title">
<option value="swf">Afvalkalender Súdwest-Fryslân</option>
<option value="akvr">Afvalkalender Venray (NL)</option>
<option value="akwl">Afvalkalender Westland (NL)</option>
<option value="akwrd">Afvalkalender Woerden (NL)</option>
<option value="afzrd">Afvalkalender ZRD (NL)</option>
<option value="mont">Afvalwijzer Montferland (NL)</option>
<option value="arn">Afvalwijzer Pre Zero (NL)</option>
Expand Down
24 changes: 21 additions & 3 deletions test/trashApiTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ describe('TrashApiRd4', function () {
assert.equal(isValid, true);
});
});
*/
describe('TrashApiAfw', function () {
it('API - Mijn Afvalwijzer (1)', async function () {
const apiSettings: ApiSettings = {
Expand All @@ -412,7 +412,7 @@ describe('TrashApiAfw', function () {
const isValid = validateApiResults(apiSettings, result);
assert.equal(isValid, true);
});
/*
it('API - Afvalwijzer (2) - #204', async function () {
const apiSettings: ApiSettings = {
zipcode: '5122GP',
Expand Down Expand Up @@ -501,8 +501,26 @@ describe('TrashApiAfw', function () {
const result = await testAPI(apiSettings);
const isValid = validateApiResults(apiSettings, result);
assert.equal(isValid, true);
});*/
});
});*/

describe('Woerden Ximmio', function () {
it('API - Ximmio - Woerden', async function () {
const apiSettings: ApiSettings = {
zipcode: '3441AX',
housenumber: '9',
country: 'NL',
apiId: 'akwrd',
cleanApiId: '',
streetname: '',
};

const result = await testAPI(apiSettings);
const isValid = validateApiResults(apiSettings, result);
assert.equal(isValid, true);
});
});

/*
describe('TrashApiAknw', function () {
it('API - Nissewaard', async function () {
Expand Down

0 comments on commit 0d008c4

Please sign in to comment.