You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove options object (unless anyone can think of a good use for it?
remove callback
Maybe fewer examples?
Should the resourceType be singular? ie create('program') not create('programs')
Is the create('tracker') API nonsense? Surely that's post('tracker')?
Should we throw if a path is passed?
destroy
remove optoins
remove callback
Docs are wrong (not "a generic helper function"). Dead link too.
Maybe signature should be destroy(resourceType, resourceOrPath), where resourceOrPath can be a string or array of strings. Ie let me remove multiple things in one call.
upsert uses this query object to select what to upsert. that's kind of interesting. Should this be the general pattern? Take a selector argument which can be an id, a path, or a query object? That would apply to all main operations
I am upset about pluralisation in upsert('trackedEntities'). Shouldn't it be 'trackedEntity'?
This applies to all helpers. It's unintuitive unless you think in terms of the dhis2 API (which of course this maps to).
I am not sure if it's more or less annoying to use singular resource types. Maybe we should provide a mapping to optionally support singular forms? It's a bit more effort but it'll really help users I think
create
create('program')
notcreate('programs')
create('tracker'
) API nonsense? Surely that'spost('tracker')
?destroy
destroy(resourceType, resourceOrPath)
, whereresourceOrPath
can be a string or array of strings. Ie let me remove multiple things in one call.update
upsert
maybe include #598 suggestions?
The text was updated successfully, but these errors were encountered: