Add article category lookup
This commit is contained in:
Vendored
+13
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user