TencentCloud (tencent_cloud v0.1.0) View Source

Call TencentCloud Services in Elixir

全局配置 AK :

config :tencent_cloud,
  access_key_id: "your_key",
  access_key_secret: "your_secret"

调用时提供:

call(
  %{
    host: "nlp.tencentcloudapi.com",
    action: "ChatBot",
    version: "2019-04-08",
    region: "ap-guangzhou",
    access_key_id: "your_key",
    access_key_secret: "your_secret"
  },
  %{"Query" => "hello"}
)

Link to this section Summary

Link to this section Functions

Specs

call(common :: map(), data :: Enumerable.t()) :: Tesla.Env.result()

调用 TencentCloud 服务

Example

call(
  %{
    host: "nlp.tencentcloudapi.com",
    action: "ChatBot",
    version: "2019-04-08",
    region: "ap-guangzhou"
  },
  %{"Query" => "hello"}
)
Link to this function

call(common, data, middlewares)

View Source

Specs

call(common :: map(), data :: Enumerable.t(), [Tesla.Client.middleware()]) ::
  Tesla.Env.result()