ExLine.Api.Profile (ExLine v0.1.0)

Copy Markdown View Source

Fetch user profiles and follower IDs via the Messaging API.

Note: this is the Messaging API profile (/v2/bot/profile/{userId}), distinct from the LINE Login profile used in LIFF flows.

Ref: https://developers.line.biz/en/reference/messaging-api/#get-profile

Summary

Functions

Gets user IDs of users who added the bot as a friend (paginated).

Gets a user's profile (displayName, userId, pictureUrl, statusMessage, language).

Functions

followers(client, opts \\ [])

@spec followers(
  ExLine.Client.t(),
  keyword()
) :: {:ok, map()} | {:error, ExLine.Error.t()}

Gets user IDs of users who added the bot as a friend (paginated).

Options: :limit (max 1000), :start (continuation token).

Ref: https://developers.line.biz/en/reference/messaging-api/#get-follower-ids

get(client, user_id)

@spec get(ExLine.Client.t(), String.t()) :: {:ok, map()} | {:error, ExLine.Error.t()}

Gets a user's profile (displayName, userId, pictureUrl, statusMessage, language).

Ref: https://developers.line.biz/en/reference/messaging-api/#get-profile