Module: Delicious::Bundles::Methods::Set
- Extended by:
- ActiveSupport::Concern
- Included in:
- Api
- Defined in:
- lib/delicious/bundles/methods/set.rb
Instance Method Summary collapse
-
#set(name, tags) ⇒ Bundle
Update bundle tags.
Instance Method Details
#set(name, tags) ⇒ Bundle
Update bundle tags
16 17 18 19 20 21 22 |
# File 'lib/delicious/bundles/methods/set.rb', line 16 def set(name, ) fail Delicious::Error, "Bundle name can't be blank" if name.nil? fail Delicious::Error, 'Please specify at least 1 tag' unless ( || []).any? response = @client.connection.post '/v1/tags/bundles/set', bundle: name, tags: .join(',') fail Delicious::Error, response.body['result'] unless 'ok' == response.body['result'] Bundle.build_persisted @client, name: name, tags: end |