View Source CozyLark.ServerSideAPI.Client behaviour (cozy_lark v0.4.1)
Specification for the HTTP client of CozyLark.ServerSideAPI.
It can be set to a client provided by CozyLark, such as:
config :cozy_lark, :server_side_api_client, CozyLark.ServerSideAPI.Client.Finch
Or, set it to your own client, such as:
config :cozy_lark, :server_side_api_client, MyClient
Link to this section Summary
Functions
Send a struct %CozyLark.ServerSideAPI.Request{}
as an HTTP request by the given client.
Link to this section Types
Link to this section Callbacks
@callback init() :: :ok
Callback to initialize the given API client.
@callback request(CozyLark.ServerSideAPI.Request.t()) :: response()
Callback to send a request.
Link to this section Functions
@spec request(CozyLark.ServerSideAPI.Request.t()) :: response()
Send a struct %CozyLark.ServerSideAPI.Request{}
as an HTTP request by the given client.