Collection
Collection is a class that represents a collection in the MarcSync API.
METHODS
:createEntry(data: EntryData)
Creates a new entry in the collection and returns it as an Entry object.
InvalidAccessToken - Thrown when the accessToken is invalid.
CollectionNotFound - Thrown when the collection does not exist.
InvalidEntryData - Thrown when the EntryData is invalid.
:updateEntries(filters: EntryData, data: EntryData)
Updates all entries that match the specified filters with the specified data.
InvalidAccessToken - Thrown when the accessToken is invalid.
CollectionNotFound - Thrown when the collection does not exist.
InvalidEntryData - Thrown when the EntryData is invalid.
:getEntries(filters: EntryData)
Returns all entries that match the specified filters as an array of Entry objects.
InvalidAccessToken - Thrown when the accessToken is invalid.
CollectionNotFound - Thrown when the collection does not exist.
InvalidEntryData - Thrown when the EntryData is invalid.
:deleteEntries(filters: EntryData)
Deletes all entries that match the specified filters.
InvalidAccessToken - Thrown when the accessToken is invalid.
CollectionNotFound - Thrown when the collection does not exist.
InvalidEntryData - Thrown when the EntryData is invalid.
:drop()
Deletes the collection.
InvalidAccessToken - Thrown when the accessToken is invalid.
CollectionNotFound - Thrown when the collection does not exist.