Class: Textmagic::REST::Replies
- Inherits:
-
ListResource
- Object
- ListResource
- Textmagic::REST::Replies
- Defined in:
- lib/textmagic-ruby/rest/replies.rb
Instance Method Summary collapse
-
#create(params) ⇒ Object
Creating is not supported.
-
#delete(uid) ⇒ Object
Delete reply by ID.
-
#get(uid) ⇒ Object
Get reply by ID.
-
#list(params = {}) ⇒ Object
Get all user replies.
-
#update(uid, params) ⇒ Object
Updating is not supported.
Methods inherited from ListResource
Methods included from Utils
#key_map, #resource, #to_camel_case, #to_underscore_case
Constructor Details
This class inherits a constructor from Textmagic::REST::ListResource
Instance Method Details
#create(params) ⇒ Object
Creating is not supported
58 59 60 |
# File 'lib/textmagic-ruby/rest/replies.rb', line 58 def create(params) raise '`create` method is not supported for this resource' end |
#delete(uid) ⇒ Object
Delete reply by ID. Returns true if success.
- uid
-
Reply ID. Required.
Example:
r = client.replies.delete 28919
51 52 53 |
# File 'lib/textmagic-ruby/rest/replies.rb', line 51 def delete(uid) super uid end |
#get(uid) ⇒ Object
Get reply by ID. Returns Reply object.
- uid
-
Reply ID. Required.
Example:
@reply = client.replies.get 19011
14 15 16 |
# File 'lib/textmagic-ruby/rest/replies.rb', line 14 def get(uid) super uid end |
#list(params = {}) ⇒ Object
Get all user replies. Returns PaginateResource object, contains array of Reply objects.
The following params keys are supported:
- search
-
If true then search replies using ‘ids` and/or `query`. Defaults false.
- page
-
Fetch specified results page. Defaults 1
- limit
-
How many results on page. Defaults 10
- ids
-
Find replies by ID(s). Using with ‘search`=true.
- query
-
Find replies by specified search query. Using with ‘search`=true..
Example:
@replies = client.replies.list
38 39 40 |
# File 'lib/textmagic-ruby/rest/replies.rb', line 38 def list(params={}) super params end |
#update(uid, params) ⇒ Object
Updating is not supported
65 66 67 |
# File 'lib/textmagic-ruby/rest/replies.rb', line 65 def update(uid, params) raise '`update` method is not supported for this resource' end |