UNPKG

@vrspace/babylonjs

Version:

vrspace.org babylonjs client

127 lines (109 loc) 3.88 kB
/** * 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"; /** * Textures service. * @module api/TexturesApi * @version v0 */ export class TexturesApi { /** * Constructs a new TexturesApi. * @alias module:api/TexturesApi * @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; } /** * List all jpg and png files in content directory hierarchy * List all jpg and png files in content directory hierarchy * @return {Promise< Array.<String> >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<String>} and HTTP response */ listTexturesWithHttpInfo() { let postBody = null; let pathParams = { }; let queryParams = { }; let headerParams = { }; let formParams = { }; let authNames = []; let contentTypes = []; let accepts = ['*/*']; let returnType = ['String']; return this.apiClient.callApi( '/vrspace/api/textures/list', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); } /** * List all jpg and png files in content directory hierarchy * List all jpg and png files in content directory hierarchy * @return {Promise< Array.<String> >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<String>} */ listTextures() { return this.listTexturesWithHttpInfo() .then(function(response_and_data) { return response_and_data.data; }); } /** * Search textures that contain given substring * Search textures that contain given substring * @param {String} pattern * @return {Promise< Array.<String> >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<String>} and HTTP response */ searchTexturesWithHttpInfo(pattern) { let postBody = null; // verify the required parameter 'pattern' is set if (pattern === undefined || pattern === null) { throw new Error("Missing the required parameter 'pattern' when calling searchTextures"); } let pathParams = { }; let queryParams = { 'pattern': pattern }; let headerParams = { }; let formParams = { }; let authNames = []; let contentTypes = []; let accepts = ['*/*']; let returnType = ['String']; return this.apiClient.callApi( '/vrspace/api/textures/search', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); } /** * Search textures that contain given substring * Search textures that contain given substring * @param {String} pattern * @return {Promise< Array.<String> >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<String>} */ searchTextures(pattern) { return this.searchTexturesWithHttpInfo(pattern) .then(function(response_and_data) { return response_and_data.data; }); } }