How to easily parse Podio::Item.find_all return?
AnsweredHi,
I'm trying to get info from a Podio App.
I'm using the Ruby client library to make thing easier and I'm able to get some info from my App using the following Method:
Podio::Item.find_all(<APP\_ID>)
However, I find it difficult to manipulate the result of the method.
I understand Podio::Item.find_all return a something like this: https://developers.podio.com/doc/items/get-items-27803 but parsing this manually is not to easy.
Is there is other Method in the client library that I could use to manipulate this result?
Thanks in advance to point me to the right direction
-
Podio::Item.find_all returns a struct with three properties: count (filtered in the docs), total_count (total in the docs) and all (items in the docs).
all is a collection of Podio::Item instances. So the response is already wrapped in objects, there is no need to parse it manually as you put it.
Even if you don't use Ruby on Rails, I'd recommend that you take a look the Rails sample, especially the Lead model where you can see an example of how to nicely wrap reading and updating items.
Please sign in to leave a comment.
Comments
1 comment