lib/client/auth/src/api/UserApi.js

81 lines
2.2 KiB
JavaScript
Raw Normal View History

2022-09-03 21:10:56 +00:00
/**
* auth
* Authentication Microservice
*
* The version of the OpenAPI document: 0.0.2
* Contact: noc@taxnexus.net
*
* 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 Error from '../model/Error';
import UserResponse from '../model/UserResponse';
/**
* User service.
* @module api/UserApi
* @version 0.0.2
*/
export default class UserApi {
/**
* Constructs a new UserApi.
* @alias module:api/UserApi
* @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 getUsers operation.
* @callback module:api/UserApi~getUsersCallback
* @param {String} error Error message, if any.
* @param {module:model/UserResponse} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Check API Key
* Checks for a valid API key, and returns full user record
* @param {Object} opts Optional parameters
* @param {String} opts.apikey Service account or developer API key
* @param {module:api/UserApi~getUsersCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/UserResponse}
*/
getUsers(opts, callback) {
opts = opts || {};
let postBody = null;
let pathParams = {
};
let queryParams = {
'apikey': opts['apikey']
};
let headerParams = {
};
let formParams = {
};
let authNames = ['ApiKeyAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = UserResponse;
return this.apiClient.callApi(
'/users', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null, callback
);
}
}