mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Add SNS's get_topic_attributes command.
This commit is contained in:
parent
729da56d61
commit
4b6cbb6912
3 changed files with 55 additions and 0 deletions
27
lib/fog/aws/parsers/sns/get_topic_attributes.rb
Normal file
27
lib/fog/aws/parsers/sns/get_topic_attributes.rb
Normal file
|
@ -0,0 +1,27 @@
|
|||
module Fog
|
||||
module Parsers
|
||||
module AWS
|
||||
module SNS
|
||||
|
||||
class GetTopicAttributes < Fog::Parsers::Base
|
||||
|
||||
def reset
|
||||
@response = { 'Attributes' => {} }
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
when "key"
|
||||
@key = @value
|
||||
when "value"
|
||||
@response['Attributes'][@key] = @value
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
27
lib/fog/aws/requests/sns/get_topic_attributes.rb
Normal file
27
lib/fog/aws/requests/sns/get_topic_attributes.rb
Normal file
|
@ -0,0 +1,27 @@
|
|||
module Fog
|
||||
module AWS
|
||||
class SNS
|
||||
class Real
|
||||
|
||||
require 'fog/aws/parsers/sns/get_topic_attributes'
|
||||
|
||||
def get_topic_attributes(options = {})
|
||||
request({
|
||||
'Action' => 'GetTopicAttributes',
|
||||
:parser => Fog::Parsers::AWS::SNS::GetTopicAttributes.new
|
||||
}.merge!(options))
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Mock
|
||||
|
||||
def get_topic_attributes
|
||||
Fog::Mock.not_implemented
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
|
@ -7,6 +7,7 @@ module Fog
|
|||
|
||||
request_path 'fog/aws/requests/sns'
|
||||
request :list_topics
|
||||
request :get_topic_attributes
|
||||
|
||||
class Mock
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue