module Brickset::Api::Collection::Set
Public Instance Methods
collection_totals()
click to toggle source
# File lib/brickset/api/collection/set.rb, line 42 def collection_totals xml = call('/getCollectionTotals') Brickset::Elements::CollectionTotal.parse(xml) end
update_collection(options)
click to toggle source
# File lib/brickset/api/collection/set.rb, line 47 def update_collection(options) extract_attributes_from_options(options) if valid?(:update_collection) handle_update call('/setCollection', setID: set_id, qtyOwned: number_owned, wanted: wanted) else raise ValidationError, self.errors.full_messages.to_sentence end end
update_collection_number_owned(options)
click to toggle source
# File lib/brickset/api/collection/set.rb, line 77 def update_collection_number_owned(options) extract_attributes_from_options(options) if valid?(:update_collection_number_owned) handle_update call('/setCollection_qtyOwned', setID: set_id, qtyOwned: number_owned) else raise ValidationError, self.errors.full_messages.to_sentence end end
update_collection_owned(options)
click to toggle source
# File lib/brickset/api/collection/set.rb, line 57 def update_collection_owned(options) extract_attributes_from_options(options) if valid?(:update_collection_owned) handle_update call('/setCollection_owns', setID: set_id, owned: owned) else raise ValidationError, self.errors.full_messages.to_sentence end end
update_collection_user_notes(options)
click to toggle source
# File lib/brickset/api/collection/set.rb, line 87 def update_collection_user_notes(options) extract_attributes_from_options(options) if valid?(:update_collection_user_notes) handle_update call('/setCollection_userNotes', setID: set_id, notes: notes) else raise ValidationError, self.errors.full_messages.to_sentence end end
update_collection_wanted(options)
click to toggle source
# File lib/brickset/api/collection/set.rb, line 67 def update_collection_wanted(options) extract_attributes_from_options(options) if valid?(:update_collection_wanted) handle_update call('/setCollection_wants', setID: set_id, wanted: wanted) else raise ValidationError, self.errors.full_messages.to_sentence end end
update_user_rating(options)
click to toggle source
# File lib/brickset/api/collection/set.rb, line 97 def update_user_rating(options) extract_attributes_from_options(options) if valid?(:update_user_rating) handle_update call('/setUserRating', setID: set_id, rating: rating) else raise ValidationError, self.errors.full_messages.to_sentence end end
user_notes()
click to toggle source
# File lib/brickset/api/collection/set.rb, line 107 def user_notes xml = call('/getUserNotes') Brickset::Elements::UserNote.parse(xml).reject do |user_note| user_note.set_id.nil? && user_note.user_notes.nil? end end