Add article category lookup

This commit is contained in:
2026-06-07 14:45:57 +02:00
parent a5608ab461
commit 68bb6ce061
9 changed files with 49 additions and 4 deletions
+13
View File
@@ -332,6 +332,19 @@ class AgrarmonitorConnector {
};
});
}
async getArtikelKategorien() {
const response = await this.http.get('/artikel/kategorien');
await this.saveSession();
const document = this.parseHtmlDocument(response.data);
const rows = Array.from(document.querySelectorAll('table#kategorien tbody tr'));
return rows.map(row => {
const cells = Array.from(row.querySelectorAll('td'));
return {
id: this.parseNumber(row.id),
name: cells[1]?.textContent?.trim() ?? '',
};
});
}
createHttpClient() {
const client = (0, axios_cookiejar_support_1.wrapper)(axios_1.default.create({
baseURL: this.baseUrl,