New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nubank

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nubank

NuBank API

latest
Source
npmnpm
Version
1.1.3
Version published
Maintainers
1
Created
Source

NuBank API

Not related to NuBank Inc.

Install

yarn add nubank
# or
npm i --save nubank

Usage

First of all you need to sign in to your account using your credentials:

import createNuBank from 'nubank'
const NuBank = createNuBank()

NuBank.getLoginToken({
  password: 'i_luv_c4ts',
  login: 'YOUR_CPF', // no dashes nor dots!
}).then(response => console.log(`I'm in!`)) // just need to call this once

// After signing you can now fetch your whole feed
// since the very beginning of your relationship with NuBank <3

NuBank
  .getWholeFeed()
  .then(history => {
    // ... doing some neat personal analysis ...
    // ... jeez, too much money spent on candies and coffee ...

    // history is something like:
    [
     { description: 'Netflix Com',
       category: 'transaction',
       amount: 2290,
       time: '2016-09-06T09:22:00Z',
       title: 'serviços',
       details: [Object],
       id: '57ce8ab9-016d-4060-907d-4e5f4306483f',
       _links: [Object],
       href: 'nuapp://transaction/57ce8ab9-016d-4060-907d-4e5f4306483f'
     }, ...]
  })

API

Nubank.getCustomer

Gets your customer related information You must have called getLoginToken first.

NuBank.getCustomer().then(customer => console.log(customer))
// The customer object contains your name, address, devices
// reported income, etc.

NuBank.getCustomerAccount

Gets your credit card account information. You must have called getLoginToken first.

NuBank.getCustomerAccount().then(account => console.log(account))
// The account object contains your credit limit, current balance,
// interest rate, bill's due day, net related info, etc.

Thanks

For NuBank for having such a great API!

Notes

This API IS NOT a official API from NuBank Inc. but it does use the same REST api that their web app uses.

Keywords

nubank

FAQs

Package last updated on 21 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts