UNPKG

@pubby.club/sdk

Version:
40 lines (39 loc) 1.4 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var Rest_1 = require("../../../lib/Rest"); var const_1 = require("../../../const"); var UserService = /** @class */ (function (_super) { __extends(UserService, _super); function UserService(api) { return _super.call(this, api, "users") || this; } UserService.prototype.getProfile = function () { return this.request({ method: "GET", baseURL: const_1.BASE_URL, url: "/me", }); }; UserService.prototype.updateProfile = function (user) { return this.request({ method: "PATCH", url: "/me", data: user, }); }; return UserService; }(Rest_1.Rest)); exports.default = UserService;