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.

145 lines (138 loc) 6.92 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ApiClient = _interopRequireDefault(require("../ApiClient")); var _DeleteApiKeyRequest = _interopRequireDefault(require("../model/DeleteApiKeyRequest")); var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse")); var _Key = _interopRequireDefault(require("../model/Key")); var _KeyCreateRequest = _interopRequireDefault(require("../model/KeyCreateRequest")); 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. * */ /** * APIKeys service. * @module api/APIKeysApi * @version 1.0.0 */ var APIKeysApi = exports["default"] = /*#__PURE__*/function () { /** * Constructs a new APIKeysApi. * @alias module:api/APIKeysApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ function APIKeysApi(apiClient) { _classCallCheck(this, APIKeysApi); this.apiClient = apiClient || _ApiClient["default"].instance; } /** * Callback function to receive the result of the keysDelete operation. * @callback module:api/APIKeysApi~keysDeleteCallback * @param {String} error Error message, if any. * @param {module:model/Key} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Delete API key by id * Delete API key with given api key id * @param {module:model/DeleteApiKeyRequest} body * @param {module:api/APIKeysApi~keysDeleteCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/Key} */ return _createClass(APIKeysApi, [{ key: "keysDelete", value: function keysDelete(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 keysDelete"); } var pathParams = {}; var queryParams = {}; var headerParams = {}; var formParams = {}; var authNames = ['key']; var contentTypes = ['application/json']; var accepts = ['application/json', 'application/octet-stream']; var returnType = _Key["default"]; return this.apiClient.callApi('/keys', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the keysGet operation. * @callback module:api/APIKeysApi~keysGetCallback * @param {String} error Error message, if any. * @param {Array.<module:model/Key>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Retrieve API keys list * Retrieve API keys list from authenticated user * @param {module:api/APIKeysApi~keysGetCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Key>} */ }, { key: "keysGet", value: function keysGet(callback) { var postBody = null; var pathParams = {}; var queryParams = {}; var headerParams = {}; var formParams = {}; var authNames = ['key']; var contentTypes = []; var accepts = ['application/json', 'application/octet-stream']; var returnType = [_Key["default"]]; return this.apiClient.callApi('/keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } /** * Callback function to receive the result of the keysPost operation. * @callback module:api/APIKeysApi~keysPostCallback * @param {String} error Error message, if any. * @param {module:model/Key} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Create new API Key * Create new API Key * @param {module:model/KeyCreateRequest} body * @param {module:api/APIKeysApi~keysPostCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/Key} */ }, { key: "keysPost", value: function keysPost(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 keysPost"); } var pathParams = {}; var queryParams = {}; var headerParams = {}; var formParams = {}; var authNames = ['key']; var contentTypes = ['application/json']; var accepts = ['application/json', 'application/octet-stream']; var returnType = _Key["default"]; return this.apiClient.callApi('/keys', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); } }]); }();