Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
161 views
in Technique[技术] by (71.8m points)

javascript - how to use getSavingsGoals for Starling bank

I am trying to set up a automated 1p savings challenge on my Starling Bank Account.

I have found some example code and got the starling-api-web-starter-kit up and running.

the example code I have uses a function to move the money into a savings goal, but to do that you need to first get the savings goal UID, which I should be able to get using the SavingsGoal (https://starlingbank.github.io/starling-developer-sdk/docs/1.0.0/SavingsGoal.html#getSavingsGoals)

as I am new to javascript I have no idea how to call the functions and retrieve the UID for a savings goal. I tried this but it fails:

 const savingsGoalsResponse = await client.savingsGoal.getSavingsGoals({ accessToken });
 savingsGoalsResponse.forEach(function(goalUid) {
   console.log("goalUid=", goalUid);
 });

any help would be appreciated.

question from:https://stackoverflow.com/questions/65842030/how-to-use-getsavingsgoals-for-starling-bank

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...