From 7aea165346a254e601d5461bd29a43b0e36c5068 Mon Sep 17 00:00:00 2001 From: Pieterjan Muller Date: Sun, 6 Dec 2015 19:35:17 +0100 Subject: [PATCH 1/2] view_id or filters params in Item.item_count --- lib/podio/models/item.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/podio/models/item.rb b/lib/podio/models/item.rb index 8724829f..d9251b44 100644 --- a/lib/podio/models/item.rb +++ b/lib/podio/models/item.rb @@ -187,8 +187,11 @@ def find_field_top(field_id, options={:limit => 8}) end # @see https://developers.podio.com/doc/items/get-item-count-34819997 - def item_count(app_id) - Podio.connection.get("/item/app/#{app_id}/count/").body + # options are either filters {gender: 1, firstname: "Joe"} or a view {view_id: 123} + def item_count(app_id, options = {}) + Podio.connection.get { |req| + req.url("/item/app/#{app_id}/count", options) + }.body end # @see https://developers.podio.com/doc/items/get-items-as-xlsx-63233 From 6265104f7192a40d0f32a430f445cc243e357f63 Mon Sep 17 00:00:00 2001 From: Pieterjan Muller Date: Sun, 6 Dec 2015 20:21:41 +0100 Subject: [PATCH 2/2] app stream v3 --- lib/podio/models/stream_object.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/podio/models/stream_object.rb b/lib/podio/models/stream_object.rb index 76da9b71..0d0a4de4 100644 --- a/lib/podio/models/stream_object.rb +++ b/lib/podio/models/stream_object.rb @@ -52,6 +52,13 @@ def find_all_by_app_id(app_id, options={}) }.body end + # @see https://developers.podio.com/doc/stream/get-application-stream-v3-100406563 + def find_all_by_app_id_v3(app_id, options={}) + list Podio.connection.get { |req| + req.url("/stream/app/#{app_id}/v3/", options) + }.body + end + # @see https://developers.podio.com/doc/stream/get-user-stream-1289318 def find_all_by_user_id(user_id, options={}) list Podio.connection.get { |req|