LINEDevelopers.MessagingAPISpec behaviour (line_developers v0.1.2)

Link to this section Summary

Link to this section Callbacks

Link to this callback

alias_richmenu!(access_token, richmenu_id, alias_id)

@callback alias_richmenu!(
  access_token :: String.t(),
  richmenu_id :: String.t(),
  alias_id :: String.t()
) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

all_richmenu!(access_token, richmenu_id)

@callback all_richmenu!(access_token :: String.t(), richmenu_id :: String.t()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

broadcast!(access_token, messages, options)

@callback broadcast!(access_token :: String.t(), messages :: [map()], options) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
when options: [retry_key: Ecto.UUID.t(), notification_disabled: boolean()]
Link to this callback

content_richmenu!(access_token, richmenu_id, file)

@callback content_richmenu!(
  access_token :: String.t(),
  richmenu_id :: String.t(),
  file :: String.t()
) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

create_audience!(access_token, description, uid)

@callback create_audience!(
  access_token :: String.t(),
  description :: String.t(),
  uid :: [String.t()]
) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

create_richmenu!(access_token, richmenu)

@callback create_richmenu!(access_token :: String.t(), richmenu :: map()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

delete_audience!(access_token, audience_id)

@callback delete_audience!(access_token :: String.t(), audience_id :: integer()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

delete_richmenu!(access_token, richmenu_id)

@callback delete_richmenu!(access_token :: String.t(), richmenu_id :: String.t()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

get_audience!(access_token, audience_id)

@callback get_audience!(access_token :: String.t(), audience_id :: integer()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

get_delivery!(access_token, date)

@callback get_delivery!(access_token :: String.t(), date :: Date.t()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

get_profile!(access_token, user_id)

@callback get_profile!(access_token :: String.t(), user_id :: String.t()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

get_quota!(access_token)

@callback get_quota!(access_token :: String.t()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

get_richmenu!(access_token, richmenu_id)

@callback get_richmenu!(access_token :: String.t(), richmenu_id :: String.t()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

get_statistics_per_unit!(access_token, unit_id, from, to)

@callback get_statistics_per_unit!(
  access_token :: String.t(),
  unit_id :: String.t(),
  from :: Date.t(),
  to :: Date.t()
) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

list_richmenu!(access_token)

@callback list_richmenu!(access_token :: String.t()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

merge_audience!(access_token, audience_id, description, uid)

@callback merge_audience!(
  access_token :: String.t(),
  audience_id :: integer(),
  description :: String.t(),
  uid :: [String.t()]
) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

multicast!(access_token, to, messages, options)

@callback multicast!(
  access_token :: String.t(),
  to :: [String.t()],
  messages :: [map()],
  options
) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
when options: [retry_key: Ecto.UUID.t(), notification_disabled: boolean()]
Link to this callback

narrowcast!(access_token, messages, recipient, filter, limit, options)

@callback narrowcast!(
  access_token :: String.t(),
  messages :: [map()],
  recipient :: map(),
  filter :: map(),
  limit :: map(),
  options
) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
when options: [retry_key: Ecto.UUID.t(), notification_disabled: boolean()]
Link to this callback

progress_narrowcast!(access_token, request_id)

@callback progress_narrowcast!(access_token :: String.t(), request_id :: String.t()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

push!(access_token, to, messages, options)

@callback push!(
  access_token :: String.t(),
  to :: String.t(),
  messages :: [map()],
  options
) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
when options: [retry_key: Ecto.UUID.t(), notification_disabled: boolean()]
Link to this callback

reply!(access_token, reply_token, messages)

@callback reply!(
  access_token :: String.t(),
  reply_token :: String.t(),
  messages :: [map()]
) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}
Link to this callback

unalias_richmenu!(access_token, alias_id)

@callback unalias_richmenu!(access_token :: String.t(), alias_id :: String.t()) ::
  {:ok, {status :: integer(), body :: map(), headers :: list()}}
  | {:error, {status :: integer(), body :: map(), headers :: list()}}