Mercurial > hg > bnpparibas
comparison bnpparibas.py @ 16:af2e222f2dad
Adapt to server side changes
author | Daniele Nicolodi <daniele@grinta.net> |
---|---|
date | Thu, 05 May 2016 07:04:38 +0000 |
parents | 0a3509a12762 |
children | 80648a7a119c |
comparison
equal
deleted
inserted
replaced
15:453c9fe6f7f9 | 16:af2e222f2dad |
---|---|
322 url = urljoin(URL, 'bmm-wspl/recupMsg') | 322 url = urljoin(URL, 'bmm-wspl/recupMsg') |
323 r = self.session.get(url, params={'identifiant': mid}) | 323 r = self.session.get(url, params={'identifiant': mid}) |
324 v = self.validate(r) | 324 v = self.validate(r) |
325 return v['data'] | 325 return v['data'] |
326 | 326 |
327 def records(self): | 327 def records0(self): |
328 # required to set some cookies required by the next call | 328 # required to set some cookies required by the next call |
329 url = urljoin(URL, 'fr/connexion/virements-services/releves-en-ligne') | 329 url = urljoin(URL, 'fr/connexion/virements-services/releves-en-ligne') |
330 r = self.session.get(url) | 330 r = self.session.get(url) |
331 self.validate(r) | 331 self.validate(r) |
332 | 332 |
366 v = self.validate(r) | 366 v = self.validate(r) |
367 documents += v['data']['consultationDemat']['listeCompte'][0]['listeDocument'] | 367 documents += v['data']['consultationDemat']['listeCompte'][0]['listeDocument'] |
368 | 368 |
369 return documents | 369 return documents |
370 | 370 |
371 def records(self): | |
372 url = urljoin(URL, 'fr/connexion/mes-outils/dematerialisation') | |
373 r = self.session.get(url) | |
374 self.validate(r) | |
375 | |
376 url = urljoin(URL, 'demat-wspl/rest/listerDocuments') | |
377 r = self.session.get(url) | |
378 v = self.validate(r) | |
379 | |
380 data = r.json()['data'] | |
381 documents = data['listerDocumentDemat']['mapReleves']['Comptes chèques']['listeDocument'] | |
382 return documents | |
383 | |
384 | |
371 def document(self, x): | 385 def document(self, x): |
372 url = urljoin(URL, 'demat-wspl/rest/consultationDocumentDemat') | 386 url = urljoin(URL, 'demat-wspl/rest/consultationDocumentDemat') |
373 params = {'consulted': x['consulted'], | 387 params = {'consulted': x['consulted'], |
374 'familleDoc': x['famDoc'], | 388 'familleDoc': x['famDoc'], |
375 'ibanCrypte': self.iban, | 389 'ibanCrypte': x['ibanCrypte'], |
376 'idDocument': x['idDoc'], | 390 'idDocument': x['idDoc'], |
377 'idLocalisation': 'undefined', | 391 'dateDocument': x['dateDoc'], |
378 'typeCpt': x['typeCompte'], | 392 'typeCpt': x['typeCompte'], |
379 'typeDoc': x['typeDoc'], | 393 'typeDoc': x['typeDoc'], |
380 'viDocDocument': x['viDocDocument'], | 394 'viDocDocument': x['viDocDocument'], |
395 'idLocalisation': x['idLocalisation'], | |
396 'ikpiPersonne': '', | |
381 'typeFamille': 'R001'} | 397 'typeFamille': 'R001'} |
382 r = self.session.get(url, params=params) | 398 r = self.session.get(url, params=params) |
383 self.validate(r) | 399 self.validate(r) |
384 return r.content | 400 return r.content |
385 | 401 |