lib/soapy_cake/admin.rb in soapy_cake-1.13.1 vs lib/soapy_cake/admin.rb in soapy_cake-1.14.0
- old
+ new
@@ -111,11 +111,12 @@
def affiliate_signup(opts = {})
run Request.new(:admin, :signup, :affiliate, opts)
end
- def media_types
- run(Request.new(:admin, :signup, :get_media_types, {}))[:MediaType]
+ def media_types(opts = {})
+ result = run(Request.new(:admin, :signup, :get_media_types, opts))
+ xml_response? ? result : result.try(:[], :MediaType)
end
def verticals
run Request.new(:admin, :get, :verticals, {})
end