https://github.com/jzarca01/node-shine
Une API pour la banque en ligne Shine
https://github.com/jzarca01/node-shine
api graphql nodejs shine
Last synced: about 1 month ago
JSON representation
Une API pour la banque en ligne Shine
- Host: GitHub
- URL: https://github.com/jzarca01/node-shine
- Owner: jzarca01
- Created: 2019-01-06T14:12:53.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-06T14:55:40.000Z (over 7 years ago)
- Last Synced: 2025-03-08T12:53:24.056Z (over 1 year ago)
- Topics: api, graphql, nodejs, shine
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-shine
Une API pour la banque en ligne [Shine](https://www.shine.fr/)
## Usage
```javascript
const Shine = require('node-shine');
const shine = new Shine();
```
## 2 Factor-Authentication
A chaque authentification, Shine regarde si l'utilisateur se connecte depuis le même device qu'à la dernière connexion.
```javascript
this.device = {
uuid: 'DEVICE_UUID',
model: 'DEVICE_MODEL',
name: 'DEVICE_NAME'
};
```
Si tel est le cas, alors la méthode `shine.startAuth()` renverra un access_token, sinon Shine enverra un SMS à l'utilisateur avec un code pour s'authentifier grâce à la méthode `shine.authNewDevice()`
## Comment éviter le 2-FA
Lors de l'instanciation de la classe Shine, on peut spécifier les propriétés suivantes :
```javascript
const shine = new Shine({
uuid: 'PREVIOUS_UUID',
name: 'PREVIOUS_NAME',
model: 'PREVIOUS_MODEL'
});
```
## Example
Voir l'[example](example/index.js)
## Méthodes
### Get Profile
```javascript
const profile = shine.getProfile();
```
### Get Company Profile
```javascript
const companyProfile = shine.getCompanyProfile();
```
### Search company
```javascript
const results = shine.searchCompany(searchTerm);
```