Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lekesoldat/sbanken-node
🏦 A package for communicating with the S´banken API.
https://github.com/lekesoldat/sbanken-node
banking nodejs sbanken-api
Last synced: about 5 hours ago
JSON representation
🏦 A package for communicating with the S´banken API.
- Host: GitHub
- URL: https://github.com/lekesoldat/sbanken-node
- Owner: Lekesoldat
- License: mit
- Created: 2019-11-30T22:44:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-14T10:46:14.000Z (about 1 year ago)
- Last Synced: 2023-09-15T01:48:53.384Z (about 1 year ago)
- Topics: banking, nodejs, sbanken-api
- Language: JavaScript
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🏦 S'banken-node
A package for communicating with the S´banken API.
## Setup
Make sure to create a `.env` file at the root of the cloned repository. It should have the following fields:
USER_ID=
CLIENT_ID=
SECRET=## Running the project
```zsh
$ yarn install # Install dependencies
$ yarn start # Run index.mjs
```## Usage
Code found in `index.mjs` aswell.
```javascript
// Import as early as possible.
import dotenv from 'dotenv';
dotenv.config();// Import desired functions
import {
getAccountDetails,
getAccountNumberDetails,
getAccountTransactions
} from './Api.mjs';const main = async () => {
try {
const details = await getAccountDetails();
console.log('Retrieved details:\n', details);const numberDetails = await getAccountNumberDetails('YourAccountId');
console.log('Retrieved number details:\n', numberDetails);const transactions = await getAccountTransactions('YourAccountId');
console.log('Retrieved transactions:\n', transactions);
} catch (error) {
console.log(error);
}
};main();
```