module Brickset::Api::Collection::Minifig

Public Instance Methods

minifig_collection(query: '', owned: '', wanted: '') click to toggle source
# File lib/brickset/api/collection/minifig.rb, line 17
def minifig_collection(query: '', owned: '', wanted: '')
  xml = call('/getMinifigCollection', query: query, owned: owned, wanted: wanted)
  Brickset::Elements::MinifigCollection.parse xml
end
update_minifig_collection(options) click to toggle source
# File lib/brickset/api/collection/minifig.rb, line 22
def update_minifig_collection(options)
  extract_attributes_from_options(options)

  if valid?(:update_minifig_collection)
    handle_update call('/setMinifigCollection', minifigNumber: minifig_number, qtyOwned: number_owned, wanted: wanted)
  else
    raise ValidationError, self.errors.full_messages.to_sentence
  end
end