Class: Whatser::Tag
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#poi_id ⇒ Object
Returns the value of attribute poi_id.
-
#touch_detail_pic ⇒ Object
Returns the value of attribute touch_detail_pic.
-
#touch_list_pic ⇒ Object
Returns the value of attribute touch_list_pic.
-
#wap_detail_pic ⇒ Object
Returns the value of attribute wap_detail_pic.
-
#wap_list_pic ⇒ Object
Returns the value of attribute wap_list_pic.
-
#web_detail_pic ⇒ Object
Returns the value of attribute web_detail_pic.
-
#web_list_pic ⇒ Object
Returns the value of attribute web_list_pic.
Attributes inherited from Resource
Class Method Summary collapse
- .create(poi_id, tag_name) ⇒ Object
- .delete(poi_id, tag_name) ⇒ Object
- .list(poi_id, opts = {}) ⇒ Object
Instance Method Summary collapse
Methods inherited from Resource
#api_request, api_request, client, convert_data_to_model, from_hash_to_model, #initialize, set
Constructor Details
This class inherits a constructor from Whatser::Resource
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/whatser/resources/tag.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/whatser/resources/tag.rb', line 4 def name @name end |
#poi_id ⇒ Object
Returns the value of attribute poi_id.
3 4 5 |
# File 'lib/whatser/resources/tag.rb', line 3 def poi_id @poi_id end |
#touch_detail_pic ⇒ Object
Returns the value of attribute touch_detail_pic.
5 6 7 |
# File 'lib/whatser/resources/tag.rb', line 5 def touch_detail_pic @touch_detail_pic end |
#touch_list_pic ⇒ Object
Returns the value of attribute touch_list_pic.
5 6 7 |
# File 'lib/whatser/resources/tag.rb', line 5 def touch_list_pic @touch_list_pic end |
#wap_detail_pic ⇒ Object
Returns the value of attribute wap_detail_pic.
5 6 7 |
# File 'lib/whatser/resources/tag.rb', line 5 def wap_detail_pic @wap_detail_pic end |
#wap_list_pic ⇒ Object
Returns the value of attribute wap_list_pic.
5 6 7 |
# File 'lib/whatser/resources/tag.rb', line 5 def wap_list_pic @wap_list_pic end |
#web_detail_pic ⇒ Object
Returns the value of attribute web_detail_pic.
5 6 7 |
# File 'lib/whatser/resources/tag.rb', line 5 def web_detail_pic @web_detail_pic end |
#web_list_pic ⇒ Object
Returns the value of attribute web_list_pic.
5 6 7 |
# File 'lib/whatser/resources/tag.rb', line 5 def web_list_pic @web_list_pic end |
Class Method Details
.create(poi_id, tag_name) ⇒ Object
12 13 14 |
# File 'lib/whatser/resources/tag.rb', line 12 def create(poi_id, tag_name) api_request :post, "/api/poi/#{poi_id}/tags", {:body => {'tagging' => {'name' => tag_name}} } end |
.delete(poi_id, tag_name) ⇒ Object
16 17 18 |
# File 'lib/whatser/resources/tag.rb', line 16 def delete(poi_id, tag_name) api_request :delete, "/api/poi/#{poi_id}/tags/#{tag_name}" end |
.list(poi_id, opts = {}) ⇒ Object
8 9 10 |
# File 'lib/whatser/resources/tag.rb', line 8 def list(poi_id, opts={}) api_request :get, "/api/poi/#{poi_id}/tags", {:query => opts} end |
Instance Method Details
#delete ⇒ Object
25 26 27 |
# File 'lib/whatser/resources/tag.rb', line 25 def delete self.class.delete(poi_id, name) end |
#save ⇒ Object
21 22 23 |
# File 'lib/whatser/resources/tag.rb', line 21 def save self.class.create(poi_id, name) end |
#to_params ⇒ Object
29 30 31 |
# File 'lib/whatser/resources/tag.rb', line 29 def to_params {:name => name} end |