Module: LinkedIn::API

Includes:
Comment, Company, Group, Person, Post
Included in:
Client
Defined in:
lib/linked_in/api.rb,
lib/linked_in/api/post.rb,
lib/linked_in/api/group.rb,
lib/linked_in/api/person.rb,
lib/linked_in/api/comment.rb,
lib/linked_in/api/company.rb

Defined Under Namespace

Modules: Comment, Company, Group, Person, Post

Instance Method Summary collapse

Methods included from Company

#get_companies, #get_company, #get_company_products, #search_companies

Methods included from Comment

#get_comment, #get_comments

Methods included from Post

#get_post, #get_posts

Methods included from Group

#get_group, #get_group_posts, #get_groups

Methods included from Person

#get_me, #get_my_connections, #get_my_followed_companies, #get_my_memberships, #get_my_suggested_companies, #get_my_suggestions, #get_people, #get_person, #get_person_connections, #get_person_followed_companies, #get_person_memberships, #get_person_suggested_companies, #get_person_suggestions

Instance Method Details

#get(path, options = {}) ⇒ Object



15
16
17
18
19
# File 'lib/linked_in/api.rb', line 15

def get(path, options={})
  options = { :format => 'json', :fields => nil }.merge(options)
  fields = options.delete(:fields)
  request(:get, "#{base_uri}/#{build_request(path, fields, options)}")
end

#get_collection(object, id_or_param, collection, options = {}) ⇒ Object



30
31
32
33
# File 'lib/linked_in/api.rb', line 30

def get_collection(object, id_or_param, collection, options={})
  query = parse_query(id_or_param)
  get("#{object}/#{query}/#{collection}", options)
end

#get_object(object, id_or_param, options = {}) ⇒ Object



21
22
23
24
# File 'lib/linked_in/api.rb', line 21

def get_object(object, id_or_param, options={})
  query = parse_query(id_or_param)
  get("#{object}/#{query}", options)
end

#get_objects(object, ids, options = {}) ⇒ Object



26
27
28
# File 'lib/linked_in/api.rb', line 26

def get_objects(object, ids, options={})
  get("#{object}::(#{ids.join(',')})", options)
end