Module: Feedlr::Gateway::Subscriptions
- Included in:
- Client
- Defined in:
- lib/feedlr/gateway/subscriptions.rb
Overview
Subscriptions API
Instance Method Summary collapse
-
#add_subscription(subscription) ⇒ Feedlr::Base
Subscribe to a feed.
-
#delete_subscription(subscription_id) ⇒ Feedlr::Success
Unsubscribe from a feed.
-
#update_subscription(subscription) ⇒ Feedlr::Success
Update an existing subscription.
-
#user_subscriptions ⇒ Feedlr::Collection
Get the user's subscriptions.
Instance Method Details
#add_subscription(subscription) ⇒ Feedlr::Base
Subscribe to a feed
20 21 22 |
# File 'lib/feedlr/gateway/subscriptions.rb', line 20 def add_subscription(subscription) build_object(:post , '/subscriptions' , subscription) end |
#delete_subscription(subscription_id) ⇒ Feedlr::Success
Unsubscribe from a feed
38 39 40 |
# File 'lib/feedlr/gateway/subscriptions.rb', line 38 def delete_subscription(subscription_id) build_object(:delete , "/subscriptions/#{CGI.escape(subscription_id) }") end |
#update_subscription(subscription) ⇒ Feedlr::Success
Update an existing subscription
29 30 31 |
# File 'lib/feedlr/gateway/subscriptions.rb', line 29 def update_subscription(subscription) add_subscription(subscription) end |
#user_subscriptions ⇒ Feedlr::Collection
Get the user's subscriptions
11 12 13 |
# File 'lib/feedlr/gateway/subscriptions.rb', line 11 def user_subscriptions build_object(:get , '/subscriptions') end |