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-1.7.0 lib/propono/components/post_subscription.rb
propono-1.6.0 lib/propono/components/post_subscription.rb
propono-1.5.0 lib/propono/components/post_subscription.rb
propono-1.4.0 lib/propono/components/post_subscription.rb
propono-1.3.0 lib/propono/components/post_subscription.rb
propono-1.2.0 lib/propono/components/post_subscription.rb
propono-1.1.3 lib/propono/components/post_subscription.rb
propono-1.1.2 lib/propono/components/post_subscription.rb
propono-1.1.1 lib/propono/components/post_subscription.rb
propono-1.1.0 lib/propono/components/post_subscription.rb
propono-1.0.0 lib/propono/components/post_subscription.rb
propono-1.0.0.rc3 lib/propono/components/post_subscription.rb
propono-1.0.0.rc2 lib/propono/components/post_subscription.rb
propono-1.0.0.rc1 lib/propono/components/post_subscription.rb
propono-0.11.1 lib/propono/components/post_subscription.rb
propono-0.11.0 lib/propono/components/post_subscription.rb
propono-0.10.0 lib/propono/components/post_subscription.rb
propono-0.9.1 lib/propono/components/post_subscription.rb
propono-0.9.0 lib/propono/components/post_subscription.rb
propono-0.8.2 lib/propono/components/post_subscription.rb