Wechat v0.4.0-rc.0 Wechat.Adapter behaviour View Source

A specification to store and fetch token. By default, the adapter Wechat.Adapter.Agent is used.

You can use your own adapter once you implemented this module. Config it like following:

config :wechat, Wechat,
  adapter: Wechat.Adapter.Redis,
  redis_url: ""redis://localhost:6379/3"

Link to this section Summary

Link to this section Types

Link to this section Callbacks

Link to this callback fetch_access_token(appid) View Source
fetch_access_token(appid()) :: String.t()
Link to this callback fetch_jsapi_ticket(appid) View Source
fetch_jsapi_ticket(appid()) :: String.t()
Link to this callback store_access_token(appid, token) View Source
store_access_token(appid(), token()) :: :ok
Link to this callback store_jsapi_ticket(appid, token) View Source
store_jsapi_ticket(appid(), token()) :: :ok