reefmobile-api
Version:
A wrapper around Free Mobile API.
1 lines • 2.49 kB
JavaScript
var e="https://mobile.free.fr/account/v2/api/SI";function t(t,o){const n={password:o,login:t};return fetch(e+"/auth/customer/login",{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin"},body:JSON.stringify(n)})}function o(t,o,n){const r={password:o,trustedUuid:n,login:t};return fetch(e+"/auth/customer/login",{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin"},body:JSON.stringify(r)})}function n(t,o,n,r){console.log(e+"/auth/customer/otp/validate/"+t);const i={codeOtp:o,isTrusted:n};return fetch(e+"/auth/customer/otp/validate/"+t,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+r,"x-user-token":r},body:JSON.stringify(i)})}function r(t,o){return fetch(e+"/subscriber/"+t,{method:"GET",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+o,"x-user-token":o}})}function i(t,o){return fetch(e+"/subscriber/"+t+"/consumption",{method:"GET",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+o,"x-user-token":o}})}function c(t,o){return fetch(e+"/invoice",{method:"GET",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+o,"x-user-token":o}})}function s(t,o){return fetch(e+"/subscriber/"+t+"/unpaid",{method:"GET",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+o,"x-user-token":o}})}function u(t,o){return fetch(e+"/subscriber/"+t+"/offer",{method:"GET",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+o,"x-user-token":o}})}export{c as FetchInvoiceData,s as FetchUnpaidInvoices,o as LoginWithTrustedUuid,t as LoginWithoutTrustedUuid,n as VerifySMSCode,r as fetchCompleteUserData,i as fetchPeriodUsageDetails,u as fetchPlanAndDiscountInfo};//# sourceMappingURL=index.mjs.map