php - How to fetch tasks Through Asana API

185

Here is the code I'm currently using to fetch data from Asana API: I have tried this code so please tell me where I'm wrong.

$tasks = $client->fetch('https://app.asana.com/api/1.0/workspaces.json');

//print_r($tasks);

//as i do print_r then i get whole workspace data 
$i=0;

//then i intialize counter with a value zero.
while(isset($tasks['result']['data'][$i]['id']))
{ 

    //then go through loop to fetch data from array.
    //print_r($tasks);

    //then i cross check that array

    $user_detail = $client->fetch('https://app.asana.com/api/1.0/workspaces/'.$tasks['result']['data'][$i]['id'].'/tasks.json');

    //then i fetch tasks through url , in http header  response is 200 ok ,  and  i also cross check my account tasks also so where im wrong.  

    print_r($user_detail);

People are also looking for solutions to the problem: php - Redirect Wordpress User to their own Post on Front-End Login

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.