Support non-officiel de l'API mobile de SFR/RED. Les identifiants utilisés sont les mêmes que pour se connecter sur le site de l'opérateur.
Kind: global class
- SfrMobile
- new SfrMobile(casauthenticationtoken)
- instance
- .getConso(line) ⇒
Promise.<Consumption> - .getConsoNationale(line) ⇒
Promise.<ConsumptionNationale> - .getFacturationMobile(line, duration) ⇒
Promise.<Facturation> - .downloadFactureMobile(line, numeroFacture, fadet) ⇒
Promise.<Stream> - .getFacturationFixe(line, duration) ⇒
Promise.<FacturationFixe> - .downloadFactureFixe(line, idFact) ⇒
Promise.<Stream> - .getInfosClientFixe(line) ⇒
Promise.<InfosClientFixe> - .getFicheMonCompte() ⇒
Promise.<FicheMonCompte> - .getDashboard(line) ⇒
Promise.<Dashboard> - .getInfosPersonnelles(line) ⇒
Promise.<InfoPersonnelles> - .getNotificationsCount() ⇒
Promise.<NotificationsCount> - .getNotifications() ⇒
Promise.<{notifications: Array.<Notification>}> - .getEquipements(line, universe) ⇒
Promise.<Equipement> - .getOptionDetail(line, universe, environment, option) ⇒
Promise.<OptionDetail> - .getOptionsCatalog(line) ⇒
Promise.<OptionsCatalog> - .getOptionsCatalogDetail(line) ⇒
Promise.<OptionsCatalogDetail> - .getOptions(line, category) ⇒
Promise.<OptionsList> - .getEquipementDetail(line, optionCode, universe) ⇒
Promise.<EquipementDetail> - .getParc(line, universe, environment) ⇒
Promise.<Parc> - .getPaiementTiersAchatsAbonnements(line) ⇒
Promise.<AchatsAbonnements> - .getPaiementTiersOptionsAchat(line) ⇒
Promise.<OptionsAchat> - .postPaiementTiersOptionsAchat(selectedLine, otp, data)
- .getOTPSMS(line) ⇒
Promise.<OTPSMSResponse> - .getOffreAMES(line) ⇒
Promise.<OffreAmes>
- .getConso(line) ⇒
- static
- .login(username, password, duration, universe) ⇒
Promise.<LoginResponse> - .verifyUsername(username, universe) ⇒
Promise.<VerifyUsernameResponse> - .getTerminalInfoIMEI(imei) ⇒
Promise.<InfosTerminalIMEI> - .getTerminalInfo(id, type) ⇒
Promise.<InfosTerminal> - .getTerminauxInfo(ids, type) ⇒
Promise.<Array.<InfosTerminal>>
- .login(username, password, duration, universe) ⇒
| Param | Type | Description |
|---|---|---|
| casauthenticationtoken | string |
Jeton temporaire d'authentification |
Example
const { SfrMobile } = require('sfrmobile-api')
SfrMobile.login(username, password).then(({ token }) => {
const user = new SfrMobile(token)
// Votre code
})Consommation générale de la ligne
Kind: instance method of SfrMobile
| Param | Type | Description |
|---|---|---|
| line | string |
MSISDN de la ligne à sélectionner |
Historique de la consommation sur le territoire national
Kind: instance method of SfrMobile
| Param | Description |
|---|---|
| line | MSISDN de la ligne à sélectionner |
Historique de facturation d'une ligne mobile
Kind: instance method of SfrMobile
| Param | Type | Default | Description |
|---|---|---|---|
| line | string |
MSISDN de la ligne mobile à sélectionner | |
| duration | number |
6 |
Nombre de périodes de facturation (6,12,18,24) |
Télécharger la facture d'une ligne mobile
Kind: instance method of SfrMobile
| Param | Type | Default | Description |
|---|---|---|---|
| line | string |
MSISDN de la ligne mobile à sélectionner | |
| numeroFacture | string |
Identifiant de la facture de la ligne mobile | |
| fadet | boolean |
false |
Facture détaillée |
Historique de facturation d'une ligne fixe
Kind: instance method of SfrMobile
| Param | Type | Default | Description |
|---|---|---|---|
| line | string |
NDI de la ligne fixe | |
| duration | number |
6 |
Nombre de périodes de facturation (6,12,18,24) |
Télécharger la facture d'une ligne fixe
Kind: instance method of SfrMobile
| Param | Type | Description |
|---|---|---|
| line | string |
NDI de la ligne fixe |
| idFact | string |
Identifiant de la facture de la ligne fixe |
Détails de la ligne fixe
Kind: instance method of SfrMobile
| Param | Type | Description |
|---|---|---|
| line | string | undefined |
NDI de la ligne fixe |
Fiche descriptive du compte de l'utilisateur courant
Kind: instance method of SfrMobile
Informations générales de la ligne
Kind: instance method of SfrMobile
| Param | Description |
|---|---|
| line | MSISDN de la ligne à sélectionner |
Informations personnelles concernant la ligne
Kind: instance method of SfrMobile
| Param | Description |
|---|---|
| line | MSISDN de la ligne à sélectionner |
Nombre de notifications de l'utilisateur
Kind: instance method of SfrMobile
Lister les notifications de l'utilisateur
Kind: instance method of SfrMobile
Liste des équipements mis à disposition pour une ligne
Kind: instance method of SfrMobile
| Param | Type | Description |
|---|---|---|
| line | string |
MSISDN de la ligne à sélectionner |
| universe | Universe | string |
SFR/RED |
Détail d'une option souscrite
Kind: instance method of SfrMobile
| Param | Type | Description |
|---|---|---|
| line | string |
MSISDN de la ligne à sélectionner |
| universe | Universe | string |
SFR/RED |
| environment | Environment | string |
Type de ligne |
| option | string |
Identifiant de l'option |
Catalogue des catégories d'options disponibles pour une ligne
Kind: instance method of SfrMobile
| Param | Type | Description |
|---|---|---|
| line | string |
MSISDN de la ligne à sélectionner |
Catalogue détaillé des catégories d'options disponibles pour une ligne
Kind: instance method of SfrMobile
| Param | Type | Description |
|---|---|---|
| line | string |
MSISDN de la ligne à sélectionner |
Lister les options disponibles dans une catégorie
Kind: instance method of SfrMobile
| Param | Type | Description |
|---|---|---|
| line | string |
MSISDN de la ligne à sélectionner |
| category | string |
Catégorie d'option |
Obtenir la description complète de l'équipement
Kind: instance method of SfrMobile
| Param | Type | Description |
|---|---|---|
| line | string |
MSISDN de la ligne à sélectionner |
| optionCode | string |
Identifiant de l'option d'équipement |
| universe | Universe | string |
SFR/RED |
Détails de l'offre d'une ligne
Kind: instance method of SfrMobile
| Param | Type | Description |
|---|---|---|
| line | string |
MSISDN de la ligne à sélectionner |
| universe | Universe | string |
SFR/RED |
| environment | Environment | string |
Type de ligne |
Liste des achats et abonnements (hors forfait) sur la ligne
Kind: instance method of SfrMobile
| Param | Description |
|---|---|
| line | MSISDN de la ligne à sélectionner |
Droits d'achat sur la ligne (Stores, jeux, ...)
Kind: instance method of SfrMobile
| Param | Description |
|---|---|
| line | MSISDN de la ligne à sélectionner |
Mettre à jour les droits d'achat sur la ligne
Kind: instance method of SfrMobile
| Param | Type | Description |
|---|---|---|
| selectedLine | string |
MSISDN de la ligne à sélectionner |
| otp | string |
Code à usage unique obtenu avec getOTPSMS() |
| data | OptionsAchat |
Droits d'achats à permuter |
Obtenir un code à usage unique pour effectuer une opération
Kind: instance method of SfrMobile
| Param | Description |
|---|---|
| line | MSISDN de la ligne à sélectionner |
Informations sur les remises Multi-Pack
Kind: instance method of SfrMobile
| Param | Description |
|---|---|
| line | MSISDN de la ligne à sélectionner |
Obtenir un jeton d'authentification auprès du CAS de SFR
Kind: static method of SfrMobile
| Param | Type | Default | Description |
|---|---|---|---|
| username | string |
Identifiant du compte | |
| password | string |
Mot de passe du compte | |
| duration | number |
86400 |
Durée de validité du jeton demandé en secondes |
| universe | Universe |
SFR/RED |
Tester la validité d'un nom d'utilisateur
Kind: static method of SfrMobile
| Param | Type | Description |
|---|---|---|
| username | string |
Nom d'utilisateur à tester |
| universe | Universe |
SFR/RED |
Description du terminal associé à un IMEI
Kind: static method of SfrMobile
| Param | Type | Description |
|---|---|---|
| imei | string |
Identifiant du terminal mobile |
Description du terminal associé à un identifiant
Kind: static method of SfrMobile
| Param | Type | Description |
|---|---|---|
| id | string |
Identifiant |
| type | 'BACARAT' | 'TAC' |
Type d'identifiant |
Description des terminaux associés à leur identifiant
Kind: static method of SfrMobile
| Param | Type | Description |
|---|---|---|
| ids | Array.<string> |
Identifiants |
| type | 'BACARAT' | 'TAC' |
Type d'identifiant |