Currently if a user wants to specify country and sector when creating an asset with the Kobo$create_asset method (#40), he/she needs to provide both parameters as lists with two values value and label. It can be confusing because:
- It would be more intuitive to provide both sector and country as strings
- It's not clear what is the difference between
label and value
- It might be not clear that an exhaustive list of labels and values exists
Current solution: description of the parameters in the method's documentation says that a list with value and label is expected and a link to the corresponding values and labels is provided.
More convenient way could be to parse this static list and create a lookup table. Using this table, we could simplify the input of these two parameters for a user.
Potential issues: the lookup table should be updated on some regular basis and parsed. Some meaningful and helpful error message should be returned if the input value is not in the list.
Currently if a user wants to specify country and sector when creating an asset with the
Kobo$create_assetmethod (#40), he/she needs to provide both parameters as lists with two valuesvalueandlabel. It can be confusing because:labelandvalueCurrent solution: description of the parameters in the method's documentation says that a list with value and label is expected and a link to the corresponding values and labels is provided.
More convenient way could be to parse this static list and create a lookup table. Using this table, we could simplify the input of these two parameters for a user.
Potential issues: the lookup table should be updated on some regular basis and parsed. Some meaningful and helpful error message should be returned if the input value is not in the list.