Example on creating a custom widget fetching data from external API

196 views
Skip to first unread message

Peter Andreas Moelgaard

unread,
Jul 3, 2012, 3:03:02 AM7/3/12
to podi...@googlegroups.com
I'm interested adding a widget to Podio which retrieves data from a remotely hosted REST service, the service is a custom service which serves all information about battery driven devices in he company (we are a small training company), the widget is targeted at our secretary who then knows which devices needs to have the rechargeable batteries changed.

I would prefer to use our existing JavaScript based widget code, so I was hoping it would be possible to create a generic widget which would allow me to link to an external JavaScript file, but if not, how do I add a widget which uses custom code.

Christian Holm

unread,
Jul 3, 2012, 8:44:05 AM7/3/12
to podi...@googlegroups.com
Hi Peter

I would recommend not using widgets for this. Instead you should create an app called something like "Devices". You can then use the API to populate this app with the devices you have and update f.ex. a progress field with the battery level remaining. Then when the device is almost out of battery, you can use the API to create a task on that device and assign it to the secretary. She can then complete the task when the battery have been exchanged.

I know this is most likely some more work, but I think it would be a much better solution.

We don't support widgets with any kind of custom code, so that is not an option I'm afraid.

Christian

Peter Andreas Moelgaard

unread,
Jul 4, 2012, 2:13:40 AM7/4/12
to podi...@googlegroups.com
Hej Christian,

OK, I'm happy its possible, regardless of being in an app of widget.
So, moving along with notion of it being an app...

I suppose a "Device" would be an "Item", the Device would then have a "Field" called "batteryPercent" ?

Thanks,
Peter

Christian Holm

unread,
Jul 4, 2012, 2:28:21 AM7/4/12
to podi...@googlegroups.com
Exactly. 

I think your case is a very common one, so please just keep on asking questions here, and hopefully this could become a good "case-study" for many Podio integrations. It sounds like a great candidate from what you have said.

Christian
Reply all
Reply to author
Forward
0 new messages