Skip to content

Commit

Permalink
Correct POST url
Browse files Browse the repository at this point in the history
Just 'searchTrashPages', doesn't do it. The correct URL is '/api/v3/searchTrashPages'.
  • Loading branch information
guidoknoop authored May 25, 2020
1 parent ddc04d9 commit d1dbccc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notion-clear-trash.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def get_trash(client):
'limit': 1000,
'spaceId': client.current_space.id
}
results = client.post('searchTrashPages', query)
results = client.post('/api/v3/searchTrashPages', query)
block_ids = results.json()['results']

return block_ids
Expand All @@ -25,4 +25,4 @@ def delete_permanently(client, block_ids):
block_ids = get_trash(client)
delete_permanently(client, block_ids)

print('Successfully cleared all trash blocks.')
print('Successfully cleared all trash blocks.')

0 comments on commit d1dbccc

Please sign in to comment.