mpz
mpz

Reputation: 1850

Get Podio Items relative for app specific item via API

I have such app in Podio: - Houses (there is all houses from my village) - Flats (it have field relative for house item in Houses)

So i need load all flats for one house via Podio API (ruby gem is used)

I find such example code:

Podio::Item.find_by_filter_values(flats_app_id, created_on:{from:"-7d",to:"+0d"})

via (https://github.com/aford3/Blogs/blob/d0eaaa680a0fdf3107078a85438d8ef632d404a6/Podio.md)

It is work.

How to rewrite such code for my task? I see https://developers.podio.com/doc/filters - but it is not helpful for me.

I try such (not fine):

Podio::Item.find_by_filter_values(flats_app_id, houses_app_id:{app_item_id:1})
Podio::Item.find_by_filter_values(flats_app_id, app:{app_id:houses_app_id})
Podio::Item.find_by_filter_values(flats_app_id, flat_field_id:{houses_app_id})

Upvotes: 0

Views: 497

Answers (1)

All the filter values are documented at: https://developers.podio.com/doc/filters

In your case it would mean:

item_id = 123;
Podio::Item.find_by_filter_values(flats_app_id, {houses_app_id:item_id})

Beware that you cannot use the shorter app_item_id when filtering. You have to use the longer item_id. You find this item_id either through the API or by going to the item and clicking the little cloud icon in the grey bar at the top of the item.

Upvotes: 1

Related Questions