Skip to content
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

Download entire JSON #372

Open
istu233 opened this issue Jan 8, 2024 · 1 comment
Open

Download entire JSON #372

istu233 opened this issue Jan 8, 2024 · 1 comment

Comments

@istu233
Copy link

istu233 commented Jan 8, 2024

I would like to use this module to dump the whole json of a board, for which I have a parser. Right now I do it every week manually, and this would definitely speed the process up, but I'm unsure about how to do it.
Any help would be appreciated.

@ribetm
Copy link

ribetm commented Mar 19, 2024

You can use TrelloClient.fetch_json

ORG_ID = "..."
client = TrelloClient(...)
# decoded JSON (python dict but no class)
board = client.fetch_json(f"/organizations/{ORG_ID}/boards")
# actual JSON in a string
raw_board = json.dumps(board)

This returns the result of requests.Response.json so you don't actually get JSON but the pythonic representation of it.

Either your parser can work with that or you should pass it to json.dumps.

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

No branches or pull requests

2 participants