-
Notifications
You must be signed in to change notification settings - Fork 7
Set tasks onpage
jovixv edited this page Nov 6, 2018
·
3 revisions
Original docs can be found at https://docs.dataforseo.com/#setting-tasks
Attention Please notice that the get() method isn't used. The static call ::getAfterMerge() is used instead. Note that the first setOpt() call should be static
Method: ::getAfterMerge($pool) - creates a single payload out of the list of objects, makes a single call to the API, whereas the payload contains arrays with postIds or without, and returns an object ResponseCollection
require_once '../../../vendor/autoload.php';
use DFSClient\DFSClient;
use DFSClient\Models\OnPageApi\SettingTasks;
$DFSClient = new DFSClient('login','password');
$model = new SettingTasks();
for($i=0;$i<1;$i++){
$pool[] = $model::setOpt('site', 'ranksonic.com')->setOpt('crawl_max_pages', 10);
}
$completed = SettingTasks::getAfterMerge($pool);
if (!$completed->isSuccessful())
dd($completed);
foreach ($completed as $key=>$item){
dump($item);
}- 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