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.

120 lines (104 loc) 3.64 kB
/** * 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. * */ import ApiClient from "../ApiClient"; import ErrorResponse from '../model/ErrorResponse'; import Log from '../model/Log'; /** * Logs service. * @module api/LogsApi * @version 1.0.0 */ export default class LogsApi { /** * Constructs a new LogsApi. * @alias module:api/LogsApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ constructor(apiClient) { this.apiClient = apiClient || ApiClient.instance; } /** * Callback function to receive the result of the logJobIdGet operation. * @callback module:api/LogsApi~logJobIdGetCallback * @param {String} error Error message, if any. * @param {Array.<module:model/Log>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Get log by job id * Get log generated by job by job id * @param {String} id * @param {module:api/LogsApi~logJobIdGetCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Log>} */ logJobIdGet(id, callback) { let postBody = null; // verify the required parameter 'id' is set if (id === undefined || id === null) { throw new Error("Missing the required parameter 'id' when calling logJobIdGet"); } let pathParams = { 'id': id }; let queryParams = { }; let headerParams = { }; let formParams = { }; let authNames = ['key']; let contentTypes = []; let accepts = ['application/json', 'application/octet-stream']; let returnType = [Log]; return this.apiClient.callApi( '/log/job/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback ); } /** * Callback function to receive the result of the logsGet operation. * @callback module:api/LogsApi~logsGetCallback * @param {String} error Error message, if any. * @param {Array.<module:model/Log>} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Get all logs * Get all logs from logged user * @param {module:api/LogsApi~logsGetCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.<module:model/Log>} */ logsGet(callback) { let postBody = null; let pathParams = { }; let queryParams = { }; let headerParams = { }; let formParams = { }; let authNames = ['key']; let contentTypes = []; let accepts = ['application/json', 'application/octet-stream']; let returnType = [Log]; return this.apiClient.callApi( '/logs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback ); } }