dalemyers / libmonzo

A Python library for interacting with Monzo bank accounts
MIT License
6 stars 0 forks source link

Issue with pots #3

Closed muzs1 closed 1 year ago

muzs1 commented 3 years ago

Hi, before I start I would just like to say I have very limited programming knowledge but I would like to use this for a small project. I have done some testing with this but run into some issues. The first one is that the pots part doesn’t work below is the current code.

def pots(self) -> List[Pot]: """Return the list of pots the user has.""" self.log.debug("Requesting pots.") response = self.get('pots') return Pot.from_json(response.json())

Here is what I change to make it work

def pots(self, *, account_id: str) -> List[Pot]: """Return the list of pots the user has.""" self.log.debug("Requesting pots.") response = self.get(f'pots?current_account_id={account_id}') return Pot.from_json(response.json())

It looks like Monzo now require an account_id to list the pots.

For the project I would like to do, I need to use the API as “Confidential” so I am issues a "refresh_token", I have worked out how to get the refresh token added to the “client” but have no idea how to go about refreshing the access.

dalemyers commented 3 years ago

This library was only ever really used for a small personal project, so it's really out of date now.

I'm happy to accept any PRs though (but won't really be able to test).

muzs1 commented 3 years ago

Okay don't worry, thanks for the reply. I will see if I can pick out the bits I need and make it do what I need.