Closed
Description
I think it would be really nice if using this SDK you did not have to write the search
string yourself.
Ideally the API of this library would allow you to do something like:
timekit.getBookings({
search: {
'meta.some_property': 'someValue'
}
})
And this would be converted to a call to /bookings?search=meta.some_property:someValue
automatically.
A function like this should do the trick (quickly tested and tried in my own code using lodash/fp):
function createSearchString(search) {
const keyValues = fp.map.convert({ cap: false })(
(val, key) => `${key}:${val}`,
search
)
return keyValues.join(';')
}
Metadata
Metadata
Assignees
Labels
No labels