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.

83 lines (71 loc) 2.75 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 UserAccountCreateResponse from '../model/UserAccountCreateResponse'; import UserAccountUpdateRequest from '../model/UserAccountUpdateRequest'; /** * Authentication service. * @module api/AuthenticationApi * @version 1.0.0 */ export default class AuthenticationApi { /** * 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. */ constructor(apiClient) { this.apiClient = apiClient || ApiClient.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} */ accountPut(body, callback) { let 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"); } let pathParams = { }; let queryParams = { }; let headerParams = { }; let formParams = { }; let authNames = ['key']; let contentTypes = ['application/json']; let accepts = ['application/json', 'application/octet-stream']; let returnType = UserAccountCreateResponse; return this.apiClient.callApi( '/account', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback ); } }