Source: client/openapi/api/RemoteBrowserApi.js

/**
 * OpenAPI definition
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v0
 * 
 *
 * 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.js";

/**
* RemoteBrowser service.
* @module api/RemoteBrowserApi
* @version v0
*/
export class RemoteBrowserApi {

    /**
    * Constructs a new RemoteBrowserApi. 
    * @alias module:api/RemoteBrowserApi
    * @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;
    }



    /**
     * @return {Promise< Boolean >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Boolean} and HTTP response
     */
    availableWithHttpInfo() {
      let postBody = null;

      let pathParams = {
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = [];
      let accepts = ['*/*'];
      let returnType = 'Boolean';
      return this.apiClient.callApi(
        '/vrspace/api/webbrowser/available', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * @return {Promise< Boolean >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Boolean}
     */
    available() {
      return this.availableWithHttpInfo()
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Blob} and HTTP response
     */
    backWithHttpInfo() {
      let postBody = null;

      let pathParams = {
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = [];
      let accepts = ['image/png'];
      let returnType = 'Blob';
      return this.apiClient.callApi(
        '/vrspace/api/webbrowser/back', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Blob}
     */
    back() {
      return this.backWithHttpInfo()
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * @param {Number} x 
     * @param {Number} y 
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Blob} and HTTP response
     */
    clickWithHttpInfo(x, y) {
      let postBody = null;
      // verify the required parameter 'x' is set
      if (x === undefined || x === null) {
        throw new Error("Missing the required parameter 'x' when calling click");
      }
      // verify the required parameter 'y' is set
      if (y === undefined || y === null) {
        throw new Error("Missing the required parameter 'y' when calling click");
      }

      let pathParams = {
      };
      let queryParams = {
        'x': x,
        'y': y
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = [];
      let accepts = ['image/png'];
      let returnType = 'Blob';
      return this.apiClient.callApi(
        '/vrspace/api/webbrowser/click', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * @param {Number} x 
     * @param {Number} y 
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Blob}
     */
    click(x, y) {
      return this.clickWithHttpInfo(x, y)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Blob} and HTTP response
     */
    closeWithHttpInfo() {
      let postBody = null;

      let pathParams = {
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = [];
      let accepts = ['image/png'];
      let returnType = 'Blob';
      return this.apiClient.callApi(
        '/vrspace/api/webbrowser/close', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Blob}
     */
    close() {
      return this.closeWithHttpInfo()
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * @param {String} text 
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Blob} and HTTP response
     */
    enterWithHttpInfo(text) {
      let postBody = null;
      // verify the required parameter 'text' is set
      if (text === undefined || text === null) {
        throw new Error("Missing the required parameter 'text' when calling enter");
      }

      let pathParams = {
      };
      let queryParams = {
        'text': text
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = [];
      let accepts = ['image/png'];
      let returnType = 'Blob';
      return this.apiClient.callApi(
        '/vrspace/api/webbrowser/enter', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * @param {String} text 
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Blob}
     */
    enter(text) {
      return this.enterWithHttpInfo(text)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Blob} and HTTP response
     */
    forwardWithHttpInfo() {
      let postBody = null;

      let pathParams = {
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = [];
      let accepts = ['image/png'];
      let returnType = 'Blob';
      return this.apiClient.callApi(
        '/vrspace/api/webbrowser/forward', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Blob}
     */
    forward() {
      return this.forwardWithHttpInfo()
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * @param {String} url 
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Blob} and HTTP response
     */
    getWithHttpInfo(url) {
      let postBody = null;
      // verify the required parameter 'url' is set
      if (url === undefined || url === null) {
        throw new Error("Missing the required parameter 'url' when calling get");
      }

      let pathParams = {
      };
      let queryParams = {
        'url': url
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = [];
      let accepts = ['image/png'];
      let returnType = 'Blob';
      return this.apiClient.callApi(
        '/vrspace/api/webbrowser/get', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * @param {String} url 
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Blob}
     */
    get(url) {
      return this.getWithHttpInfo(url)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
     */
    quitWithHttpInfo() {
      let postBody = null;

      let pathParams = {
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = [];
      let accepts = [];
      let returnType = null;
      return this.apiClient.callApi(
        '/vrspace/api/webbrowser/quit', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}
     */
    quit() {
      return this.quitWithHttpInfo()
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * @param {Number} pixels 
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Blob} and HTTP response
     */
    scrollWithHttpInfo(pixels) {
      let postBody = null;
      // verify the required parameter 'pixels' is set
      if (pixels === undefined || pixels === null) {
        throw new Error("Missing the required parameter 'pixels' when calling scroll");
      }

      let pathParams = {
      };
      let queryParams = {
        'pixels': pixels
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = [];
      let accepts = ['image/png'];
      let returnType = 'Blob';
      return this.apiClient.callApi(
        '/vrspace/api/webbrowser/scroll', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * @param {Number} pixels 
     * @return {Promise< Blob >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Blob}
     */
    scroll(pixels) {
      return this.scrollWithHttpInfo(pixels)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


}