Module: Tigre::TagComponents
Instance Method Summary collapse
-
#not_tagged(options = {}) ⇒ Object
optional params options => Hash :after => Ruby DateTime object OR Integer (epoch time) :before => Ruby DateTime object OR Integer (epoch time) :page => Integer, :default => 0 :per => Integer, :default => 50.
-
#not_tagged_with(tags, options = {}) ⇒ Object
required params tags => String => I.E ‘foo’ tags => String (comma seperated) => I.E ‘foo,bar,baz’ tags => Array => [‘foo’, ‘bar’, ‘baz’] optional params options => Hash :after => Ruby DateTime object OR Integer (epoch time) :before => Ruby DateTime object OR Integer (epoch time) :page => Integer, :default => 0 :per => Integer, :default => 50.
-
#remove_tags(hash) ⇒ Object
required params hash => Hash :digest => String, The digest type :value => String, The digest value :tag_list => String (comma seperated) => I.E ‘foo,bar,baz’ :tag_list => Array => [‘foo’, ‘bar’, ‘baz’].
-
#tagged_count(tags, options = {}) ⇒ Object
required params tags => String => I.E ‘foo’ tags => String (comma seperated) => I.E ‘foo,bar,baz’ tags => Array => [‘foo’, ‘bar’, ‘baz’] optional params options => Hash :after => Ruby DateTime object OR Integer (epoch time) :before => Ruby DateTime object OR Integer (epoch time).
-
#tagged_with(tags, options = {}) ⇒ Object
required params tags => String => I.E ‘foo’ tags => String (comma seperated) => I.E ‘foo,bar,baz’ tags => Array => [‘foo’, ‘bar’, ‘baz’] optional params options => Hash :after => Ruby DateTime object OR Integer (epoch time) :before => Ruby DateTime object OR Integer (epoch time) :page => Integer, :default => 0 :per => Integer, :default => 50.
Instance Method Details
#not_tagged(options = {}) ⇒ Object
optional params
options => Hash
:after => Ruby DateTime object OR Integer (epoch time)
:before => Ruby DateTime object OR Integer (epoch time)
:page => Integer, :default => 0
:per => Integer, :default => 50
65 66 67 68 |
# File 'lib/tigre-client/common/tag_components.rb', line 65 def not_tagged(={}) common_params() Tigre.get_connection("/#{get_klass}/not_tagged?#{before_after_page_per}") end |
#not_tagged_with(tags, options = {}) ⇒ Object
required params
tags => String => I.E 'foo'
tags => String (comma seperated) => I.E 'foo,bar,baz'
tags => Array => ['foo', 'bar', 'baz']
optional params
options => Hash
:after => Ruby DateTime object OR Integer (epoch time)
:before => Ruby DateTime object OR Integer (epoch time)
:page => Integer, :default => 0
:per => Integer, :default => 50
49 50 51 52 53 54 55 56 57 |
# File 'lib/tigre-client/common/tag_components.rb', line 49 def not_tagged_with(, ={}) if == '' raise "Missing tags parameter" end = package_array_list() common_params() Tigre.get_connection("/#{get_klass}/not_tagged_with?tags=#{}&#{before_after_page_per}") end |
#remove_tags(hash) ⇒ Object
required params
hash => Hash
:digest => String, The digest type
:value => String, The digest value
:tag_list => String (comma seperated) => I.E 'foo,bar,baz'
:tag_list => Array => ['foo', 'bar', 'baz']
30 31 32 33 34 35 36 37 |
# File 'lib/tigre-client/common/tag_components.rb', line 30 def (hash) unless hash[:digest] && hash[:value] && hash[:tag_list] raise 'Missing parameter :digest or :value or :tag_list' end update_data = {"tag_list" => package_array_list(hash[:tag_list])} Tigre.put_connection("/#{get_klass}/#{hash[:digest]}/value/#{hash[:value]}/remove_tags", update_data) end |
#tagged_count(tags, options = {}) ⇒ Object
required params
tags => String => I.E 'foo'
tags => String (comma seperated) => I.E 'foo,bar,baz'
tags => Array => ['foo', 'bar', 'baz']
optional params
options => Hash
:after => Ruby DateTime object OR Integer (epoch time)
:before => Ruby DateTime object OR Integer (epoch time)
78 79 80 81 82 83 84 85 86 |
# File 'lib/tigre-client/common/tag_components.rb', line 78 def tagged_count(, ={}) if == '' raise "Missing tags parameter" end = package_array_list() common_params() Tigre.get_connection("/#{get_klass}/tagged_with?tags=#{}&#{before_after}") end |
#tagged_with(tags, options = {}) ⇒ Object
required params
tags => String => I.E 'foo'
tags => String (comma seperated) => I.E 'foo,bar,baz'
tags => Array => ['foo', 'bar', 'baz']
optional params
options => Hash
:after => Ruby DateTime object OR Integer (epoch time)
:before => Ruby DateTime object OR Integer (epoch time)
:page => Integer, :default => 0
:per => Integer, :default => 50
14 15 16 17 18 19 20 21 22 |
# File 'lib/tigre-client/common/tag_components.rb', line 14 def tagged_with(, ={}) if == '' raise "Missing tags parameter" end common_params() = package_array_list() Tigre.get_connection("/#{get_klass}/tagged_with?tags=#{}&#{before_after_page_per}") end |