Podio Php - 限制返回的项目字段数量

Podio Php - limit the amount of item fields returned

有什么方法可以限制在过滤应用程序中的项目时返回的字段。我不想 returning 所有字段,我只想 return item-id 和 title 字段

您可以为此使用字段参数。 有关它如何工作以及如何使用的更多详细信息,请参见此处:https://developers.podio.com/index/api "Bundling responses using fields parameter" 部分。

使用字段来捆绑对象可以大大减少您必须提出的 API 请求的数量。

很可能您正在寻找 fields=items.view(micro) 参数。跑道 API 将 return 然后每个项目只有 5 个值: app_item_iditem_idtitlelinkrevision

PHP样本

$items = PodioItem::filter($appCreds->app_id, 
                           array('limit' => $maxItems, 
                                 'offset' => $offset, 
                                 'filters' => $filters ), 
                           array('fields' => 'items.view(micro)'));