开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜