1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

SNS Publish

This commit is contained in:
phiggins 2011-02-03 16:10:39 -08:00 committed by geemus
parent e92ca191d7
commit e92d4edb6d
3 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,24 @@
module Fog
module Parsers
module AWS
module SNS
class Publish < Fog::Parsers::Base
def reset
@response = {}
end
def end_element(name)
case name
when 'MessageId', 'RequestId'
@response[name] = @value
end
end
end
end
end
end
end

View file

@ -0,0 +1,26 @@
module Fog
module AWS
class SNS
class Real
require 'fog/aws/parsers/sns/publish'
def publish(options = {})
request({
'Action' => 'Publish',
:parser => Fog::Parsers::AWS::SNS::Publish.new
}.merge!(options))
end
end
class Mock
def publish(options = {})
Fog::Mock.not_implemented
end
end
end
end
end

View file

@ -12,6 +12,7 @@ module Fog
request :list_subscriptions
request :list_subscriptions_by_topic
request :list_topics
request :publish
class Mock