public interface LineApiClient
| Modifier and Type | Method and Description |
|---|---|
LineApiResponse<LineAccessToken> |
getCurrentAccessToken()
Gets the access token that the SDK is using for the user.
|
LineApiResponse<GetFriendsResponse> |
getFriends(FriendSortField sortField,
java.lang.String nextPageRequestToken) |
LineApiResponse<GetFriendsResponse> |
getFriendsApprovers(FriendSortField sortField,
java.lang.String nextPageRequestToken) |
LineApiResponse<LineFriendshipStatus> |
getFriendshipStatus()
Gets the friendship status between the bot (which is linked to the current channel) and the user.
|
LineApiResponse<GetFriendsResponse> |
getGroupApprovers(java.lang.String groupId,
java.lang.String nextPageRequestToken) |
LineApiResponse<GetGroupsResponse> |
getGroups(java.lang.String nextPageRequestToken) |
LineApiResponse<LineProfile> |
getProfile()
Gets the user profile information.
|
LineApiResponse<?> |
logout()
Revokes the access token.
|
LineApiResponse<LineAccessToken> |
refreshAccessToken()
Refreshes the access token that the SDK is using for the user.
|
LineApiResponse<java.lang.String> |
sendMessage(java.lang.String targetUserId,
java.util.List<MessageData> messages) |
LineApiResponse<java.util.List<SendMessageResponse>> |
sendMessageToMultipleUsers(java.util.List<java.lang.String> targetUserIds,
java.util.List<MessageData> messages) |
LineApiResponse<LineCredential> |
verifyToken()
Checks whether the access token that the SDK is using for the user is valid.
|
LineApiResponse<?> logout()
LineApiResponse object containing information about the response.LineApiResponse<LineAccessToken> refreshAccessToken()
LineApiResponse object. If the API call is successful, the
LineApiResponse object contains a LineAccessToken object that contains
a new access token. If the API call fails, the payload of the LineApiResponse
object is null.LineApiResponse<LineCredential> verifyToken()
LineApiResponse object. If the access token is valid, the
LineApiResponse object contains a success response and the LineCredential
object that contains the access token. If the access token is invalid, the
LineApiResponse object contains a failure response.LineApiResponse<LineAccessToken> getCurrentAccessToken()
LineApiResponse object. If the API call is successful,
a LineApiResponse object contains the LineAccessToken object that contains
the access token. If the API call fails, the payload of the LineApiResponse object is
null.LineApiResponse<LineProfile> getProfile()
LineApiResponse object. If the API call is successful, the
LineApiResponse object contains a LineProfile object that contains the
user's profile. If the API call fails, the payload of the LineApiResponse object is
null.LineApiResponse<LineFriendshipStatus> getFriendshipStatus()
LineApiResponse object. If the API call is successful, the
LineApiResponse object contains a LineFriendshipStatus object
that contains the friendship status information. If the API call fails, the payload of
the LineApiResponse object is null.LineApiResponse<GetFriendsResponse> getFriends(FriendSortField sortField, java.lang.String nextPageRequestToken)
sortField - Optional. The way to sort the friend list. See the
FriendSortField section for more information.nextPageRequestToken - Optional. The continuation token to get the next friend list.LineApiResponse object. If the API call is successful, the
LineApiResponse object contains a GetFriendsResponse object that contains
up to 200 friends of the user. The GetFriendsResponse object also contains a
continuation token if there are remaining friends that the original API call didn't return.
If the API call fails, the payload of the LineApiResponse object is
null.FriendSortFieldLineApiResponse<GetFriendsResponse> getFriendsApprovers(FriendSortField sortField, java.lang.String nextPageRequestToken)
sortField - Optional. The way to sort the friend list. See the
FriendSortField section for more information.nextPageRequestToken - Optional. The continuation token to get the next friend list.LineApiResponse object. If the API call is successful, the
LineApiResponse object contains a GetFriendsResponse object that contains
up to 200 friends of the user. The GetFriendsResponse object also contains a
continuation token if there are remaining friends that the original API call didn't return.
If the API call fails, the payload of the LineApiResponse object is
null.FriendSortFieldLineApiResponse<GetGroupsResponse> getGroups(java.lang.String nextPageRequestToken)
nextPageRequestToken - Optional. The continuation token to get the next group list.LineApiResponse object. If the API call is successful, the
LineApiResponse object contains a GetGroupsResponse object that contains
up to 200 groups that the user is a member of. The GetGroupsResponse object also
contains a continuation token if there are remaining groups that the original API call
didn't return. If the API call fails, the payload of the LineApiResponse object is
null.LineApiResponse<GetFriendsResponse> getGroupApprovers(java.lang.String groupId, java.lang.String nextPageRequestToken)
groupId - Required. The ID of the group to get its members.nextPageRequestToken - Optional. The continuation token to get the next member list.LineApiResponse object. If the API call is successful, the
LineApiResponse object contains a GetFriendsResponse object that contains
up to 200 members. The GetFriendsResponse object also contains a continuation token
if there are remaining members that the original API call didn't return. If the API call
fails, the payload of the LineApiResponse object is null.LineApiResponse<java.lang.String> sendMessage(java.lang.String targetUserId, java.util.List<MessageData> messages)
targetUserId - Required. The ID of the user or group that receives messages from the
current user.messages - Required. The messages to send. Available message types are: text, audio,
image, location, video, and template. You can send up to five messages.LineApiResponse object. If the API call is successful, the
LineApiResponse object contains the delivery result. If the API call fails, the payload
of the LineApiResponse object is null. The delivery result is either of
the followings:
ok: The messages have been delivered successfully.discarded: The messages have been discarded because one of the conditions
above is met. This code is returned only when you attempt to send messages to a user.
MessageDataLineApiResponse<java.util.List<SendMessageResponse>> sendMessageToMultipleUsers(java.util.List<java.lang.String> targetUserIds, java.util.List<MessageData> messages)
targetUserIds - The IDs of the users that receive messages from the user. You can
specify up to 10 users.messages - The messages to send. Available message types are: text, audio, image,
location, video, and template. You can send up to five messages.LineApiResponse object. If the API call is successful, the
LineApiResponse object contains the SendMessageResponse objects that contain
the delivery results. If the API call fails, the payload of the LineApiResponse
object is null. The delivery result is either of the followings:
ok: The messages have been delivered successfully.discarded: The messages have been discarded because one of the conditions
above is met or a server error occurred.
SendMessageResponse