I’ve been developing a small tool to assist in some small tasks to streamline how we work with them. The PHP library has been giving me something that I can’t seem to figure out.
Workspaces/Login/User info can be fetched. No problemo. I can get a taskcount also. However, when I try to fetch an actual set of Tasks it will not return any results. Moreover, the explorer will return the desired set.
I’ve tried swapping a personal access token to oAuth, no difference.
I’ve tried taking out as many fields/args to that call but no results.
That was me just trying out I don’t get any error given back. I actually get an empty pagination object back. Same parameters in Api Explorer will give results.
To give a better understanding, this is what I’m seeing. That project definitely has tasks in there. I’ve attached some pictures to proof. Would be great if anyone of the Asana team could chime in.
While going through the options I found the iterator_type. When I changed it to false it gave me back results. It seems like, but this is a wild guess – without diving deeper to be honest because the docs are badly documentated and nearly half the code is left unhinted making it difficult to read and having to step through to make sense… – that the ItemIterator is not interfacing correctly with CollectionPageIterator to trigger the protected function getNext() that actually performs the $client->get() call.
If you change iterator_type to false, then it will straight up request the call without the Collection class.