Right now we can only accept the following parameters for farm.log.get() requests: type, done, log_owner and page. These are hardcoded with defaults so we restrict what kinds of requests can be sent. After some discussion with @mstenta and @paul121, I realize we should generalize this method so that any parameters can be accepted, and just let the request fail if the parameters are not structured properly. This will mean we won't have to update the library as frequently when there are changes to the farmOS API.
This is also necessary for expanding the type of logs Field Modules (farmOS/farmOS-client#241) can filter for when they are registered with Field Kit; for instance, I'd like the weather module to be able to filter by category so it can import and cache historical weather data.
Right now we can only accept the following parameters for
farm.log.get()
requests:type
,done
,log_owner
andpage
. These are hardcoded with defaults so we restrict what kinds of requests can be sent. After some discussion with @mstenta and @paul121, I realize we should generalize this method so that any parameters can be accepted, and just let the request fail if the parameters are not structured properly. This will mean we won't have to update the library as frequently when there are changes to the farmOS API.This is also necessary for expanding the type of logs Field Modules (farmOS/farmOS-client#241) can filter for when they are registered with Field Kit; for instance, I'd like the weather module to be able to filter by category so it can import and cache historical weather data.