I made a project to update some Notion tables automatically.
By runing this code:
# Get page(s) from given instance
def PegarPaginas(index_instancia: int, n_paginas: int = 1):
url = f"https://api.notion.com/v1/databases/`My-page-ID`/query"
payload = {"page_size": n_paginas}
response = requests.post(url, headers=headers, json=payload)
dados = response.json()
results = dados["results"]
return results
pagina_acumulos = PegarPaginas(0)[0]
n=0
for r in pagina_acumulos["properties"]["studies"]["relation"]:
n+=1
print(r)
print(n)
This returns 25 rollups, output:
[...]
{'id': '`my 24th ID`'}
24
{'id': '`my 25th ID`'}
25
But it should return 28 for that table :
And it seems that no matter how many items there are more than 25, it only loads 25.
By changing:
"studies"
to
"sports"
corresponding to that other table
I get this output:
{'id': '`my24th ID`'}
24
{'id': '`my 25th ID`'}
25
Why might it be? Is there a way to load all of the linked pages on a rollup inside a table properly?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4