LINEBot

A client class of LINE Messaging API.
Methods Summary
public
# __construct( LINE\LINEBot\HTTPClient $httpClient , array $args )
LINEBot constructor.
public
# getProfile( string $userId )
Gets specified user's profile through API calling.
public
# getMessageContent( string $messageId )
Gets message content which is associated with specified message ID.
public
# replyMessage( string $replyToken , LINE\LINEBot\MessageBuilder $messageBuilder )
Replies arbitrary message to destination which is associated with reply token.
public
# replyText( string $replyToken , string $text , string[]|null $extraTexts = NULL )
Replies text message(s) to destination which is associated with reply token. This method receives variable texts. It can send text(s) message as bulk. Exact signature of this method is <code>replyText(string $replyToken, string $text, string[] $extraTexts)</code>. Means, this method can also receive multiple texts like so; <code> $bot->replyText('reply-text', 'text', 'extra text1', 'extra text2', ...) </code>
public
# pushMessage( string $to , LINE\LINEBot\MessageBuilder $messageBuilder )
Sends arbitrary message to destination.
public
# multicast( array $tos , LINE\LINEBot\MessageBuilder $messageBuilder )
Sends arbitrary message to multi destinations.
public
# leaveGroup( string $groupId )
Leaves from group.
public
# leaveRoom( string $roomId )
Leaves from room.
public
# parseEventRequest( string $body , string $signature )
Parse event request to Event objects.
public
# validateSignature( string $body , string $signature )
Validate request with signature.
public
# getGroupMemberProfile( string $groupId , string $userId )
Gets the user profile of a member of a group that the bot is in. This can be the user ID of a user who has not added the bot as a friend or has blocked the bot.
public
# getRoomMemberProfile( string $roomId , string $userId )
Gets the user profile of a member of a room that the bot is in. This can be the user ID of a user who has not added the bot as a friend or has blocked the bot.
public
# getGroupMemberIds( string $groupId , string $start = NULL )
Gets the user IDs of the members of a group that the bot is in. This includes the user IDs of users who have not added the bot as a friend or has blocked the bot. This feature is only available for LINE@ Approved accounts or official accounts.
public
# getRoomMemberIds( string $roomId , string $start = NULL )
Gets the user IDs of the members of a room that the bot is in. This includes the user IDs of users who have not added the bot as a friend or has blocked the bot. This feature is only available for LINE@ Approved accounts or official accounts.
public
# getAllGroupMemberIds( string $groupId )
Gets the user IDs of the members of a group that the bot is in. This includes the user IDs of users who have not added the bot as a friend or has blocked the bot. This method gets all of the members by calling getGroupMemberIds() continually using token This feature is only available for LINE@ Approved accounts or official accounts.

see

LINE\LINEBot::getGroupMemberIds()
public
# getAllRoomMemberIds( string $roomId )
Gets the user IDs of the members of a room that the bot is in. This includes the user IDs of users who have not added the bot as a friend or has blocked the bot. This method gets all of the members by calling getRoomMemberIds() continually using token This feature is only available for LINE@ Approved accounts or official accounts.

see

LINE\LINEBot::getRoomMemberIds()
public
# getRichMenu( string $richMenuId )
Gets a rich menu via a rich menu ID.
public
# createRichMenu( \RichMenuBuilder $richMenuBuilder )
Creates a rich menu. You must upload a rich menu image and link the rich menu to a user for the rich menu to be displayed.
public
# deleteRichMenu( string $richMenuId )
Deletes a rich menu.
public
# getRichMenuId( string $userId )
Gets the ID of the rich menu linked to a user.
public
# linkRichMenu( string $userId , string $richMenuId )
Links a rich menu to a user. Only one rich menu can be linked to a user at one time.
public
# unlinkRichMenu( string $userId )
Unlinks a rich menu from a user.
public
# downloadRichMenuImage( string $richMenuId )
Downloads an image associated with a rich menu.
public
# uploadRichMenuImage( string $richMenuId , string $imagePath , string $contentType )
Uploads and attaches an image to a rich menu. Notes: <ul><li>Images must have one of the following resolutions: 2500x1686 or 2500x843 pixels.</li> <li>You cannot replace an image attached to a rich menu. To update your rich menu image, create a new rich menu object and upload another image.</li></ul>
public
# getRichMenuList( )
Gets a list of all uploaded rich menus.
Constants Summary
public string DEFAULT_ENDPOINT_BASE
# 'https://api.line.me'