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
__NOTE:__ Areas use a `tid` property, unlike logs and assets which have an `id`. This stands for taxonomy ID. In the future this may be changed to make it more consistent with the other entities.
347
-
348
-
Some common area types include:
349
-
350
-
-`field`
351
-
-`building`
352
-
-`property`
353
-
-`water`
354
-
-`other`
355
-
356
-
Other area types may be provided by add-on modules in farmOS.
357
-
358
-
#### `.send()`
359
-
360
-
Send can be used to create a new area, or if the `tid` property is included, to update an existing area:
361
-
362
-
```python
363
-
364
-
365
-
366
-
```
367
-
368
-
#### `.delete()`
369
-
370
-
```python
371
-
farm_client.area.delete(123)
372
-
```
373
-
374
-
### Taxonomy Terms
375
-
376
-
farmOS allows farmers to build vocabularies of terms for various categorization
377
-
purposes. These are referred to as "taxonomies" in farmOS (and Drupal), although
378
-
"vocabulary" is sometimes used interchangeably.
379
-
380
-
Some things that are represented as taxonomy terms include quantity units,
381
-
crops/varieties, animal species/breeds, input materials, and log categories.
382
-
See "Endpoints" above for specific API endpoints URLs.
383
-
384
-
A very basic taxonomy term JSON structure looks like this:
385
-
386
-
```json
387
-
{
388
-
"tid": "3",
389
-
"name": "Cabbage",
390
-
"description": "",
391
-
"vocabulary": {
392
-
"id": "7",
393
-
"resource": "taxonomy_vocabulary",
394
-
},
395
-
"parent": [
396
-
{
397
-
"id": "10",
398
-
"resource": "taxonomy_term",
399
-
},
400
-
],
401
-
"weight": "5",
402
-
}
403
-
```
404
-
405
-
The `tid` is the unique ID of the term (database primary key). When creating a
406
-
new term, the only required fields are `name` and `vocabulary`. The vocabulary
407
-
is an ID that corresponds to the specific vocabulary the term will be a part of
408
-
(eg: quantity units, crops/varieties, log categories, etc). The fields `parent`
409
-
and `weight` control term hierarchy and ordering (a heavier `weight` will sort
0 commit comments