UNPKG

scraper-api-datachaser

Version:

The scraping SaaS platform provides a RESTful API for developers to perform web scraping tasks. Users can submit scraping tasks, monitor task status, retrieve scraped data, and manage their account through the API.

81 lines (78 loc) 4.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ApiClient = _interopRequireDefault(require("../ApiClient")); var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse")); var _UserAccountCreateResponse = _interopRequireDefault(require("../model/UserAccountCreateResponse")); var _UserAccountUpdateRequest = _interopRequireDefault(require("../model/UserAccountUpdateRequest")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** * Scraper API * The scraping SaaS platform provides a RESTful API for developers to perform web scraping tasks. Users can submit scraping tasks, monitor task status, retrieve scraped data, and manage their account through the API. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. * */ /** * Authentication service. * @module api/AuthenticationApi * @version 1.0.0 */ var AuthenticationApi = exports["default"] = /*#__PURE__*/function () { /** * Constructs a new AuthenticationApi. * @alias module:api/AuthenticationApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ function AuthenticationApi(apiClient) { _classCallCheck(this, AuthenticationApi); this.apiClient = apiClient || _ApiClient["default"].instance; } /** * Callback function to receive the result of the accountPut operation. * @callback module:api/AuthenticationApi~accountPutCallback * @param {String} error Error message, if any. * @param {module:model/UserAccountCreateResponse} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Update user account * Updates the authenticated user's account. * @param {module:model/UserAccountUpdateRequest} body * @param {module:api/AuthenticationApi~accountPutCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/UserAccountCreateResponse} */ return _createClass(AuthenticationApi, [{ key: "accountPut", value: function accountPut(body, callback) { var postBody = body; // verify the required parameter 'body' is set if (body === undefined || body === null) { throw new Error("Missing the required parameter 'body' when calling accountPut"); } var pathParams = {}; var queryParams = {}; var headerParams = {}; var formParams = {}; var authNames = ['key']; var contentTypes = ['application/json']; var accepts = ['application/json', 'application/octet-stream']; var returnType = _UserAccountCreateResponse["default"]; return this.apiClient.callApi('/account', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } }]); }();