-
Notifications
You must be signed in to change notification settings - Fork 145
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
api.runWithBudget is not a function #52
Comments
runWithBudget doesn't exist anymore. The API docs are now here: https://github.com/actualbudget/actual/blob/master/docs/API.md Additional hint: you'll need the technical uuid for load-budget. |
Well that explains a lot ! I did realize by looking at the functions that it was missing but this is now clearer What is "technical uuid" ? Also, can you give me an example of init config ? I'm having this for the moment
But it's not working |
Ok, i got it to work. Thanks |
@7aklhz would you mind sharing how you got this running? I'm having issues myself. |
Moved this to documentation to build out some more examples around this as the issue itself isn't actually an issue but rather a call for advice. |
@rich-howell I'm confused as to why this isn't an issue? I ended up here because the documentation website gives out of date instructions, that's an issue with the docs, right? The docs currently tell you to use https://github.com/actualbudget/docs/blob/master/docs/Developers/using-the-API.md This comment #52 (comment) above does not seem to be applicable anymore either: Because https://github.com/actualbudget/actual/blob/master/docs/API.md does not exist. Are there any up to date docs for how to use the API please? |
Here’s the docs from when that comment was posted: https://github.com/actualbudget/actual/blob/HEAD@%7B2022-09-22T12:05:27Z%7D/docs/API.md |
Thanks @j-f1, do you have any idea how to figure out the value to give to This is my first time getting reacquainted with the project since the switch to OSS |
Working on updating the docs, it’s a bit complicated and I think the API package needs some improvements to make things easier. |
The |
@j-f1 that is what I had guessed but it doesn't seem to work... Again this is a fresh installation, I have not done anything custom AFAIK |
Try the Sync ID instead. |
@j-f1 sadly not! Hopefully you or one of the other maintainers wouldn't mind trying to repro with a fresh copy of |
Try again with v5 of the API package and let me know if you still have issues :) |
Thanks so much @j-f1, sorry for the delay. I will set aside some time this weekend to try this out and let you know! |
This should be fixed. Closing |
I'm trying to get the API to work. Here is what I've done
1- I've installed actual-server locally and it's running on port 5006
2- I cd into the folder and installed the api using yarn add @actual-app/api
3- I created a test.js file in the actual-server folder and copy paste the following code
let api = require('@actual-app/api'); async function run() { let budget = await api.getBudgetMonth('2019-10'); console.log(budget); } api.runWithBudget('My-Budget', run);
4- I updated "My-Budget" with my id
5- I run using node test.js and get the following error
TypeError: api.runWithBudget is not a function
Can you please advise ?
The text was updated successfully, but these errors were encountered: