Class: VerticalResponse::API::SocialPost
- Defined in:
- lib/social_post.rb
Constant Summary collapse
- MESSAGE_TYPE =
'social_post'
Instance Attribute Summary
Attributes inherited from Client
Class Method Summary collapse
-
.all(options = {}) ⇒ Object
The SocialPost API does not support the ‘all’ method on its own for now.
-
.base_uri(*args) ⇒ Object
Base URI for the Email resource.
-
.resource_name ⇒ Object
Overwrite from parent class since it’s a special type of resource name (with messages at the beginning).
Methods inherited from Resource
class_for_resource, class_name, create, #delete, exclude_methods, find, #id, id_attribute_name, id_regexp, object_collection, resource_id_from_url, #stats, #update, #url, validate_supported_method!
Methods inherited from Client
add_default_query_param, assign_headers, build_params, build_query_params, config, default_query_params, embed_resource, #initialize, resource_uri
Constructor Details
This class inherits a constructor from VerticalResponse::API::Client
Class Method Details
.all(options = {}) ⇒ Object
The SocialPost API does not support the ‘all’ method on its own for now. To get all social posts we need to do it through the Message API
29 30 31 |
# File 'lib/social_post.rb', line 29 def all( = {}) Message.all(.merge({ :message_type => MESSAGE_TYPE })) end |
.base_uri(*args) ⇒ Object
Base URI for the Email resource
17 18 19 |
# File 'lib/social_post.rb', line 17 def base_uri(*args) @base_uri ||= File.join(super.to_s, 'messages', 'social_posts') end |
.resource_name ⇒ Object
Overwrite from parent class since it’s a special type of resource name (with messages at the beginning)
23 24 25 |
# File 'lib/social_post.rb', line 23 def resource_name 'messages/social_posts' end |