ex_wechat v0.1.8 Wechat.Base

Make module can get the config data.

use Wechat.Base

then, you can get the config data in your module.

defmodule Wechat do
  use Wechat.Base
end

Wechat.appid  # your wechat app appid
Wechat.secret # your wechat app appsecret
Wechat.token  # your server's token for wechat
...

You can set above config in config.exs:

config :ex_wechat, Wechat,
  appid: System.get_env("WECHAT_APPID") || "your appid",
  secret: System.get_env("WECHAT_APPSECRET") || "your app secret",
  token: System.get_env("WECHAT_TOKEN") || "yout token",

Summary

Functions

Define base method in ast format to support multi-accounts

Functions

quoted_base_method(config)

Define base method in ast format to support multi-accounts.