-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search between accounts #594
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for opening a PR.
I've left some comments for you to address, then I think it should be good to go after.
|
||
import lombok.Getter; | ||
|
||
public class AccountSearch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This functionality is already made possible thru FeedIterators so there might not be enough reason to include this.
If you want you can provide an actions method to do a search in the search actions
import lombok.NonNull; | ||
|
||
@AllArgsConstructor | ||
public class AccountSearchRequest extends IGGetRequest<AccountSearchResponse> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change name to UsersSearchRequest (path is users/search/) to fit convention.
Also please combine the two requests together into one class. One can set the rank token and page token through a constructor if needed!
import lombok.Data; | ||
|
||
@Data | ||
public class AccountSearchResponse extends IGResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name should be changed to UsersSearchResponse for convention.
another pr comes |
#506
Using classes AccountSearchRequest & AccountSearchResponse it works correctly but returns only the first 21 users (the first request) that are searched.
Usage:
So I created the AccountSearchTokenRequest class for requests with rank_token and page_token. But so the class is useless without AccountSearch with which you can get all the 'pages' of the requests with the list of the returned accounts.
Usage: