Module: Remind101::Client::Subscribers
- Extended by:
- Rescuable
- Included in:
- Remind101::Client
- Defined in:
- lib/remind101/client/subscribers.rb
Instance Method Summary collapse
-
#remove_subscriber!(group_id, subscriber_id) ⇒ Object
Public: Removes a subscriber from the group.
-
#remove_subscribers!(group_id) ⇒ Object
Public: Removes all subscribers from the group.
-
#subscribers(group_id) ⇒ Object
Public: Returns all subscribers for the given group.
Methods included from Rescuable
Instance Method Details
#remove_subscriber!(group_id, subscriber_id) ⇒ Object
Public: Removes a subscriber from the group.
Examples
remind101.remove_subscriber! 1234, 4321
Returns the removed subscriber.
23 24 25 |
# File 'lib/remind101/client/subscribers.rb', line 23 def remove_subscriber!(group_id, subscriber_id) api_delete("/groups/#{group_id}/subscribers/#{subscriber_id}").body end |
#remove_subscribers!(group_id) ⇒ Object
Public: Removes all subscribers from the group.
Examples
remind101.remove_subscribers!
Returns true if all subscribers were removed.
35 36 37 |
# File 'lib/remind101/client/subscribers.rb', line 35 def remove_subscribers!(group_id) api_delete("/groups/#{group_id}/subscribers").body end |
#subscribers(group_id) ⇒ Object
Public: Returns all subscribers for the given group.
Examples
remind101.subscribers 1234
#=> [{ ... }]
Returns an Array of all subscribers.
12 13 14 |
# File 'lib/remind101/client/subscribers.rb', line 12 def subscribers(group_id) api_get("/groups/#{group_id}/subscribers").body end |