lib/linked_in/client.rb in linkedin-bdigital-0.2.2.2 vs lib/linked_in/client.rb in linkedin-bdigital-0.2.2.3

- old
+ new

@@ -48,10 +48,18 @@ options = format_options_for_query(options) People.from_xml(get(to_uri(path, options))) end + def company_search(options={}) + path = "/company-search:(facets,companies:(id,name,website-url,logo-url,employee-count-range,twitter-id,founded-year))" + options = { :keywords => options } if options.is_a?(String) + + options = format_options_for_query(options) + CompanySearch.from_xml(get(to_uri(path, options))) + end + def current_status path = "/people/~/current-status" Nokogiri::XML(get(path)).xpath('//current-status').text end @@ -125,11 +133,9 @@ def write_fixture(path, filename) file = File.new("test/fixtures/#{filename}", "w") file.puts(access_token.get(path).body) file.close end - - private def format_options_for_query(opts) opts.keys.each do |key| value = opts.delete(key) value = value.join("+") if value.is_a?(Array)