Module: EzLinkedin::Api::QueryMethods

Included in:
Client
Defined in:
lib/ezlinkedin/api/query_methods.rb

Instance Method Summary collapse

Instance Method Details

#company(options = {}) ⇒ type

Do a company search based on id, email, or universal-name

Parameters:

  • options={}
    Hash

    parameters to search by, includes:

    id, universal-name(pass it in as :name), email-domain(:domain). options can also include a string array of fields to return. See the linkedin api for available fields

Returns:

  • (type)
    description


52
53
54
55
56
# File 'lib/ezlinkedin/api/query_methods.rb', line 52

def company(options={})
	path = company_path(options)
	fields = options.include?(:fields)
	make_query(path, options, fields)
end

#connections(options = {}) ⇒ Mash

Retrieve the authenticated user’s connections

Parameters:

  • options={}
    Hash

    pass in fields and/or a count

Returns:

  • (Mash)

    Mash hash of connections



24
25
26
27
# File 'lib/ezlinkedin/api/query_methods.rb', line 24

def connections(options={})
	path = "#{person_path(options)}/connections"
	make_query(path, options, true)
end

#network_updates(options = {}) ⇒ Mash

Retrieve the user’s social feed

Parameters:

  • options={}
    Hash

    visit Linkedin’s api to

    see possible options. it will default to an

    aggregated feed unless :scope => 'self'.
    :types => [:shar, :recu, :apps]
    :count => 5
    

Returns:

  • (Mash)

    Mash hash of updates



38
39
40
41
# File 'lib/ezlinkedin/api/query_methods.rb', line 38

def network_updates(options={})
	path = "#{person_path(options)}/network/updates"
	make_query(path, options, false)
end

#profile(options = {}) ⇒ Mash

Retrieve a certain profile depending on the options passed in.

Parameters:

  • options={}
    Hash

    can be an array of fields as strings and an id,

    and a url to a public profile. This can also contain request

    headers
    

Returns:

  • (Mash)

    a Mash hash representing the found profile



13
14
15
16
# File 'lib/ezlinkedin/api/query_methods.rb', line 13

def profile(options={})
	path = person_path(options)
	make_query(path, options, true)
end