1 | <?php namespace League\OAuth2\Client\Provider; |
||
9 | class LinkedInResourceOwner extends GenericResourceOwner |
||
10 | { |
||
11 | |||
12 | use ArrayAccessorTrait; |
||
13 | |||
14 | /** |
||
15 | * Raw response |
||
16 | * |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $response; |
||
20 | |||
21 | /** |
||
22 | * Creates new resource owner. |
||
23 | * |
||
24 | * @param array $response |
||
25 | */ |
||
26 | 6 | public function __construct(array $response = array()) |
|
30 | |||
31 | /** |
||
32 | * A unique identifying value for the member. |
||
33 | * |
||
34 | * This value is linked to your specific application. |
||
35 | * Any attempts to use it with a different application will |
||
36 | * result in a "404 - Invalid member id" error. |
||
37 | * |
||
38 | * @return string|null |
||
39 | */ |
||
40 | 6 | public function getId() |
|
44 | |||
45 | /** |
||
46 | * The member's first name. |
||
47 | * |
||
48 | * @return string|null |
||
49 | */ |
||
50 | 6 | public function getFirstName() |
|
54 | |||
55 | /** |
||
56 | * The member's last name. |
||
57 | * |
||
58 | * @return string|null |
||
59 | */ |
||
60 | 6 | public function getLastName() |
|
64 | |||
65 | /** |
||
66 | * The member's maiden name. |
||
67 | * |
||
68 | * @return string|null |
||
69 | */ |
||
70 | public function getMaidenName() |
||
74 | |||
75 | /** |
||
76 | * The member's name, formatted based on language. |
||
77 | * |
||
78 | * @return string|null |
||
79 | */ |
||
80 | public function getFormattedName() |
||
84 | |||
85 | /** |
||
86 | * The member's first name, spelled phonetically. |
||
87 | * |
||
88 | * @return string|null |
||
89 | */ |
||
90 | public function getPhoneticFirstName() |
||
94 | |||
95 | /** |
||
96 | * The member's last name, spelled phonetically. |
||
97 | * |
||
98 | * @return string|null |
||
99 | */ |
||
100 | public function getPhoneticLastName() |
||
104 | |||
105 | /** |
||
106 | * The member's name, spelled phonetically and formatted based on language. |
||
107 | * |
||
108 | * @return string|null |
||
109 | */ |
||
110 | public function getPhoneticFormattedName() |
||
114 | |||
115 | /** |
||
116 | * The member's headline. |
||
117 | * |
||
118 | * @return string|null |
||
119 | */ |
||
120 | 6 | public function getHeadline() |
|
124 | |||
125 | /** |
||
126 | * An object representing the user's physical location. |
||
127 | * Available fields: name, country, country.code |
||
128 | * Defaults to "name" for compatibility reasons |
||
129 | * |
||
130 | * @return string|array|null |
||
131 | */ |
||
132 | 6 | public function getLocation($field = "name") |
|
140 | |||
141 | /** |
||
142 | * The industry the member belongs to. |
||
143 | * Available fields: name, country, country.code |
||
144 | * |
||
145 | * @return string|null |
||
146 | */ |
||
147 | public function getIndustry() |
||
151 | |||
152 | /** |
||
153 | * The most recent item the member has shared on LinkedIn. |
||
154 | * If the member has not shared anything, their 'status' is returned instead. |
||
155 | * |
||
156 | * @return string|null |
||
157 | */ |
||
158 | public function getCurrentShare() |
||
162 | |||
163 | /** |
||
164 | * The number of LinkedIn connections the member has, capped at 500. |
||
165 | * See 'num-connections-capped' to determine if the value returned has been capped. |
||
166 | * |
||
167 | * @return int|null |
||
168 | */ |
||
169 | public function getNumConnections() |
||
173 | |||
174 | /** |
||
175 | * Returns 'true' if the member's 'num-connections' value has been capped at 500', |
||
176 | * or 'false' if 'num-connections' represents the user's true value.. |
||
177 | * |
||
178 | * @return bool|null |
||
179 | */ |
||
180 | public function getNumConnectionsCapped() |
||
184 | |||
185 | /** |
||
186 | * A long-form text area describing the member's professional profile. |
||
187 | * |
||
188 | * @return string|null |
||
189 | */ |
||
190 | public function getSummary() |
||
194 | |||
195 | /** |
||
196 | * A short-form text area describing the member's specialties. |
||
197 | * |
||
198 | * @return string|null |
||
199 | */ |
||
200 | public function getSpecialties() |
||
204 | |||
205 | /** |
||
206 | * An object representing the member's current position. |
||
207 | * |
||
208 | * @return string|null |
||
209 | */ |
||
210 | public function getPositions($field = null) |
||
218 | |||
219 | /** |
||
220 | * A URL to the member's formatted profile picture, if one has been provided. |
||
221 | * |
||
222 | * @return string|null |
||
223 | */ |
||
224 | 6 | public function getPictureUrl() |
|
228 | |||
229 | /** |
||
230 | * A URL to the member's original unformatted profile picture. |
||
231 | * This image is usually larger than the picture-url value above. |
||
232 | * |
||
233 | * @return string|null |
||
234 | */ |
||
235 | public function getPictureUrls() |
||
239 | |||
240 | /** |
||
241 | * The URL to the member's authenticated profile on LinkedIn. |
||
242 | * You must be logged into LinkedIn to view this URL. |
||
243 | * |
||
244 | * @return string|array|null |
||
245 | */ |
||
246 | public function getSiteStandardProfileRequest($field = 'url') |
||
254 | |||
255 | /** |
||
256 | * A URL representing the resource you would request for |
||
257 | * programmatic access to the member's profile. |
||
258 | * |
||
259 | * @return string|null |
||
260 | */ |
||
261 | public function getApiStandardProfileRequest() |
||
265 | |||
266 | /** |
||
267 | * A URL representing the resource you would request for |
||
268 | * programmatic access to the member's profile. |
||
269 | * |
||
270 | * @return string|null |
||
271 | */ |
||
272 | 6 | public function getPublicProfileUrl() |
|
276 | |||
277 | /** |
||
278 | * The LinkedIn member's primary email address. |
||
279 | * Secondary email addresses associated with the member |
||
280 | * are not available via the API. |
||
281 | * |
||
282 | * @return string|null |
||
283 | */ |
||
284 | 6 | public function getEmailAddress() |
|
288 | |||
289 | /** |
||
290 | * Obsolete, left for compatibility reasons |
||
291 | * Get user email |
||
292 | * |
||
293 | * @return string|null |
||
294 | */ |
||
295 | 6 | public function getEmail() |
|
299 | |||
300 | /** |
||
301 | * Obsolete, left for compatibiliy reasons. |
||
302 | * Get user imageurl |
||
303 | * |
||
304 | * @return string|null |
||
305 | */ |
||
306 | 6 | public function getImageurl() |
|
310 | |||
311 | |||
312 | /** |
||
313 | * Obsolete, left for compatibility reasons. |
||
314 | * Get user description |
||
315 | * |
||
316 | * @return string|null |
||
317 | */ |
||
318 | 6 | public function getDescription() |
|
322 | |||
323 | /** |
||
324 | * Obsolete, left for compatibility reasons. |
||
325 | * Get user url |
||
326 | * |
||
327 | * @return string|null |
||
328 | */ |
||
329 | 6 | public function getUrl() |
|
333 | |||
334 | /** |
||
335 | * Return all of the owner details available as an array. |
||
336 | * |
||
337 | * @return array |
||
338 | */ |
||
339 | 6 | public function toArray() |
|
343 | } |
||
344 |