View Source CozyAliyunOpenAPI.Specs.RPC (cozy_aliyun_open_api v0.1.2)
Describes an RPC style API.
Read more at 阿里云 SDK > 调用机制 > RPC 调用机制.
examples
Examples
alias CozyAliyunOpenAPI.Config
alias CozyAliyunOpenAPI.Specs.RPC
config =
Config.new!(%{
access_key_id: "...",
access_key_secret: "..."
})
RPC.new!(config, %{
method: :post,
endpoint: "https://example.com/",
shared_params: %{
"Action" => "SingleSendMail",
"Version" => "2015-11-23",
# ...
},
params: %{
"AccountName" => "...",
# ...
}
})
Link to this section Summary
Link to this section Types
@type endpoint() :: String.t()
@type method() :: :get | :post
@type spec_config() :: %{ method: method(), endpoint: endpoint(), shared_params: shared_params(), params: params() }
@type t() :: %CozyAliyunOpenAPI.Specs.RPC{ endpoint: endpoint(), method: method(), params: params(), shared_params: shared_params() }
Link to this section Functions
@spec new!(CozyAliyunOpenAPI.Config.t(), spec_config()) :: t()