WeChat.RefreshHelper (wechat v0.2.0)
帮助模块: 输出刷新 token
的列表
Link to this section Summary
Functions
输出[第三方平台]的 refresh_options
根据不同的 client
的 app_type
& by_component?
输出不同的 refresh_options
输出[小程序]的 refresh_options
输出[公众号]的 refresh_options
Link to this section Types
Link to this type
expires_in()
Specs
expires_in() :: non_neg_integer()
Link to this type
key_name()
Specs
key_name() :: atom()
Link to this type
refresh_fun()
Specs
refresh_fun() :: (WeChat.client() -> refresh_fun_result())
Link to this type
refresh_fun_result()
Specs
refresh_fun_result() :: {:ok, token(), expires_in()} | {:ok, token_list(), expires_in()} | {:error, any()}
Link to this type
refresh_option()
Specs
refresh_option() :: {store_id_type() | WeChat.Storage.Adapter.store_id(), key_name(), refresh_fun()}
Link to this type
refresh_options()
Specs
refresh_options() :: [refresh_option()]
Link to this type
store_id_type()
Specs
store_id_type() :: :appid | :component_appid
Link to this type
token()
Specs
token() :: String.t()
Link to this type
token_list()
Specs
token_list() :: [{key_name(), token(), expires_in()}]
Link to this section Functions
Link to this function
component_refresh_options(client)
Specs
component_refresh_options(WeChat.client()) :: refresh_options()
输出[第三方平台]的 refresh_options
刷新如下token
:
component_access_token
- AuthorizerRefreshOptions (get by client.app_type())
Link to this function
get_refresh_options_by_client(client)
Specs
get_refresh_options_by_client(WeChat.client()) :: refresh_options()
根据不同的 client
的 app_type
& by_component?
输出不同的 refresh_options
rules:
by_component?
==true
:component_refresh_options/1
official_account
:official_account_refresh_options/0
mini_program
:mini_program_refresh_options/0
Link to this function
mini_program_refresh_options(client)
Specs
mini_program_refresh_options(WeChat.client()) :: refresh_options()
输出[小程序]的 refresh_options
刷新如下token
:
access_token
Link to this function
official_account_refresh_options(client)
Specs
official_account_refresh_options(WeChat.client()) :: refresh_options()
输出[公众号]的 refresh_options
刷新如下token
:
access_token
js_api_ticket
wx_card_ticket
Link to this function
refresh_access_token(client)
Specs
refresh_access_token(WeChat.client()) :: refresh_fun_result()
Link to this function
refresh_authorizer_access_token(client)
Specs
refresh_authorizer_access_token(WeChat.client()) :: refresh_fun_result()
Link to this function
refresh_component_access_token(client)
Specs
refresh_component_access_token(WeChat.client()) :: refresh_fun_result()
Link to this function
refresh_mini_program_access_token(client)
Specs
refresh_mini_program_access_token(WeChat.client()) :: refresh_fun_result()
Link to this function
refresh_ticket(ticket_type, client)
Specs
refresh_ticket(WeChat.WebPage.js_api_ticket_type(), WeChat.client()) :: refresh_fun_result()