Open retorquere opened 5 years ago
I don't understand what this says. What are keys in this context?
I think it means the keys in the key:value pairs for an item (e.g. title, publication, ...).
However, I am not sure why it would be possible to create items with invalid keys?
Does the existence of this method mean that items created through the API should be checked with check_items?
I don't have a clue.
Ok let me see if I can work it out.
Why though? If you don't have a live use-case behind this, what's the point?
Check whether items to be created on the server contain only valid keys. This method first creates a set of valid keys by calling item_fields(), then compares the user-created dicts to it. If any keys in the user-created dicts are unknown, a InvalidItemFields exception is raised, detailing the invalid fields.