Post

2 followers Follow
0
Avatar

Problems getting the task list

Hello, I'm using the Podio API, and I want to get the list of tasks filtering with the due_date, but I got an error

"The values are not in the right format" Request URL: http://api.podio.com/task/?space=3944986&completed=false&due_date=&limit=100

$tasks = PodioTask::get_all(array(
'space' => 3944986,
'completed' => 'false',
'due_date' => array(
'from' => '+0rd',
'to' => '+0rd'
),
'limit' => 100
)
);

Victoria Aparicio

Please sign in to leave a comment.

1 comment

0
Avatar

Hi Victoria,

The Podio DSL for specifying dates works like this:

Accepts:
- date in format Y-M-D
- range of dates Y-M-D--Y-M-D
- relative dates

Relative date examples:
- +1d - plus 1 day
- +1w - plus one week
- +1wr - to the beginning of the next calendar week
- +1m - plus one calendar month
- +1mr - to the beginning of the next calendar month
- +1y - plus one calendar year
- +1yr - to the beginning of the next calendar year

So in your case the code becomes:

 $tasks = PodioTask::get_all(array(
'space' => $space_id,
'completed' => 'false',
'limit' => 100,
'due_date' => '-0d--+1d')
);

Cheers, 

Brian

Brian Stengaard 0 votes