LINE.Bot.ManageAudience (line_bot_sdk v0.1.0)

Copy Markdown

API calls for all endpoints tagged ManageAudience.

Summary

Functions

add_audience_to_audience_group(client, add_audience_to_audience_group_request, client_opts \\ [])

Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs (by JSON)

Parameters

  • client (Req.Request.t/0): Client to make request with
  • add_audience_to_audience_group_request (t:AddAudienceToAudienceGroupRequest/0):
  • client_opts (keyword/0): Options to pass to Req.request

Returns

  • {:ok, nil} on success
  • {:error, Req.Response.t} on failure

create_audience_group(client, create_audience_group_request, client_opts \\ [])

Create audience for uploading user IDs (by JSON)

Parameters

  • client (Req.Request.t/0): Client to make request with
  • create_audience_group_request (t:CreateAudienceGroupRequest/0):
  • client_opts (keyword/0): Options to pass to Req.request

Returns

  • {:ok, LINE.Bot.Model.CreateAudienceGroupResponse.t} on success
  • {:error, Req.Response.t} on failure

create_click_based_audience_group(client, create_click_based_audience_group_request, client_opts \\ [])

Create audience for click-based retargeting

Parameters

  • client (Req.Request.t/0): Client to make request with
  • create_click_based_audience_group_request (t:CreateClickBasedAudienceGroupRequest/0):
  • client_opts (keyword/0): Options to pass to Req.request

Returns

  • {:ok, LINE.Bot.Model.CreateClickBasedAudienceGroupResponse.t} on success
  • {:error, Req.Response.t} on failure

create_imp_based_audience_group(client, create_imp_based_audience_group_request, client_opts \\ [])

Create audience for impression-based retargeting

Parameters

  • client (Req.Request.t/0): Client to make request with
  • create_imp_based_audience_group_request (t:CreateImpBasedAudienceGroupRequest/0):
  • client_opts (keyword/0): Options to pass to Req.request

Returns

  • {:ok, LINE.Bot.Model.CreateImpBasedAudienceGroupResponse.t} on success
  • {:error, Req.Response.t} on failure

delete_audience_group(client, audience_group_id, client_opts \\ [])

Delete audience

Parameters

Returns

  • {:ok, nil} on success
  • {:error, Req.Response.t} on failure

get_audience_data(client, audience_group_id, client_opts \\ [])

Gets audience data.

Parameters

Returns

  • {:ok, LINE.Bot.Model.GetAudienceDataResponse.t} on success
  • {:error, Req.Response.t} on failure

get_audience_groups(client, page, optional_args \\ [], client_opts \\ [])

Gets data for more than one audience.

Parameters

  • client (Req.Request.t/0): Client to make request with
  • page (integer()/0): The page to return when getting (paginated) results. Must be 1 or higher.
  • optional_args (keyword): Optional parameters
    • :description (String.t/0): The name of the audience(s) to return. You can search for partial matches. This is case-insensitive, meaning AUDIENCE and audience are considered identical. If omitted, the name of the audience(s) will not be used as a search criterion.
    • :status (t:AudienceGroupStatus/0): The status of the audience(s) to return. If omitted, the status of the audience(s) will not be used as a search criterion.
    • :size (integer()/0): The number of audiences per page. Default: 20 Max: 40
    • :includes_external_public_groups (boolean()/0): true (default): Get public audiences created in all channels linked to the same bot. false: Get audiences created in the same channel.
    • :create_route (t:AudienceGroupCreateRoute/0): How the audience was created. If omitted, all audiences are included. OA_MANAGER: Return only audiences created with LINE Official Account Manager (opens new window). MESSAGING_API: Return only audiences created with Messaging API.
  • client_opts (keyword/0): Options to pass to Req.request

Returns

  • {:ok, LINE.Bot.Model.GetAudienceGroupsResponse.t} on success
  • {:error, Req.Response.t} on failure

get_shared_audience_data(client, audience_group_id, client_opts \\ [])

Gets audience data.

Parameters

Returns

  • {:ok, LINE.Bot.Model.GetSharedAudienceDataResponse.t} on success
  • {:error, Req.Response.t} on failure

get_shared_audience_groups(client, page, optional_args \\ [], client_opts \\ [])

Gets data for more than one audience, including those shared by the Business Manager.

Parameters

  • client (Req.Request.t/0): Client to make request with
  • page (integer()/0): The page to return when getting (paginated) results. Must be 1 or higher.
  • optional_args (keyword): Optional parameters
    • :description (String.t/0): The name of the audience(s) to return. You can search for partial matches. This is case-insensitive, meaning AUDIENCE and audience are considered identical. If omitted, the name of the audience(s) will not be used as a search criterion.
    • :status (t:AudienceGroupStatus/0): The status of the audience(s) to return. If omitted, the status of the audience(s) will not be used as a search criterion.
    • :size (integer()/0): The number of audiences per page. Default: 20 Max: 40
    • :create_route (t:AudienceGroupCreateRoute/0): How the audience was created. If omitted, all audiences are included. OA_MANAGER: Return only audiences created with LINE Official Account Manager (opens new window). MESSAGING_API: Return only audiences created with Messaging API.
    • :includes_owned_audience_groups (boolean()/0): true: Include audienceGroups owned by LINE Official Account Manager false: Respond only audienceGroups shared by Business Manager
  • client_opts (keyword/0): Options to pass to Req.request

Returns

  • {:ok, LINE.Bot.Model.GetSharedAudienceGroupsResponse.t} on success
  • {:error, Req.Response.t} on failure

new(options \\ [])

Create a new ManageAudience client.

Options

  • :base_url - base URL for requests (default: "https://api.line.me")
  • :channel_token (required) - channel access token for Bearer authorization
  • :plug - plug to use for testing (see Req.new/1)

update_audience_group_description(client, audience_group_id, update_audience_group_description_request, client_opts \\ [])

Renames an existing audience.

Parameters

  • client (Req.Request.t/0): Client to make request with
  • audience_group_id (integer()/0): The audience ID.
  • update_audience_group_description_request (t:UpdateAudienceGroupDescriptionRequest/0):
  • client_opts (keyword/0): Options to pass to Req.request

Returns

  • {:ok, nil} on success
  • {:error, Req.Response.t} on failure