From c96ccf198cc8e5354df7860bf0313ce9fe7b3327 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sat, 19 Feb 2022 13:28:29 +0100 Subject: [PATCH] fix(core): update --- readme.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/readme.md b/readme.md index eafe458..ac582a5 100644 --- a/readme.md +++ b/readme.md @@ -27,9 +27,28 @@ Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20W Use TypeScript for best inclass intellisense + ```typescript +// this example assumes toplevel await import * as tink from '@mojoio/tink'; +const tinkAccount = new TinkAccount('clientId', 'clientSecret'); +const tinkUser = await tinkAccount.createTinkUser('YouOwnUniqueUserId'); +const tinkLinkUrl = await tinkUser.getTinkLink(); + +// present the link to your user to connect their bank accounts to the tink platform. + +const tinkProviderConsents = await tinkUser.getProviderConsents(); + +for (const providerConsent of tinkProviderConsents) { + const bankAccounts = await providerConsent.getBankAccounts(); + for (const bankAccount of bankAccounts) { + const transactions = bankAccount.getTransactions(); + } +} + +``` + ## Contribution