actualbudget / actual

A local-first personal finance app
https://actualbudget.org
MIT License
12.51k stars 954 forks source link

API: add getLocalBudgets() and getRemoteBudgets() methods to list all budgets in the local cache or remote server. #2928

Open psybers opened 1 week ago

psybers commented 1 week ago

Fixes #2901.

netlify[bot] commented 1 week ago

Deploy Preview for actualbudget ready!

Name Link
Latest commit 65f481b105f65c6d82f1fcb443ad1c0f37cd49d2
Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/667fb4cfb37a340008f725e4
Deploy Preview https://deploy-preview-2928.demo.actualbudget.org
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

github-actions[bot] commented 1 week ago

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
9 4.77 MB 0%

Changeset

No files were changed

View detailed bundle breakdown
**Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/resize-observer.js | 18.37 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.5 kB | 0% static/js/BackgroundImage.js | 122.29 kB | 0% static/js/narrow.js | 75.96 kB | 0% static/js/usePreviewTransactions.js | 790 B | 0% static/js/AppliedFilters.js | 27.22 kB | 0% static/js/wide.js | 272.68 kB | 0% static/js/ReportRouter.js | 1.23 MB | 0% static/js/index.js | 3.02 MB | 0%
github-actions[bot] commented 1 week ago

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.13 MB → 1.13 MB (+361 B) +0.03%
Changeset File | Δ | Size ---- | - | ---- `packages/loot-core/src/server/api-models.ts` | 📈 +512 B (+24.16%) | 2.07 kB → 2.57 kB `packages/api/methods.ts` | 📈 +816 B (+6.04%) | 13.19 kB → 13.99 kB `packages/loot-core/src/server/api.ts` | 📈 +362 B (+1.90%) | 18.56 kB → 18.91 kB
View detailed bundle breakdown
**Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.js | 1.13 MB → 1.13 MB (+361 B) | +0.03% **Smaller** No assets were smaller **Unchanged** No assets were unchanged
youngcw commented 1 week ago

iirc, the endpoint that the OP ended up wanting was list-remote-files or something like that. That would be more useful than to list the local files. Could that one be added too?

psybers commented 3 days ago

I'm not sure how to unit test the getRemoteBudgets() function since it needs to hit a server, but I did test it locally with a script and it seemed to work.

psybers commented 3 days ago

Docs are here: https://github.com/actualbudget/docs/pull/377