Class: Whatser::Comment
- Defined in:
- lib/whatser/resources/comment.rb
Instance Attribute Summary collapse
-
#activity_feed_id ⇒ Object
Returns the value of attribute activity_feed_id.
-
#body ⇒ Object
Returns the value of attribute body.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#poi_id ⇒ Object
Returns the value of attribute poi_id.
-
#subject_id ⇒ Object
Returns the value of attribute subject_id.
-
#subject_name ⇒ Object
Returns the value of attribute subject_name.
-
#subject_type ⇒ Object
Returns the value of attribute subject_type.
-
#user_avatar ⇒ Object
Returns the value of attribute user_avatar.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
Attributes inherited from Resource
Class Method Summary collapse
- .create(resource_name, resource_id, body) ⇒ Object
- .delete(id) ⇒ Object
- .media(media_id, opts = {}) ⇒ Object
- .poi(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
#activity_feed_id ⇒ Object
Returns the value of attribute activity_feed_id.
3 4 5 |
# File 'lib/whatser/resources/comment.rb', line 3 def activity_feed_id @activity_feed_id end |
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'lib/whatser/resources/comment.rb', line 4 def body @body end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/whatser/resources/comment.rb', line 3 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/whatser/resources/comment.rb', line 3 def id @id end |
#poi_id ⇒ Object
Returns the value of attribute poi_id.
3 4 5 |
# File 'lib/whatser/resources/comment.rb', line 3 def poi_id @poi_id end |
#subject_id ⇒ Object
Returns the value of attribute subject_id.
3 4 5 |
# File 'lib/whatser/resources/comment.rb', line 3 def subject_id @subject_id end |
#subject_name ⇒ Object
Returns the value of attribute subject_name.
4 5 6 |
# File 'lib/whatser/resources/comment.rb', line 4 def subject_name @subject_name end |
#subject_type ⇒ Object
Returns the value of attribute subject_type.
4 5 6 |
# File 'lib/whatser/resources/comment.rb', line 4 def subject_type @subject_type end |
#user_avatar ⇒ Object
Returns the value of attribute user_avatar.
4 5 6 |
# File 'lib/whatser/resources/comment.rb', line 4 def user_avatar @user_avatar end |
#user_id ⇒ Object
Returns the value of attribute user_id.
3 4 5 |
# File 'lib/whatser/resources/comment.rb', line 3 def user_id @user_id end |
#user_name ⇒ Object
Returns the value of attribute user_name.
4 5 6 |
# File 'lib/whatser/resources/comment.rb', line 4 def user_name @user_name end |
Class Method Details
.create(resource_name, resource_id, body) ⇒ Object
19 20 21 |
# File 'lib/whatser/resources/comment.rb', line 19 def create(resource_name, resource_id, body) api_request :post, "/api/#{resource_name}/#{resource_id}/tags", {:body => {'comment' => {'body' => body}} } end |
.delete(id) ⇒ Object
15 16 17 |
# File 'lib/whatser/resources/comment.rb', line 15 def delete(id) api_request :delete, "/api/comments/#{id}" end |
.media(media_id, opts = {}) ⇒ Object
11 12 13 |
# File 'lib/whatser/resources/comment.rb', line 11 def media(media_id, opts={}) api_request :get, "/api/media/#{media_id}/comments", {:query => opts} end |
.poi(poi_id, opts = {}) ⇒ Object
7 8 9 |
# File 'lib/whatser/resources/comment.rb', line 7 def poi(poi_id, opts={}) api_request :get, "/api/poi/#{poi_id}/comments", {:query => opts} end |