@qualiture/tesla-api
Version:
An unofficial library that wraps the Tesla Owner's API
23 lines (22 loc) • 760 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const axios_1 = __importDefault(require("axios"));
const constants_1 = require("./constants");
class Users {
static getUser(config) {
return new Promise((resolve, reject) => {
axios_1.default.get(constants_1.Constants.USER.ENDPOINT, config)
.then((response) => {
const data = response.data;
const user = data.response;
resolve(user);
}).catch((err) => {
reject(err);
});
});
}
}
exports.default = Users;