Sha256: 7de08b4e8dac22a4642b1568781311b1f6b79937cbc572a8d7046c252b178bbb
Contents?: true
Size: 1017 Bytes
Versions: 2
Compression:
Stored size: 1017 Bytes
Contents
require 'rest-core' # http://developer.linkedin.com/documents/linkedin-api-resource-map module RestCore Linkedin = Builder.client do use Timeout , 10 use DefaultSite , 'https://api.linkedin.com/' use DefaultHeaders, {'Accept' => 'application/json'} use DefaultQuery , {'format' => 'json'} use Oauth1Header , 'uas/oauth/requestToken', 'uas/oauth/accessToken', 'https://www.linkedin.com/uas/oauth/authorize' use CommonLogger , nil use Cache , nil, 600 do use ErrorHandler, lambda{ |env| RuntimeError.new(env[RESPONSE_BODY]['message'])} use ErrorDetectorHttp use JsonResponse, true end end end module RestCore::Linkedin::Client include RestCore def me query={}, opts={} get('v1/people/~', query, opts) end end class RestCore::Linkedin include RestCore::ClientOauth1 include RestCore::Linkedin::Client autoload :RailsUtil, 'rest-core/client/linkedin/rails_util' if Object.const_defined?(:Rails) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rest-more-3.1.0 | lib/rest-core/client/linkedin.rb |
rest-more-3.0.0 | lib/rest-core/client/linkedin.rb |