Module: Feedlr::Gateway::Subscriptions

Included in:
Client
Defined in:
lib/feedlr/gateway/subscriptions.rb

Overview

Subscriptions API

Instance Method Summary collapse

Instance Method Details

#add_subscription(subscription) ⇒ Feedlr::Base

Subscribe to a feed

Parameters:

  • subscription (Hash)

Returns:

See Also:



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

Parameters:

  • subscription_id (String)

Returns:

See Also:



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_subscriptionsFeedlr::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