-
Notifications
You must be signed in to change notification settings - Fork 7
About AbstractModel
georgesvash edited this page Nov 7, 2018
·
2 revisions
-
->setOpt('field', 'value')- this method is the abridge of setOption, where the first argument is a field used by DataForSEO, the second is its value. -
setExtraToRequestUrl($param)- this method adds a particular value to the request's URL. For example, before executing this method, the url was: dataforseo.com/kwrd_sv_batch_tasks_get, after executing the method becomes: dataforseo.com/kwrd_sv_batch_tasks_get/$yourparam.
public function setExtraToRequestUrl($extra)
{
$this->requestToFunction = $this->requestToFunction.'/'.$extra;
return $this;
}-
setTimeOut($newTimeout)- Sets a new timeout for each request.
public function setTimeOut($newTimeout)
{
$this->timeOut = $newTimeout;
return $this;
}-
setMethod($newMethod)- Sets the method of an http request: GET,POST, DELETE, etc.
public function setMethod($newMethod)
{
$this->method = $newMethod;
return $this;
}-
setUrl($newUrl)- Sets a completely new URL.
public function setUrl($newUrl)
{
$this->url = $newUrl;
return $this;
}-
setApiVersion($newVersion)- Set a particular version of the API that will be used in the request.
public function setApiVersion($newVersion)
{
$this->apiVersion = $newVersion;
return $this;
}-
setPostId($id)- Set a key for an array in the payload, where a key will be equal to the $id.
public function setPostId($id)
{
$this->postId = $id;
return $this;
}-
setPathToMainData($newPath)- Since you receive all the main data for the request at the point of iteration, you can set a route to this data yourself. This way, you can access the data that you specified in the $newPath at the point of iteration by the foreach cycle.
public function setPathToMainData($newPath)
{
$this->pathToMainData = $newPath;
return $this;
}-
setRequestToFunction($newRequestToFunction)- The name of the function, this is the end url of the DFSAPI API. Example: https://api.dataforseo.com/v2/kwrd_sv_batch_tasks_get/$task_id, in this example the function is kwrd_sv_batch_tasks_get
public function setRequestToFunction($newRequestToFunction)
{
$this->requestToFunction = $newRequestToFunction;
return $this;
}- RankTracker API
- SERP API
-
Merchant API
-
Google Shopping API
- Set Google Shopping tasks
- Get Google Shopping completed tasks
- Get Google Shopping results by task_id
- Set Google Shopping HTML tasks
- Get Google Shopping HTML completed tasks
- Get Google Shopping HTML results by task_id
- Set Google Shopping Shops tasks
- Get Google Shopping Shops completed tasks
- Get Google Shopping Shops results by task_id
- Amazon API
-
Google Shopping API
- Keywords Data API
- Keywords Finder API
- Competitor Data API
- OnPage API
- Common API