1 | <?php |
||
14 | class LinkedInController extends Controller |
||
15 | { |
||
16 | /** |
||
17 | * LinkedIn API base Url |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $baseUrl; |
||
21 | |||
22 | /** |
||
23 | * Instance of Client |
||
24 | * @var object |
||
25 | */ |
||
26 | protected $client; |
||
27 | |||
28 | /** |
||
29 | * Response from requests made to LinkedIn |
||
30 | * @var mixed |
||
31 | */ |
||
32 | protected $response; |
||
33 | |||
34 | /** |
||
35 | * Initialize the Controller with necessary arguments |
||
36 | */ |
||
37 | public function __construct() |
||
42 | |||
43 | /** |
||
44 | * Set options for making the Client request |
||
45 | * @return void |
||
46 | */ |
||
47 | private function setRequestOptions() |
||
57 | |||
58 | /** |
||
59 | * Get the response from New York times API |
||
60 | * @param string $relativeUrl |
||
61 | */ |
||
62 | private function setGetResponse($relativeUrl) |
||
66 | |||
67 | /** |
||
68 | * Get the whole response from a get operation |
||
69 | * @return array |
||
70 | */ |
||
71 | private function getResponse() |
||
75 | |||
76 | /** |
||
77 | * Get the data response from a get operation |
||
78 | * @return array |
||
79 | */ |
||
80 | private function getData() |
||
84 | |||
85 | /** |
||
86 | * Return all data to the LinkedIn API dashboard |
||
87 | * @return mixed |
||
88 | */ |
||
89 | public function getPage() |
||
109 | } |
||
110 | |||
111 |