Package com.linecorp.bot.model
Class Narrowcast
- java.lang.Object
-
- com.linecorp.bot.model.Narrowcast
-
public final class Narrowcast extends java.lang.Object
Sends a push message to multiple users. You can specify recipients using attributes (such as age, gender, OS, and region) or by retargeting (audiences). Messages cannot be sent to groups or rooms.
-
-
Constructor Summary
Constructors Constructor Description Narrowcast(Message message, Filter filter)
Narrowcast(java.util.List<Message> messages, Recipient recipient, Filter filter, Limit limit, boolean notificationDisabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Filter
getFilter()
Demographic filter object.Limit
getLimit()
The maximum number of narrowcast messages to send.java.util.List<Message>
getMessages()
List of Message objects.Recipient
getRecipient()
Recipient objects represent audiences.int
hashCode()
boolean
isNotificationDisabled()
Whether sends a push notification to message receivers or not.java.lang.String
toString()
-
-
-
Method Detail
-
getMessages
public java.util.List<Message> getMessages()
List of Message objects.Max: 5
-
getRecipient
public Recipient getRecipient()
Recipient objects represent audiences. You can specify recipients based on a combination of criteria using logical operator objects.
-
getFilter
public Filter getFilter()
Demographic filter object. You can use friends' attributes to filter the list of recipients. If this is omitted, messages will be sent to everyone – including users with attribute values of "unknown".
-
getLimit
public Limit getLimit()
The maximum number of narrowcast messages to send. Use this parameter to limit the number of narrowcast messages sent. The recipients will be chosen at random.
-
isNotificationDisabled
public boolean isNotificationDisabled()
Whether sends a push notification to message receivers or not. If true, the user doesn't receive a push notification when the message is sent. And if false, the user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device).
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-