| @@ 85-96 (lines=12) @@ | ||
| 82 | return "https://{$this->host}/api/{$resource}"; |
|
| 83 | } |
|
| 84 | ||
| 85 | public function getBusinessUnits() |
|
| 86 | { |
|
| 87 | $this->login(); |
|
| 88 | $response = $this->request('GET', $this->buildUrl("businessunit?businessalias={$this->alias}")); |
|
| 89 | ||
| 90 | $units = []; |
|
| 91 | foreach ($response["Records"] as $unit) { |
|
| 92 | $units[] = new BusinessUnit($unit); |
|
| 93 | } |
|
| 94 | ||
| 95 | return $units; |
|
| 96 | } |
|
| 97 | ||
| 98 | public function getJobs() |
|
| 99 | { |
|
| @@ 98-109 (lines=12) @@ | ||
| 95 | return $units; |
|
| 96 | } |
|
| 97 | ||
| 98 | public function getJobs() |
|
| 99 | { |
|
| 100 | $this->login(); |
|
| 101 | $response = $this->request('GET', $this->buildUrl("job?businessalias={$this->alias}")); |
|
| 102 | ||
| 103 | $jobs = []; |
|
| 104 | foreach ($response["Jobs"] as $unit) { |
|
| 105 | $jobs[] = new Job($unit); |
|
| 106 | } |
|
| 107 | ||
| 108 | return $jobs; |
|
| 109 | } |
|
| 110 | ||
| 111 | public function getPerson($email) |
|
| 112 | { |
|