This repository has been archived by the owner on Jul 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
53 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ env: | |
global: | ||
# GH_TOKEN | ||
- secure: "P0ksGaQg9x2OA2+Ue7M8DRMNBS1RrMK4pi5vV4HeGlTDNoZvWhMbmb5RwtykXBR12H8BTzrnsxA5BfMzzVh+F/88eoSL5WJV7n/Ea39xxiATA2edBjbpCFSsAHI8JQWTT0uo2dD5XeLWAx2ZTELRX2PVr6dn7yeJ2PlF39HXXqzi7QeZ+FlHX5dHckrx+9MX9/+qBKzLZegeQHUDgYs7SxFDJ+IshYVY6SMF+fvy7JIVIcQhAZzlyYADaraHmluGuFuNVmfRDOVaDSJX+WQoGfo7UrQawY4hDZRZzXcIBXJSczJJ+JPBXuDDUKznvVifsHR96dxQrOUdyRF3zjRSW3CxFm58loTecsekV1s0f88K0tYfjjreUh5qoPWI2bue5Mqk8AC7hkkWRvOQX9XRrlfzqz5wEWTYIzU44Nv4NzkuBjtgQUMnA7WuMiwjngjGLwHVJfw7TuliYca089xtX6ZocUUXwB834vh2sLIIn/dPLYovOEsWkgav8uzHpizSZwap/gpchbUnIrUeahFjyfr1g5xbzyqkodCe5UhSGjI7OcPbS4WH8/pE7z4Vuz2ZMYcKsdCfyeorzaZ24ERGXQEVA+gA9rWtUM9gyPqdkq2btq75Xxy2lP7HsyA6D637q9Qmn86jgNItVSaFjTaS9AobzaDC8bMDvDV7N6rHLuQ=" | ||
- GIT_DEPLOY_REPO=https://[email protected]/PierrickP/number26.git | ||
- GIT_DEPLOY_REPO=https://[email protected]/PierrickP/n26.git | ||
|
||
before_install: | ||
- export TZ=Europe/Berlin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
# Number26 :credit_card: | ||
# N26 :credit_card: | ||
|
||
[![npm](https://img.shields.io/npm/v/number26.svg?maxAge=2592000?style=plastic)](https://www.npmjs.com/package/number26) [![Travis branch](https://img.shields.io/travis/PierrickP/number26/master.svg?maxAge=2592000)](https://travis-ci.org/PierrickP/number26) [![Coveralls](https://img.shields.io/coveralls/jekyll/jekyll.svg?maxAge=2592000)](https://coveralls.io/github/PierrickP/number26) [![bitHound](https://img.shields.io/bithound/dependencies/github/PierrickP/number26.svg?maxAge=2592000)](https://www.bithound.io/github/PierrickP/number26) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/PierrickP/number26/develop/LICENSE.md) | ||
:warning: [number26 was renamed to *n26*](https://n26.com/number26-is-n26/) | ||
|
||
Un-official node.js module for interact with your number26 account | ||
[![npm](https://img.shields.io/npm/v/n26.svg?maxAge=2592000?style=plastic)](https://www.npmjs.com/package/n26) [![Travis branch](https://img.shields.io/travis/PierrickP/n26/master.svg?maxAge=2592000)](https://travis-ci.org/PierrickP/n26) [![Coveralls](https://img.shields.io/coveralls/jekyll/jekyll.svg?maxAge=2592000)](https://coveralls.io/github/PierrickP/n26) [![bitHound](https://img.shields.io/bithound/dependencies/github/PierrickP/n26.svg?maxAge=2592000)](https://www.bithound.io/github/PierrickP/n26) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/PierrickP/n26/develop/LICENSE.md) | ||
|
||
Open a free [Number26 account here :gift:](https://my.number26.de/?uc=MZMEF) | ||
Un-official node.js module for interact with your n26 (previously number26) account | ||
|
||
[![NPM](https://nodei.co/npm/number26.png)](https://nodei.co/npm/number26/) | ||
Open a free [N26 account here :gift:](https://my.number26.de/?uc=MZMEF) | ||
|
||
[Api docs](http://pierrickpaul.fr/number26/) | ||
[![NPM](https://nodei.co/npm/n26.png)](https://nodei.co/npm/n26/) | ||
|
||
## What's Number26 ? | ||
[Api docs](http://pierrickpaul.fr/n26/) | ||
|
||
> NUMBER26 is Europe's first bank account developed entirely for smartphones. With your NUMBER26 bank account, MasterCard® and mobile app, you can conveniently transfer money from anywhere and keep track of your finances at all times. With MoneyBeam you're able to send money via sms or e-mail without the need to enter all the account details. | ||
## What's N26 ? | ||
|
||
> N26 is Europe's first bank account developed entirely for smartphones. With your N26 bank account, MasterCard® and mobile app, you can conveniently transfer money from anywhere and keep track of your finances at all times. With MoneyBeam you're able to send money via sms or e-mail without the need to enter all the account details. | ||
> | ||
> There are no costs or fees, which means you can withdraw money at any ATM worldwide, free of charge. No ATM around you? Just use CASH26 to withdraw and deposit cash at your supermarket. | ||
[Open a free account here :gift:](https://my.number26.de/?uc=MZMEF) | ||
|
||
## This module | ||
|
||
Number26 has some un-official apis. | ||
n26 has some un-official apis. | ||
This module provide you clean functions to interact with your account. | ||
|
||
Not all endpoints are available yet. | ||
|
@@ -37,7 +39,7 @@ Not all endpoints are available yet. | |
|
||
### Dependencies | ||
|
||
number26 depends on: | ||
n26 depends on: | ||
|
||
+ [bluebird](https://www.npmjs.com/package/bluebird): Bluebird is a full featured promise library with unmatched performance. | ||
+ [moment](https://www.npmjs.com/package/moment): A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates. | ||
|
@@ -47,14 +49,14 @@ number26 depends on: | |
|
||
#### How to install | ||
|
||
`npm i number26 --save` | ||
`npm i n26 --save` | ||
|
||
#### Exemple | ||
|
||
```JavaScript | ||
const Number26 = require('number26'); | ||
const N26 = require('n26'); | ||
|
||
const myAccount = new Number26('[email protected]', 'password') | ||
const myAccount = new N26('[email protected]', 'password') | ||
.then((account) => account.transactions({text: 'Lafayette'}) | ||
.then((transactions) => { | ||
/* | ||
|
@@ -90,7 +92,7 @@ const myAccount = new Number26('[email protected]', 'password') | |
|
||
#### API | ||
|
||
[Api docs](http://pierrickpaul.fr/number26/) | ||
[Api docs](http://pierrickpaul.fr/n26/) | ||
|
||
### Testing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = require('./lib/number26'); | ||
module.exports = require('./lib/n26'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -268,7 +268,7 @@ const utils = require('./utils'); | |
*/ | ||
|
||
/** | ||
* Number26 Account | ||
* N26 Account | ||
*/ | ||
class Account { | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const nock = require('nock'); | ||
|
||
const Number26 = require('../../index'); | ||
const N26 = require('../../index'); | ||
|
||
const data = require('./data'); | ||
|
||
|
@@ -15,5 +15,5 @@ module.exports = (cb) => { | |
}) | ||
.reply(200, data.account); | ||
|
||
return new Number26('[email protected]', 'password').asCallback(cb); | ||
return new N26('[email protected]', 'password').asCallback(cb); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ const chai = require('chai'); | |
const dirtyChai = require('dirty-chai'); | ||
const expect = chai.expect; | ||
|
||
const Number26 = require('../index'); | ||
const N26 = require('../index'); | ||
|
||
chai.use(dirtyChai); | ||
|
||
|
@@ -27,14 +27,14 @@ describe('Create instance', () => { | |
}); | ||
|
||
it('should pass identifiants to oauth endpoint', () => { | ||
return new Number26('[email protected]', 'password') | ||
return new N26('[email protected]', 'password') | ||
.catch((err) => { | ||
expect(err).to.be.null(); | ||
}); | ||
}); | ||
|
||
it('should create a new instance', () => { | ||
return new Number26('[email protected]', 'password') | ||
return new N26('[email protected]', 'password') | ||
.then((m) => { | ||
expect(m.logged).to.be.true(); | ||
expect(m.email).to.be.eql('[email protected]'); | ||
|
@@ -63,8 +63,8 @@ describe('Create instance', () => { | |
.reply(200, data.account); | ||
|
||
return Promise.all([ | ||
new Number26('[email protected]', 'password'), | ||
new Number26('[email protected]', 'password') | ||
new N26('[email protected]', 'password'), | ||
new N26('[email protected]', 'password') | ||
]) | ||
.then((instance1, instance2) => { | ||
expect(instance1).to.not.be.equal(instance2); | ||
|
@@ -88,7 +88,7 @@ describe('Create instance', () => { | |
}) | ||
.reply(400, {error: 'invalid_grant', error_description: 'Bad credentials'}); | ||
|
||
return new Number26('[email protected]', 'password') | ||
return new N26('[email protected]', 'password') | ||
.catch((err) => { | ||
expect(err).to.be.eql({error: 'invalid_grant', error_description: 'Bad credentials'}); | ||
}); | ||
|
@@ -105,7 +105,7 @@ describe('Create instance', () => { | |
}) | ||
.reply(500, ''); | ||
|
||
return new Number26('[email protected]', 'password') | ||
return new N26('[email protected]', 'password') | ||
.catch((err) => { | ||
expect(err).to.be.equal(500); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters