Skip to content

view_id or filters params in Item.item_count#36

Open
pjmuller wants to merge 2 commits into
podio:masterfrom
pjmuller:extra_item_count_params
Open

view_id or filters params in Item.item_count#36
pjmuller wants to merge 2 commits into
podio:masterfrom
pjmuller:extra_item_count_params

Conversation

@pjmuller

@pjmuller pjmuller commented Dec 6, 2015

Copy link
Copy Markdown
Contributor

See title ;)

@pjmuller

pjmuller commented Dec 6, 2015

Copy link
Copy Markdown
Contributor Author

I also added one extra API call for the app stream

Comment thread lib/podio/models/item.rb
# @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}

Copy link
Copy Markdown
Contributor

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.

@cpeters

cpeters commented Jul 27, 2016

Copy link
Copy Markdown
Contributor

Please split these 2 commits into individual PRs

req.url("/stream/app/#{app_id}/v3/", options)
}.body
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants