@@ 90-105 (lines=16) @@ | ||
87 | return "https://{$this->host}/api/{$resource}"; |
|
88 | } |
|
89 | ||
90 | public function getBusinessUnits() |
|
91 | { |
|
92 | $this->login(); |
|
93 | $response = $this->request("GET", $this->buildUrl("businessunit"), [ |
|
94 | "query" => [ |
|
95 | "businessalias" => $this->alias, |
|
96 | ] |
|
97 | ]); |
|
98 | ||
99 | $units = []; |
|
100 | foreach ($response["Records"] as $unit) { |
|
101 | $units[] = new BusinessUnit($unit); |
|
102 | } |
|
103 | ||
104 | return $units; |
|
105 | } |
|
106 | ||
107 | public function getJobs() |
|
108 | { |
|
@@ 107-122 (lines=16) @@ | ||
104 | return $units; |
|
105 | } |
|
106 | ||
107 | public function getJobs() |
|
108 | { |
|
109 | $this->login(); |
|
110 | $response = $this->request("GET", $this->buildUrl("job"), [ |
|
111 | "query" => [ |
|
112 | "businessalias" => $this->alias, |
|
113 | ] |
|
114 | ]); |
|
115 | ||
116 | $jobs = []; |
|
117 | foreach ($response["Jobs"] as $unit) { |
|
118 | $jobs[] = new Job($unit); |
|
119 | } |
|
120 | ||
121 | return $jobs; |
|
122 | } |
|
123 | ||
124 | public function getPerson($email) |
|
125 | { |