elixir_wechat v0.1.0 API Reference

Modules

NOTICE: THIS MODULE IS ONLY FOR DOCUMENT.

NOTICE: THIS MODULE IS ONLY FOR DOCUMENT.

NOTICE: THIS MODULE IS ONLY FOR DOCUMENT.

NOTICE: THIS MODULE IS ONLY FOR DOCUMENT.

The storage adapter specification for WeChat common application.

The storage adapter specification for WeChat component application.

The storage adapter specification for WeChat component application.

The storage adapter specification for WeChat common application.

Example

  defmodule MyClient do
    use WeChat, appid: "myappid"
  end

  media = %WeChat.UploadMedia{
    file_path: "path_to_file",
    type: "image"
  }
  MyClient.media(:post_form, :upload, %{media: media})

Example

  defmodule MyClient do
    use WeChat, appid: "myappid"
  end

  file_content = File.read!("path_to_file")
  media = %WeChat.UploadMediaContent{
   file_content: file_content,
   file_name: "myfilename",
   type: "image"
  }
  MyClient.media(:post_form, :upload, %{media: media})

Exceptions