It would be nice if the library's caller didn't have to do a vocabulary lookup manually if they already knew the machine name of the vocabulary of the term they're trying to create/update, but just don't know the vid.
To achieve this, we could allow the caller to send a log with a vocabulary property which is either an object, containing the vocabulary's id, as required by the server, or it could just be string, corresponding to the machine name of the vocabulary. Under the hood, the .send() method could call vocabulary.(machine_name) to get the vid before sending the POST/PUT request for the term.
It would be nice if the library's caller didn't have to do a vocabulary lookup manually if they already knew the machine name of the vocabulary of the term they're trying to create/update, but just don't know the
vid
.To achieve this, we could allow the caller to send a log with a vocabulary property which is either an object, containing the vocabulary's
id
, as required by the server, or it could just be string, corresponding to the machine name of the vocabulary. Under the hood, the.send()
method could callvocabulary.(machine_name)
to get thevid
before sending the POST/PUT request for the term.