I have tried to send only 5 call to fetch tasks from Asana API. Here is my code
$tasks = $client->fetch('https://app.asana.com/api/1.0/workspaces.json');
print_r($tasks);
$i=0;
while(isset($tasks['result']['data'][$i]['id']))
{
$tasks_detail = $client->fetch('https://app.asana.com/api/1.0/workspaces/'.$tasks['result']['data'][$i]['id'].'.json');
print_r($tasks_detail);
while(isset($tasks_detail['result']['data'][$i]['id']))
{
$tasks_details = $client->fetch('https://app.asana.com/api/1.0/tasks/'.$tasks_detail['result']['data'][$i]['id'].'.json');
print_r($tasks_details);
$i++;
}
I have used only 2 while
loops to fetch tasks from the API after which the api doesn't respond to the calls.