I have fairly simple REST API request to get guest country code by his ip. In my block file this works perfectly fine when using curl:
$url = "http://........./".$guestIp."?access_key=".$access_key.$jsonOutput; $this->_curl->get($url); $response = $this->_json->unserialize($this->_curl->getBody()); $countryCode = $response['country_code']; return $countryCode;
Now when should I create Api/Data interfaces, repository interfaces in this case if it is needed?