Module: EzLinkedin::Api::QueryMethods

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

Instance Method Summary collapse

Instance Method Details

#company(options = {}) ⇒ Mash

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). The ‘fields’ option only works if you search with an id. See the linkedin api for available fields

Returns:

  • (Mash)

    Mash hash of results



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

def company(options={})
	path = company_path(options)
	use_fields = options.include?(:fields)
	make_query(path, options, use_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

#group_memberships(options = {}) ⇒ Mash

Returns the groups the current user is a member of

Parameters:

  • options={}
    Hash

    can include a string array

    containing the names of fields to get from each group

Returns:

  • (Mash)

    Mash hash of results



65
66
67
68
# File 'lib/ezlinkedin/api/query_methods.rb', line 65

def group_memberships(options={})
	path = "#{person_path(options)}/group-memberships#{group_options(options)}"
	make_query(path, options.merge({member: true}), false)
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