from pypodio2 import api
# Authenticate as App
podio_client = api.OAuthAppClient(
client_id=PODIO_CLIENT_ID,
client_secret=PODIO_CLIENT_SECRET,
app_id=PODIO_APP_ID,
app_token=PODIO_APP_TOKEN,
)
# Set limit to 100
items = podio_client.Item.filter(app_id=PODIO_APP_ID, attributes={}, limit=100)
My app has a total of 251 items and I expect that the API would return 100 items but it only returns 20... How to fix this?
print(items['total'])
251
print(items['filtered'])
251
print(len(items['items'])
20
Update
I tried it with the requests library but still no success...
import requests
payload = {
"filters":{},
"limit": 30
}
resp = requests.post(url="https://api.podio.com/item/app/randomappid/filter/",
headers={'authorization': 'OAuth2 randomn0mber'},
data=payload)
len(resp.json()['items'])
20
API call docs: https://developers.podio.com/doc/items/filter-items-4496747
limit
must pass thru the attributes
parameter.
# Set limit to 100
items = podio_client.Item.filter(app_id=PODIO_APP_ID, attributes={"limit": 100})