SfrMobile
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) ⇒
new SfrMobile(casauthenticationtoken)
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
})
Promise.<Consumption>
sfrMobile.getConso(line) ⇒ Consommation générale de la ligne
Kind: instance method of SfrMobile
Param | Type | Description |
---|---|---|
line | string |
MSISDN de la ligne à sélectionner |
Promise.<ConsumptionNationale>
sfrMobile.getConsoNationale(line) ⇒ Historique de la consommation sur le territoire national
Kind: instance method of SfrMobile
Param | Description |
---|---|
line | MSISDN de la ligne à sélectionner |
Promise.<Facturation>
sfrMobile.getFacturationMobile(line, duration) ⇒ 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) |
Promise.<Stream>
sfrMobile.downloadFactureMobile(line, numeroFacture, fadet) ⇒ 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 |
Promise.<FacturationFixe>
sfrMobile.getFacturationFixe(line, duration) ⇒ 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) |
Promise.<Stream>
sfrMobile.downloadFactureFixe(line, idFact) ⇒ 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 |
Promise.<InfosClientFixe>
sfrMobile.getInfosClientFixe(line) ⇒ Détails de la ligne fixe
Kind: instance method of SfrMobile
Param | Type | Description |
---|---|---|
line |
string | undefined
|
NDI de la ligne fixe |
Promise.<FicheMonCompte>
sfrMobile.getFicheMonCompte() ⇒ Fiche descriptive du compte de l'utilisateur courant
Kind: instance method of SfrMobile
Promise.<Dashboard>
sfrMobile.getDashboard(line) ⇒ Informations générales de la ligne
Kind: instance method of SfrMobile
Param | Description |
---|---|
line | MSISDN de la ligne à sélectionner |
Promise.<InfoPersonnelles>
sfrMobile.getInfosPersonnelles(line) ⇒ Informations personnelles concernant la ligne
Kind: instance method of SfrMobile
Param | Description |
---|---|
line | MSISDN de la ligne à sélectionner |
Promise.<NotificationsCount>
sfrMobile.getNotificationsCount() ⇒ Nombre de notifications de l'utilisateur
Kind: instance method of SfrMobile
Promise.<{notifications: Array.<Notification>}>
sfrMobile.getNotifications() ⇒ Lister les notifications de l'utilisateur
Kind: instance method of SfrMobile
Promise.<Equipement>
sfrMobile.getEquipements(line, universe) ⇒ 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 |
Promise.<OptionDetail>
sfrMobile.getOptionDetail(line, universe, environment, option) ⇒ 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 |
Promise.<OptionsCatalog>
sfrMobile.getOptionsCatalog(line) ⇒ 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 |
Promise.<OptionsCatalogDetail>
sfrMobile.getOptionsCatalogDetail(line) ⇒ 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 |
Promise.<OptionsList>
sfrMobile.getOptions(line, category) ⇒ 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 |
Promise.<EquipementDetail>
sfrMobile.getEquipementDetail(line, optionCode, universe) ⇒ 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 |
Promise.<Parc>
sfrMobile.getParc(line, universe, environment) ⇒ 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 |
Promise.<AchatsAbonnements>
sfrMobile.getPaiementTiersAchatsAbonnements(line) ⇒ Liste des achats et abonnements (hors forfait) sur la ligne
Kind: instance method of SfrMobile
Param | Description |
---|---|
line | MSISDN de la ligne à sélectionner |
Promise.<OptionsAchat>
sfrMobile.getPaiementTiersOptionsAchat(line) ⇒ Droits d'achat sur la ligne (Stores, jeux, ...)
Kind: instance method of SfrMobile
Param | Description |
---|---|
line | MSISDN de la ligne à sélectionner |
sfrMobile.postPaiementTiersOptionsAchat(selectedLine, otp, data)
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 |
Promise.<OTPSMSResponse>
sfrMobile.getOTPSMS(line) ⇒ Obtenir un code à usage unique pour effectuer une opération
Kind: instance method of SfrMobile
Param | Description |
---|---|
line | MSISDN de la ligne à sélectionner |
Promise.<OffreAmes>
sfrMobile.getOffreAMES(line) ⇒ Informations sur les remises Multi-Pack
Kind: instance method of SfrMobile
Param | Description |
---|---|
line | MSISDN de la ligne à sélectionner |
Promise.<LoginResponse>
SfrMobile.login(username, password, duration, universe) ⇒ 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 |
Promise.<VerifyUsernameResponse>
SfrMobile.verifyUsername(username, universe) ⇒ 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 |
Promise.<InfosTerminalIMEI>
SfrMobile.getTerminalInfoIMEI(imei) ⇒ Description du terminal associé à un IMEI
Kind: static method of SfrMobile
Param | Type | Description |
---|---|---|
imei | string |
Identifiant du terminal mobile |
Promise.<InfosTerminal>
SfrMobile.getTerminalInfo(id, type) ⇒ Description du terminal associé à un identifiant
Kind: static method of SfrMobile
Param | Type | Description |
---|---|---|
id | string |
Identifiant |
type |
'BACARAT' | 'TAC'
|
Type d'identifiant |
Promise.<Array.<InfosTerminal>>
SfrMobile.getTerminauxInfo(ids, type) ⇒ 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 |