Permalink
Browse files

Closes linkedin-84 ability to access user companies

  • Loading branch information...
1 parent c326e8f commit f00eb7ee4ffa5af42484c704d0c420624f2cb658 @dman7 dman7 committed Nov 28, 2011
Showing with 5 additions and 1 deletion.
  1. +1 −1 examples/authenticate.rb
  2. +4 −0 examples/profile.rb
View
@@ -18,4 +18,4 @@
# or authorize from previously fetched access keys
c.authorize_from_access("OU812", "8675309")
-# you're now free to move about the cabin, call any API method
+# you're now free to move about the cabin, call any API method
View
@@ -11,4 +11,8 @@
# get a profile for someone via their public profile url
client.profile(:url => 'http://www.linkedin.com/in/netherland')
+# provides the ability to access authenticated user's company field in the profile
+user = client.profile(:fields => %w(positions))
+companies = user.positions.all.map{|t| t.company}
+# Example: most recent company can be accessed via companies[0]

0 comments on commit f00eb7e

Please sign in to comment.