Module: Brickset::Api::Collection::Set
- Extended by:
- ActiveSupport::Concern
- Included in:
- Client
- Defined in:
- lib/brickset/api/collection/set.rb
Instance Method Summary collapse
- #collection_totals ⇒ Object
- #update_collection(options) ⇒ Object
- #update_collection_number_owned(options) ⇒ Object
- #update_collection_owned(options) ⇒ Object
- #update_collection_user_notes(options) ⇒ Object
- #update_collection_wanted(options) ⇒ Object
- #update_user_rating(options) ⇒ Object
- #user_notes ⇒ Object
Instance Method Details
#collection_totals ⇒ Object
42 43 44 45 |
# File 'lib/brickset/api/collection/set.rb', line 42 def collection_totals xml = call('/getCollectionTotals') Brickset::Elements::CollectionTotal.parse(xml) end |
#update_collection(options) ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/brickset/api/collection/set.rb', line 47 def update_collection() () if valid?(:update_collection) handle_update call('/setCollection', setID: set_id, qtyOwned: number_owned, wanted: wanted) else raise ValidationError, self.errors..to_sentence end end |
#update_collection_number_owned(options) ⇒ Object
77 78 79 80 81 82 83 84 85 |
# File 'lib/brickset/api/collection/set.rb', line 77 def update_collection_number_owned() () if valid?(:update_collection_number_owned) handle_update call('/setCollection_qtyOwned', setID: set_id, qtyOwned: number_owned) else raise ValidationError, self.errors..to_sentence end end |
#update_collection_owned(options) ⇒ Object
57 58 59 60 61 62 63 64 65 |
# File 'lib/brickset/api/collection/set.rb', line 57 def update_collection_owned() () if valid?(:update_collection_owned) handle_update call('/setCollection_owns', setID: set_id, owned: owned) else raise ValidationError, self.errors..to_sentence end end |
#update_collection_user_notes(options) ⇒ Object
87 88 89 90 91 92 93 94 95 |
# File 'lib/brickset/api/collection/set.rb', line 87 def update_collection_user_notes() () if valid?(:update_collection_user_notes) handle_update call('/setCollection_userNotes', setID: set_id, notes: notes) else raise ValidationError, self.errors..to_sentence end end |
#update_collection_wanted(options) ⇒ Object
67 68 69 70 71 72 73 74 75 |
# File 'lib/brickset/api/collection/set.rb', line 67 def update_collection_wanted() () if valid?(:update_collection_wanted) handle_update call('/setCollection_wants', setID: set_id, wanted: wanted) else raise ValidationError, self.errors..to_sentence end end |
#update_user_rating(options) ⇒ Object
97 98 99 100 101 102 103 104 105 |
# File 'lib/brickset/api/collection/set.rb', line 97 def () () if valid?(:update_user_rating) handle_update call('/setUserRating', setID: set_id, rating: ) else raise ValidationError, self.errors..to_sentence end end |