Reputation: 717
I want to search companies with LinkedIn API in a Ruby on Rails project.
I use linkedin-oauth2 gem to do this but when I try any company search, I have this error.
undefined method `company_search' for #<LinkedIn::API:0x007f88aad68bb8>
This is my code:
api = LinkedIn::API.new(access_token)
@companies = api.company_search(
keyword: "technologies",
facets: "location,industry",
facet: ["location,us","industry,4"],
start: 0,
count: 1000000
)
Upvotes: 0
Views: 139
Reputation: 226
Seems like you an using old version of this gem. This method was added in March 2015 and this gem is not released yet.
So, you should use latest version of gem from master
:
gem 'linkedin-oauth2', github: 'emorikawa/linkedin-oauth2', branch: 'master'
Upvotes: 2
Reputation: 12330
If you want to use the method(company_search
) for your own use
gem 'linkedin-oauth2', github: 'emorikawa/linkedin-oauth2', branch: 'master'
in your Gemfile
then bundle install
but use a stable version of the gem as recomended
Upvotes: 3