/** * Executes request to Pinterest API * * @param string $resourceUrl * @param string $postString * @return array */ public function exec($resourceUrl, $postString = "") { $url = UrlHelper::buildApiUrl($resourceUrl); $this->makeHttpOptions($postString); $res = $this->http->init($url)->setOptions($this->options)->execute(); $this->http->close(); return json_decode($res, true); }