Closed mstenta closed 5 years ago
I decided to leave getAreas()
as its own method, but I refactored it (and getRecords()
) into some more granular methods that will allow for using the same two-request methodology to get other taxonomy term types.
https://github.com/mstenta/farm_sync/commit/1c81fc68b18191a393bf7394c319532d1fe15488 https://github.com/mstenta/farm_sync/commit/e9f5f208df74dda0e85256c351ddde6859a0216b https://github.com/mstenta/farm_sync/commit/f40964aac5662b6b22908e2fd0c0cb64fcaae5c0
I added a specialized
getAreas()
method to the farmOS class, which performs twogetRecords()
requests (because with areas you need to get the vocabulary ID first, then you can query for areas).It might make sense to merge that logic into
getRecords()
, though, so that the class provides some abstraction for dealing with more complex requests like that. Getting a list of units would require the same two requests.