GetItems Empty Field Issues

62 views
Skip to first unread message

Gabe Martini

unread,
Jun 25, 2012, 9:30:07 AM6/25/12
to podi...@googlegroups.com
I am using the PHP API package to write a few websites that take the information and format it live with javascript and php functions. I use the $api->item->getItems() function to pull everything down as one request, to make the limit last longer, even though this application will not be used very often. I noticed, when formatting the data, that custom app fields that were not filled in on Podio were not existent in the output. This causes an offset that mangles the data and makes it unreadable in the table I have formatted it in. I know I could possibly "fix" this with a bit of regex trickery, but I was wondering if there was a way to pull all of the fields, possibly through an additional attribute, whether or not they are empty.

Thanks

Gabe

Casper Fabricius

unread,
Jun 25, 2012, 10:38:13 AM6/25/12
to podi...@googlegroups.com
Hi Gabe,

The API as a rule returns only fields with values. I'm afraid you will have to adapt your code to this.

Cheers,
Casper Fabricius
Developer at Podio

Gabe Martini

unread,
Jun 25, 2012, 11:45:41 AM6/25/12
to podi...@googlegroups.com
Ok, thanks!

Also, while you're still around, I also use the $api->item->xlsx() function, it worked just fine with username/password authentication, but it will not work at all with app token authentication, which it says on the docs should work.

Here is the php error: (auth.php handles authorization and initializing the api, dl.php handles downloading files and xlsx documents, url's have been changed for privacy)

PHP Fatal error:  Uncaught exception 'PodioAuthorizationError' in /var/www/webroot/podio-php/PodioAPI.php:271\nStack trace:\n#0 /var/www/webroot/podio-php/PodioAPI.php(301): Podio->request('GET', '/item/app/[[[appid]]]', Array)\n#1 /var/www/webroot/podio-php/areas/PodioItem.php(268): Podio->get('/item/app/[[[appid]]]', Array)\n#2 /var/www/webroot/dl.php(8): PodioItem->xlsx([[[appid]]])\n#3 {main}\n  thrown in /var/www/webroot/podio-php/PodioAPI.php on line 271, referer: https://domain.net/index.php

Gabe

Gabe Martini

unread,
Jun 25, 2012, 4:23:08 PM6/25/12
to podi...@googlegroups.com
As this is a separate issue, I added it to a different post.
Reply all
Reply to author
Forward
0 new messages