Ruby SDK
The People Data Labs Ruby Helper Library
The People Data Labs Ruby Helper Library makes it easy to interact with our APIs from your Ruby application. You can find the most recent version of the library on RubyGems.
How To Install the Library
This library is available as a Ruby gem, and you can install it like this:
gem install peopledatalabs
Using the Library
Make sure that you sign up for a free PDL API key if you don't already have one.
# See https://github.com/peopledatalabs/peopledatalabs-ruby
require 'peopledatalabs'
require 'json'
# Set your API key
Peopledatalabs.api_key = 'api_key'
# Pass parameters to the Person Enrichment API
result = Peopledatalabs::Enrichment.person(params: { profile: 'linkedin.com/in/seanthorne' })
# Check for successful response
if result['status'] == 200
# Print the API response in JSON format
puts JSON.pretty_generate(result['data'])
else
puts "Status: #{result['status']};"\
"\nReason: #{result['error']['type']};"\
"\nMessage: #{result['error']['message']};"
end
More Information, Pull Requests, Feature Suggestions and Bug Reports
We've open-sourced the library, which is available on GitHub. Go there to view more information. You can also submit pull requests, feature suggestions and bug reports.
Updated about 2 months ago