added pagination

This commit is contained in:
2020-11-26 23:09:59 +01:00
parent f59f15e370
commit 04cd9e1f92
5 changed files with 40 additions and 11 deletions

View File

@@ -22,7 +22,7 @@ export default new class {
this.http = axios.create({
baseURL: API_BASE_URL,
timeout: 15000, // 15 sec, mert szar a mobilnet
timeout: 600000, // 10 min lol
headers: headers
})
}
@@ -127,8 +127,8 @@ export default new class {
return this._performApiCall('get', '/lists', null, true, 200);
}
getList(id) {
return this._performApiCall('get', `/lists/${id}`, null, true, 200);
getList(id, offset = 0, limit = 10) {
return this._performApiCall('get', `/lists/${id}?offset=${offset}&limit=${limit}`, null, true, 200);
}
getItem(id) {