@mloyalty/api
v3.0.50
Published
Mloyalty api client
Downloads
855
Readme
Overview
Mloyalty API library
Installation
npm install ml-api
Configuration
import { createMloyalty } from "@mloyalty/api";
import axios from "axios";
const instance = axios.create({
baseURL: API_URL,
});
export const mloyalty = createMloyalty(instance);
Usage
import { clientClientInfo } from "@mloyalty/api";
const clientInfo = async () => {
const res = await clientClientInfo(
mloyalty,
{
phone: "6666666666",
},
{
/* Axios configuration */
}
);
console.log(res.data);
};
clientInfo();
Response
{
"ErrorCode": 0,
"Message": "",
"ChildrensInfo": [
{
"Id": 1082,
"Name": "Иван",
"Birthdate": "2022-12-12T00:00:00",
"Gender": true,
"Age": 1
},
{
"Id": 1083,
"Name": "Валера",
"Birthdate": "2010-11-12T00:00:00",
"Gender": true,
"Age": 13
}
]
}