Git Product home page Git Product logo

comdirect-node-rest-client's Introduction

Comdirect REST API Client Lib for Node/Typescript

This is an unofficial node.js module for the comdirect REST API

Important: This is not very much tested

Feel free to clone this and make it a real library, as this is a quick and dirty solution. I won't work on this very much.

Other libs:

NOTE:

This module works only with the photoTAN method!

Use it at your own risk!
If you enter a wrong TAN 3 times your account will be blocked (to unlock you need to do a phone call).

You can reset the error counter by enter a valid TAN via the official website by retrieving your inbox (PostBox).

Quickstart

  1. Set environment with needed credentials:
cp .env.example .env

Edit .env

  1. Run the example script
nx run comdirect-rest-examples:start

Usage

Have a look into the example main.ts.

The env vars are used in OpenAPI.ts to setup the lib config.

Token updates

Keep in mind that the lib currently doesn't handle token updates automatically!

Currently, I use the lib in scripts, which are finished before a token update is needed. The downside is, with every run the confirmation with photoTAN is needed.

In an application that could be handled of course by regularly update the token. With scripts the token could be stored on disk to reuse it, which I wouldn't do for security reasons.

Development

The lib code is auto-generated by @hey-api/openapi-ts with comdirect_rest_api_swagger.json:

npx @hey-api/openapi-ts -i comdirect_rest_api_swagger.json -o lib

The generated code was a bit modified and adapted to the real world. Only small parts are tested.

Nx

This workspace has been generated by Nx, Smart Monorepos · Fast CI.

Integrate with editors

Enhance your Nx experience by installing Nx Console for your favorite editor. Nx Console provides an interactive UI to view your projects, run tasks, generate code, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users.

Nx plugins and code generators

Add Nx plugins to leverage their code generators and automated, inferred tasks.

# Add plugin
npx nx add @nx/react

# Use code generator
npx nx generate @nx/react:app demo

# Run development server
npx nx serve demo

# View project details
npx nx show project demo --web

Run npx nx list to get a list of available plugins and whether they have generators. Then run npx nx list <plugin-name> to see what generators are available.

Learn more about code generators and inferred tasks in the docs.

Running tasks

To execute tasks with Nx use the following syntax:

npx nx <target> <project> <...options>

You can also run multiple targets:

npx nx run-many -t <target1> <target2>

..or add -p to filter specific projects

npx nx run-many -t <target1> <target2> -p <proj1> <proj2>

Targets can be defined in the package.json or projects.json. Learn more in the docs.

comdirect-node-rest-client's People

Contributors

colorcube avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.