/** * Calls pinterest API to like or unlike Pin by ID * * @param $pinId * @param $url * @return bool */ protected function likePinMethodCall($pinId, $url) { $this->request->checkLoggedIn(); $post = PinHelper::createSimplePinRequest($pinId); $postString = URlHelper::buildRequestString($post); $res = $this->request->exec($url, $postString); return PinHelper::checkMethodCallResult($res); }
/** * Calls pinterest API to like or unlike Pin by ID * * @param int $pinId * @param string $url * @return bool */ protected function likePinMethodCall($pinId, $url) { $this->request->checkLoggedIn(); $data = PinHelper::createPinIdRequest($pinId); $post = PinHelper::createPinRequestData($data); $postString = URlHelper::buildRequestString($post); $response = $this->request->exec($url, $postString); return $this->response->checkErrorInResponse($response); }