クラス GetFollowersRequest

java.lang.Object
com.linecorp.bot.model.request.GetFollowersRequest

public final class GetFollowersRequest
extends java.lang.Object
A request object to retrieve followers. If you want to retrieve your followers from the beginning, you need to call getFollowers as follows.
 
 final LineMessagingClient client = ...;
 final GetFollowersResponse response = client.getFollowers(GetFollowersRequest.builder().build()).join();
 
Or if you want to retrieve all followers, you need to call getFollowers API as follows.
 
 final LineMessagingClient client = ...;
 GetFollowersRequest request = GetFollowersRequest.builder().build();
 while (true) {
   final GetFollowersResponse response = client.getFollowers(request).join();
   final List<String> userIds = response.getUserIds();
   if (response.getNext() == null) { // No remaining user IDs anymore.
     break;
   }
   // You have remaining user IDs. You can retrieve rest of them using following request object.
   request = GetFollowersRequest .fromResponse(response).build();
  }
 
  • メソッドの詳細

    • fromResponse

      public static GetFollowersRequest.GetFollowersRequestBuilder fromResponse​(GetFollowersResponse response)
    • builder

    • getNext

      @Nullable public java.lang.String getNext()
      Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs.
    • equals

      public boolean equals​(java.lang.Object o)
      オーバーライド:
      equals クラス内 java.lang.Object
    • hashCode

      public int hashCode()
      オーバーライド:
      hashCode クラス内 java.lang.Object
    • toString

      public java.lang.String toString()
      オーバーライド:
      toString クラス内 java.lang.Object