{"id":17975113,"url":"https://github.com/robbertkl/bunq-session","last_synced_at":"2025-04-03T23:44:00.098Z","repository":{"id":35062058,"uuid":"202228281","full_name":"robbertkl/bunq-session","owner":"robbertkl","description":"Basic bunq API client","archived":false,"fork":false,"pushed_at":"2023-12-10T09:22:51.000Z","size":192,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T01:55:43.110Z","etag":null,"topics":["bunq","bunq-api"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robbertkl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-13T21:46:03.000Z","updated_at":"2023-01-13T10:23:08.000Z","dependencies_parsed_at":"2023-10-11T04:51:11.254Z","dependency_job_id":"d5292e62-11fe-4151-b0e2-a6b1c6bcfa03","html_url":"https://github.com/robbertkl/bunq-session","commit_stats":{"total_commits":215,"total_committers":3,"mean_commits":71.66666666666667,"dds":"0.16279069767441856","last_synced_commit":"f0c6276e4e7e6de519a8b9ae9dba859cda37b24f"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbertkl%2Fbunq-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbertkl%2Fbunq-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbertkl%2Fbunq-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbertkl%2Fbunq-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robbertkl","download_url":"https://codeload.github.com/robbertkl/bunq-session/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247097973,"owners_count":20883127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bunq","bunq-api"],"created_at":"2024-10-29T17:18:15.339Z","updated_at":"2025-04-03T23:44:00.075Z","avatar_url":"https://github.com/robbertkl.png","language":"JavaScript","readme":"# bunq-session\n\n[![npm version](https://badge.fury.io/js/bunq-session.svg)](https://www.npmjs.com/package/bunq-session)\n\nBasic bunq API client. Uses [bunq-http](https://github.com/robbertkl/bunq-http) and extends it with:\n\n- automatic session management (initial key generation, device installation, login, auto reauthenticate after expiry)\n- preconfigured production and sandbox hosts, including matching rate limit throttling\n- installation/session persistence (provides a `FileStore` and `MemoryStore`, but you can always plug in your own)\n- promise-based (async) functions for managed calls to the API\n- async iterator for paginated resource walking\n\nThe async iterator allows you to use `for await...of` to loop over all (paginated) resources, automatically fetching new pages as you go. See the usage example below.\n\nPlease note this is not a full SDK; aside from the \"login calls\" (`installation`, `device-server`, `session-server`) the library does not know about any API endpoints or responses. In many cases, however, this is perfectly fine as you can just send/receive JSON following the documentation.\n\n## Installation\n\n```sh\nnpm install --save bunq-session\n```\n\n## Usage example\n\n```JavaScript\nimport { BunqSession, FileStore } from 'bunq-session';\n\nconst bunq = new BunqSession('___my_bunq_sandbox_api_key___', {\n  sandbox: true,\n  store: new FileStore('./state.json'),\n});\n\n(async () =\u003e {\n  try {\n    const userId = await bunq.getUserId();\n    for await (const account of bunq.list(`user/${userId}/monetary-account`)) {\n      if (account.status !== 'ACTIVE') continue;\n      console.log(`${account.description}: ${account.balance.currency} ${account.balance.value}`);\n    }\n  } catch (err) {\n    console.error(`ERROR: ${err.message}`);\n  }\n})();\n```\n\n## Authors\n\n- Robbert Klarenbeek, \u003crobbertkl@renbeek.nl\u003e\n\n## License\n\nThis repo is published under the [MIT License](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbertkl%2Fbunq-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobbertkl%2Fbunq-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbertkl%2Fbunq-session/lists"}