开发者

How to paginate search results in linkedin-j (LinkedIn Java API)

开发者 https://www.devze.com 2023-03-15 11:49 出处:网络
I am using LinkedIn-J and I don\'t know how to paginate search results. The following program returns 10 results. How do I go to the next page of search results (i.e. access more than 10 results)?

I am using LinkedIn-J and I don't know how to paginate search results. The following program returns 10 results. How do I go to the next page of search results (i.e. access more than 10 results)?

String keywords = "KEYWORD";
Map<SearchParameter, String> searchParameters = new EnumMap<SearchParameter, String>(SearchParameter.class);
searchParameters.put(SearchParameter.KEYWORDS, keywords);


People people = client.searchPeople(searchParameters);
System.out.println("Number of Search Result" + people.getCount());
for 开发者_开发问答(Person person : people.getPersonList()) {
        System.out.println("PERSON ID : " + person.getId());
}


My guess is:

searchParameters.put(SearchParameter.START, 10);

Where 10 is the offset into the results set.

0

精彩评论

暂无评论...
验证码 换一张
取 消