-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
view_id or filters params in Item.item_count #36
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks good except please follow the pattern of the other methods for consistency. Assign the response to a |
||
end | ||
|
||
# @see https://developers.podio.com/doc/items/get-items-as-xlsx-63233 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
# @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| | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding option specifics in the code is discouraged. These may be the options now, but not guaranteed in the future. The API docs should be the source of reference.