Skip to content

Commit

Permalink
use '$api_url' instead of useless '$url' variable
Browse files Browse the repository at this point in the history
  • Loading branch information
zainjar committed Nov 30, 2017
1 parent edbec50 commit 01c6b25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dev/splNetatmoAPIdev.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public function createThermoSched($thermName, $valveName, $zonesArray, $timesArr
else return array('Unfound valve.');

$api_url = $this->_apiurl."/api/createnewschedule?access_token=" . $this->_accesstoken;
$url = $api_url.'&device_id='.$thermID.'&module_id='.$valveID.'&zones='.$zonesArray.'&timetable='.$timesArray.'&name='.$schedName;
$api_url = $api_url.'&device_id='.$thermID.'&module_id='.$valveID.'&zones='.$zonesArray.'&timetable='.$timesArray.'&name='.$schedName;
$response = file_get_contents($api_url, false);

$jsonDatas = json_decode($response, true);
Expand All @@ -420,7 +420,7 @@ public function switchThermoSched($thermName, $valveName, $schedName) //--------
else return array('Unfound valve.');

$api_url = $this->_apiurl."/api/Switchschedule?access_token=" . $this->_accesstoken;
$url = $api_url.'&device_id='.$thermID.'&module_id='.$valveID.'&schedule_id='.$scheID;
$api_url = $api_url.'&device_id='.$thermID.'&module_id='.$valveID.'&schedule_id='.$scheID;

$response = file_get_contents($api_url, false);

Expand All @@ -442,7 +442,7 @@ public function syncThermoSched($thermName, $valveName, $zonesArray, $timesArray
else return array('Unfound valve.');

$api_url = $this->_apiurl."/api/syncschedule?access_token=" . $this->_accesstoken;
$url = $api_url.'&device_id='.$thermID.'&module_id='.$valveID.'&zones='.$zonesArray.'&timetable='.$timesArray;
$api_url = $api_url.'&device_id='.$thermID.'&module_id='.$valveID.'&zones='.$zonesArray.'&timetable='.$timesArray;

$response = file_get_contents($api_url, false);

Expand All @@ -464,7 +464,7 @@ public function setThermoPoint($thermName, $valveName, $mode) //--------Untested
else return array('Unfound valve.');

$api_url = $this->_apiurl."/api/setthermpoint?access_token=" . $this->_accesstoken;
$url = $api_url.'&device_id='.$thermID.'&module_id='.$valveID.'&setpoint_mode='.$mode;
$api_url = $api_url.'&device_id='.$thermID.'&module_id='.$valveID.'&setpoint_mode='.$mode;

$response = file_get_contents($api_url, false);

Expand Down

0 comments on commit 01c6b25

Please sign in to comment.