/** * Get User Campaigns * * Returns the user to the list of campaigns Yandex.market. * The list coincides with the list of campaigns * that are displayed in the partner interface Yandex.Market on page "My shops." * * @see http://api.yandex.ru/market/partner/doc/dg/reference/get-campaigns.xml * * @return Models\Campaigns */ public function getCampaigns() { $resource = 'campaigns.json'; $response = $this->sendRequest('GET', $this->getServiceUrl($resource)); $decodedResponseBody = $this->getDecodedBody($response->getBody()); $getCampaignsResponse = new Models\GetCampaignsResponse($decodedResponseBody); return $getCampaignsResponse->getCampaigns(); }
/** * Get User Campaigns * * Returns the user to the list of campaigns Yandex.market. * The list coincides with the list of campaigns * that are displayed in the partner interface Yandex.Market on page "My shops." * * @see http://api.yandex.ru/market/partner/doc/dg/reference/get-campaigns.xml * * @return Models\Campaigns */ public function getCampaigns() { $resource = 'campaigns.json'; $client = new Client($this->getServiceUrl($resource)); $request = $client->createRequest('GET'); $response = $this->sendRequest($request)->json(); $getCampaignsResponse = new Models\GetCampaignsResponse($response); return $getCampaignsResponse->getCampaigns(); }