Sha256: f99e88f7d89a3d3bf600d64010d6e4a09e15ca2fc89bdcf3141e99351fb8c21b

Contents?: true

Size: 379 Bytes

Versions: 33

Compression:

Stored size: 379 Bytes

Contents

module Propono
  class PostSubscription
    include Sns

    def self.create(topic, endpoint)
      new(topic, endpoint).create
    end

    def initialize(topic_id, endpoint)
      @topic_id = topic_id
      @endpoint = endpoint
    end

    def create
      topic_arn = TopicCreator.find_or_create(@topic_id)
      sns.subscribe(topic_arn, @endpoint, 'http')
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
propono-0.8.0 lib/propono/components/post_subscription.rb
propono-0.7.0 lib/propono/components/post_subscription.rb
propono-0.6.3 lib/propono/components/post_subscription.rb
propono-0.6.1 lib/propono/components/post_subscription.rb
propono-0.6.0 lib/propono/components/post_subscription.rb
propono-0.5.6 lib/propono/components/post_subscription.rb
propono-0.5.5 lib/propono/components/post_subscription.rb
propono-0.5.4 lib/propono/components/post_subscription.rb
propono-0.5.3 lib/propono/components/post_subscription.rb
propono-0.5.2 lib/propono/components/post_subscription.rb
propono-0.5.1 lib/propono/components/post_subscription.rb
propono-0.5.0 lib/propono/components/post_subscription.rb
propono-0.4.0 lib/propono/components/post_subscription.rb