A Nubank API in NodeJS
Nubank has change the auth flow, now you need to validate a QRCode to have access in all API routes. I'm working on a new version that has QRCode validation, so this actually version doesn't work anymore.
npm install node-bank
- nodebank.start: start the library
- nodebank.login(cpf, password): login into nubank API
- Events
- nodebank.events.findAll: return an array of your payments, transactions, etc...
- nodebank.events.findByDate: return an event array by date
- nodebank.events.findByName: return an event array by category name
- nodebank.events.filter: return an array of your query
- Bills
- nodebank.bills.all: return and array of your invoices
- nodebank.bills.findByDate: return an bill by due date
- nodebank.bills.filter: return an array of your query
- nodebank.bills.info: return all info of a bill
- nodebank.bills.barcode: return an object with number of "boleto"s bill
- nodebank.bills.emailBill: comming soon
nodebank.start
await nubank.start()
nodebank.login(cpf, password)
await nubank.login({ cpf: '__cpf', pass: '__password' })
nodebank.events.findAll
await nubank.start()
await nubank.login({ cpf: '__cpf', pass: '__password' })
let arr = await nubank.events.findAll()
nodebank.events.findByName
await nubank.start()
await nubank.login({ cpf: '__cpf', pass: '__password' })
let arr = await nubank.events.findByName({ name: 'Github.com', events: arr.events })
nodebank.events.findByDate
await nubank.start()
await nubank.login({ cpf: '__cpf', pass: '__password' })
let arr = await nubank.events.findByDate({ date: '2018-10-10', events: arr.events })
nodebank.events.filter
await nubank.start()
await nubank.login({ cpf: '__cpf', pass: '__password' })
let subcategories = nubank.events.categories.subcategories
let arr = await nubank.events.filter({ query: [ 'details.subcategory', subcategories.card_not_present ], events: arr.events })
nodebank.bills.all
await nubank.start()
await nubank.login({ cpf: '__cpf', pass: '__password' })
let bills = await nubank.bills.all()
nodebank.bills.findByDate
await nubank.start()
await nubank.login({ cpf: '__cpf', pass: '__password' })
let arrBills = await nubank.bills.all()
let [bill] = await nubank.bills.findByDate({ date: '2018-11-11', bills: arrBills.bills })
nodebank.bills.info
await nubank.start()
await nubank.login({ cpf: '__cpf', pass: '__password' })
let arrBills = await nubank.bills.all()
let [bill] = await nubank.bills.findByDate({ date: '2018-11-11', bills: arrBills.bills })
let info = await nubank.bills.info({ bill })
nodebank.bills.barcode
await nubank.start()
await nubank.login({ cpf: '__cpf', pass: '__password' })
let arrBills = await nubank.bills.all()
let [bill] = await nubank.bills.findByDate({ date: '2018-11-11', bills: arrBills.bills })
let info = await nubank.bills.info({ bill })
let barcode = await nubank.bills.barcode({ info: info.bill })
This software uses some open source packages.
Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub
GitHub @nulldreams Β Β·Β