PJUllrich / Complete-Bunq-API-Python-Wrapper

Complete Python API Wrapper for Bunq API
MIT License
9 stars 2 forks source link

Change AiClient required argument #12

Closed OGKevin closed 7 years ago

OGKevin commented 7 years ago

Atm it is required to add an API key when creating an Apiclient instance. This will prevent users form making an installation with the bunq api without and api key. I would suggest to change the required argument from api_key to privkey. Ive changed your code to this and tested it. Installation seems to work fine now.

__variables = ['installation_id', 'installation_token', 'api_key',
                   'server_token', 'server_pubkey', 'session_token']

    def __init__(self, privkey, use_sandbox=True, **kwargs):
        self.privkey = privkey

instead of

    __variables = ['installation_id', 'installation_token', 'privkey',
                   'server_token', 'server_pubkey', 'session_token']

    def __init__(self, api_key, use_sandbox=True, **kwargs):
        self.api_key = api_key
PJUllrich commented 7 years ago

Thanks for the input! I will put it on my wishlist and update you as soon as it is implemented :)