47        $response = Internet::getURL($this->endpoint . 
"?channel=" . $this->channel, 4, [], $error);
 
   48        $this->error = $error;
 
   50        if($response !== 
null){
 
   51            $response = json_decode($response->getBody(), 
true);
 
   52            if(is_array($response)){
 
   53                if(isset($response[
"error"]) && is_string($response[
"error"])){
 
   54                    $this->error = $response[
"error"];
 
   56                    $mapper = new \JsonMapper();
 
   57                    $mapper->bExceptionOnMissingData = 
true;
 
   58                    $mapper->bStrictObjectTypeChecking = 
true;
 
   59                    $mapper->bEnforceMapType = 
false;
 
   62                        $responseObj = $mapper->map($response, 
new UpdateInfo());
 
   63                        $this->setResult($responseObj);
 
   64                    }
catch(\JsonMapper_Exception $e){
 
   65                        $this->error = 
"Invalid JSON response data: " . $e->getMessage();
 
   69                $this->error = 
"Invalid response data";