deniskristov / checkbox-api-client

Java API client
https://checkbox.ua
3 stars 1 forks source link

Extending getShifts with parameters [pr] #5

Closed dimaloop closed 2 years ago

dimaloop commented 2 years ago

Currently method getShifts() doesn't use any parameters, so api defaults used so, not possible to query other than first page

parameters list from api docs:

statuses Array of any (ShiftStatus) Enum: "CREATED" "OPENING" "OPENED" "CLOSING" "CLOSED"
desc boolean (Desc)Default: false, Зворотній порядок сортування
limit integer (Limit) [0 .. 1000], Default: 25
offset integer (Offset) >= 0, Default: 0

Perhaps it makes sense to introduce an object ShiftsFilter and pass them as argument to getShifts(ShiftsFilter filter)

deniskristov commented 2 years ago

I've just added ShiftsFilter