NAME

LINE::Bot::Message::Narrowcast

Methods

send_message($messages, $recipient, $demographic, $limit, $options)

Sends a push message to multiple users.

$message is a HashRef with key/values for as specified in API reference of this method: https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message. nested keys are represented in the dotted notations.

$recipient should be an HashRef with keys/values as specified in the documentation of Recipient objects. It can be either audience object or redelivery object. You can specify up to 10 recipients per request based on a combination of criteria using logical operator objects.

$demographic should be an HashRef with key/values as specified in the documentation of Demagraphic filter object. It represent criteria (e.g. age, gender, OS, region, and friendship duration) on which to filter the list of recipients. You can filter recipients based on a combination of different criteria using logical operator objects.

$limit should be an HashRef with these optional key-value pairs:

max: Number
upToRemainingQuota: Boolean

For example:

{
    "max" => 42,
    "upToRemainingQuota": JSON::true,
}

Noted here that the value for "upToRemainingQuotae" must be one of the boolean values recognizied by JSON::XS. See also "other references" in JSON::XS.

Messages cannot be sent to groups or rooms.

The last parameter $options is an HashRef with a list of key-values pairs to fine-tune the behaviour of this message. At the moment, the only defined configurable option is "retry_key", which requires an UUID string for its value. See the section "Handling Retries" in LINE::Bot::API for the meaning of this particular option.

get_narrowcast_message_status($request_id)

Gets the status of a narrowcast message.

See also the API reference of this method: https://developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status