ex_line_bot_sdk v0.0.4 ExLineBotSdk.LineClient behaviour View Source

ExLineBotSdk.LineClient provides client’s functionalities to connect Line messaging api endpoint.

To setup a line’s client library in your project add use ExLineBotSdk.LineClient and set module attribute channel_access_token in your module like the code example shown below.

defmodule MyApp.LineClient do
  @channel_access_token "[Your Line Access Token Here]"

  use ExLineBotSdk.Client
end

Link to this section Summary

Callbacks

Returns channel access token tied to this client

Verify if a post request from line is valid or not

Link to this section Callbacks

Link to this callback channel_access_token() View Source
channel_access_token() :: String.t()

Returns channel access token tied to this client.

Link to this callback verify(%) View Source
verify(%Plug.Conn{
  adapter: term(),
  assigns: term(),
  before_send: term(),
  body_params: term(),
  cookies: term(),
  halted: term(),
  host: term(),
  method: term(),
  owner: term(),
  params: term(),
  path_info: term(),
  path_params: term(),
  port: term(),
  private: term(),
  query_params: term(),
  query_string: term(),
  remote_ip: term(),
  req_cookies: term(),
  req_headers: term(),
  request_path: term(),
  resp_body: term(),
  resp_cookies: term(),
  resp_headers: term(),
  scheme: term(),
  script_name: term(),
  secret_key_base: term(),
  state: term(),
  status: term()
}) ::
  {:ok,
   %Plug.Conn{
     adapter: term(),
     assigns: term(),
     before_send: term(),
     body_params: term(),
     cookies: term(),
     halted: term(),
     host: term(),
     method: term(),
     owner: term(),
     params: term(),
     path_info: term(),
     path_params: term(),
     port: term(),
     private: term(),
     query_params: term(),
     query_string: term(),
     remote_ip: term(),
     req_cookies: term(),
     req_headers: term(),
     request_path: term(),
     resp_body: term(),
     resp_cookies: term(),
     resp_headers: term(),
     scheme: term(),
     script_name: term(),
     secret_key_base: term(),
     state: term(),
     status: term()
   }}
  | {:error, String.t()}

Verify if a post request from line is valid or not