开发者

Rails linkedin gem - has anyone used the search feature?

I'm trying to use the search feature of https://github.com/pengwynn/linkedin. I could not find any documentation on the search feature anywhere, not even on the gem website/github. There's some info on the profile/connections pull but nothing on the search feature.

What I want to achieve is use the gem for making a people search on linkedin. I have keywords that the user enters on my site. The keyword(s) could be the name of a person (first, last, full name), or a company name. Using these keywords I want to make a keyword search on linkedin. I'm looking for keyword matches in my first level connections, not my extended network. What I want returned is the first_name, last_name, headline, and url of my connection. I guess something like this..

client.search(:keyword => 开发者_如何学Python"microsoft", :fields => ["first_name", "last_name", "headline", "picture_url"])

Thanks.


For the fields you need to do something like:

:fields => [:people => ["first-name", "headline"]]

Well, I'm not a Ruby programmer, so that could be totally bogus syntax. And I've not used this gem.

But the key is that you're asking a nested set of result fields, so you need to generate a REST URL that looks like:

http://api.linkedin.com/v1/people-search:(people:(first-name,headline))?keywords=homer%20simpson

And what you are asking for is ...people-search:(first-name,headline)?....

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜