0.0.2 • Published 6 years ago

node-bank v0.0.2

Weekly downloads
9
License
-
Repository
-
Last release
6 years ago

Install

npm install node-bank

Methods

  • nodebank.start: start the library
  • nodebank.login(cpf, password): login into nubank API

Functions

  • 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.info: return all info of a bill
    • nodebank.bills.barcode: return an object with number of "boleto"s bill
    • nodebank.bills.emailBill: comming soon

Examples

First of all

nodebank.start

await nubank.start()

nodebank.login(cpf, password)

await nubank.login({ cpf: '__cpf', pass: '__password' }) 

Events

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 })

Bills

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 })

Credits

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  ·