Module: Simplewoo::Client::Tag

Included in:
Simplewoo::Client
Defined in:
lib/simplewoo/client/tag.rb

Instance Method Summary collapse

Instance Method Details

#add_tag(slider_id, tag_id, value, options = {}) ⇒ Object

Returns the matched entities and matched personalities for the slider

Simplewoo::Client.add_tag(1, 1, true)

Parameters:

  • slider_id (Integer)
    • The slider id that the matches are for

  • tag_id (Integer)
    • The tag id that the matches are for

  • value (Boolean)
    • The tag id that the matches are for



13
14
15
16
# File 'lib/simplewoo/client/tag.rb', line 13

def add_tag(slider_id, tag_id, value, options = {})
  options.merge!(me: value)
  post("/sliders/#{slider_id}/tags/#{tag_id}/add", options)
end

#tag(tag_id, options = {}) ⇒ Hashie::Mash

Returns a tag

Simplewoo::Client.tag(1, 1, true)

Parameters:

  • tag_id (Integer)
    • The tag id you want returned

Returns:

  • (Hashie::Mash)

    Tag - the requested tag



26
27
28
# File 'lib/simplewoo/client/tag.rb', line 26

def tag(tag_id, options = {})
  get("/tags/#{tag_id}", options)
end