Get recipient list (only work with one account)

This commit is contained in:
Florent 2012-09-24 14:44:47 +02:00 committed by Romain Bignon
commit 06392b4a6f
3 changed files with 21 additions and 5 deletions

View file

@ -21,7 +21,7 @@
# python2.5 compatibility
from __future__ import with_statement
from weboob.capabilities.bank import ICapBank, AccountNotFound
from weboob.capabilities.bank import ICapBank, AccountNotFound, Account
from weboob.tools.backend import BaseBackend, BackendConfig
from weboob.tools.value import ValueBackendPassword
@ -72,3 +72,10 @@ class INGBackend(BaseBackend, ICapBank):
with self.browser:
for history in self.browser.get_history(account.id):
yield history
def iter_transfer_recipients(self, account):
with self.browser:
if not isinstance(account, Account):
account = self.get_account(account)
for recipient in self.browser.get_recipients(account):
yield recipient