Class: LinkedIn::Client
- Inherits:
-
Saddle::Client
- Object
- Saddle::Client
- LinkedIn::Client
- Extended by:
- Stub
- Defined in:
- lib/linkedin-client.rb
Class Method Summary collapse
- .host ⇒ Object
- .num_retries ⇒ Object
- .option_fields ⇒ Object
- .path_prefix ⇒ Object
- .request_style ⇒ Object
- .timeout ⇒ Object
- .use_ssl ⇒ Object
Instance Method Summary collapse
-
#initialize(args) ⇒ Client
constructor
A new instance of Client.
Methods included from Stub
Constructor Details
#initialize(args) ⇒ Client
Returns a new instance of Client.
15 16 17 18 19 |
# File 'lib/linkedin-client.rb', line 15 def initialize args args.each do |k,v| instance_variable_set("@#{k}", v) unless v.nil? end end |
Class Method Details
.host ⇒ Object
21 22 23 |
# File 'lib/linkedin-client.rb', line 21 def self.host @host || 'api.linkedin.com' end |
.num_retries ⇒ Object
33 34 35 |
# File 'lib/linkedin-client.rb', line 33 def self.num_retries @num_retries || 1 end |
.option_fields ⇒ Object
46 47 48 |
# File 'lib/linkedin-client.rb', line 46 def self.option_fields @option_fields = ['id', 'email-address', 'first-name', 'last-name', 'num-connections', 'positions', 'three-current-positions', 'three-past-positions', 'educations'] end |
.path_prefix ⇒ Object
25 26 27 |
# File 'lib/linkedin-client.rb', line 25 def self.path_prefix @path_prefix || '' end |
.request_style ⇒ Object
42 43 44 |
# File 'lib/linkedin-client.rb', line 42 def self.request_style @request_style || :json end |
.timeout ⇒ Object
37 38 39 40 |
# File 'lib/linkedin-client.rb', line 37 def self.timeout # seconds @timeout || 5 end |
.use_ssl ⇒ Object
29 30 31 |
# File 'lib/linkedin-client.rb', line 29 def self.use_ssl @use_ssl || true end |