Commit 87b36213 authored by Tariq Khan's avatar Tariq Khan 💬

Update Occupie variable

parent a7d4e5f5
<?php <?php
class Oauth2 { class Oauth2 {
private $occupieUrl = false; private $operateUrl = false;
private $client = false; private $client = false;
private $clientSecret = false; private $clientSecret = false;
private $scope = false; private $scope = false;
...@@ -107,7 +107,7 @@ class Oauth2 { ...@@ -107,7 +107,7 @@ class Oauth2 {
'Accept: application/json' 'Accept: application/json'
) )
); );
$response = $this->httpRequest($this->occupieUrl.'/api/1.0/'.$endpoint, $options, $responseHeaders); $response = $this->httpRequest($this->operateUrl.'/api/1.0/'.$endpoint, $options, $responseHeaders);
highlight_string("<?php\n".var_export($response ? $response->response : $responseHeaders, true).";\n?>"); highlight_string("<?php\n".var_export($response ? $response->response : $responseHeaders, true).";\n?>");
} }
private function fetchAllDevices() { private function fetchAllDevices() {
...@@ -198,13 +198,13 @@ class Oauth2 { ...@@ -198,13 +198,13 @@ class Oauth2 {
return $raw ? $content : json_decode($content); return $raw ? $content : json_decode($content);
} }
private function getTokenEndpoint() { private function getTokenEndpoint() {
return $this->occupieUrl.'/oauth2/token'; return $this->operateUrl.'/oauth2/token';
} }
private function getTrackingDeviceApiUri() { private function getTrackingDeviceApiUri() {
return $this->occupieUrl.'/api/1.0/trackingdevice'; return $this->operateUrl.'/api/1.0/trackingdevice';
} }
private function getTrackingEntryApiUri() { private function getTrackingEntryApiUri() {
return $this->occupieUrl.'/api/1.0/trackingentries'; return $this->operateUrl.'/api/1.0/trackingentries';
} }
public function isUserAuthenticated() { public function isUserAuthenticated() {
return $this->accessToken !== false; return $this->accessToken !== false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment