Embedly\Embedly::services PHP Method

services() public method

public services ( ) : array
return array
    public function services()
    {
        if (!$this->services) {
            $url = $this->parse_host($this->hostname);
            $apiUrl = sprintf("%s1/services/php", $url['url']);
            $ch = curl_init($apiUrl);
            $this->setCurlOptions($ch, array(sprintf('Host: %s', $url['hostname']), sprintf('User-Agent: %s', $this->user_agent)));
            $response_arr = $this->curlExec($ch);
            $res = $response_arr["response"];
            $this->services = json_decode($res);
        }
        return $this->services;
    }