75 lines
2.3 KiB
JavaScript
75 lines
2.3 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.StatsClientService = void 0;
|
|
const request_1 = require("../core/request");
|
|
class StatsClientService {
|
|
/**
|
|
* Get all
|
|
* Lists all stats clients. Please remember that the key can only be viewed on creation.
|
|
* @param page
|
|
* @param pageSize
|
|
* @returns ResponseStatsClient
|
|
* @throws ApiError
|
|
*/
|
|
static async statsClientControllerGetAll(page, pageSize) {
|
|
const result = await (0, request_1.request)({
|
|
method: 'GET',
|
|
path: `/api/statsclients`,
|
|
query: {
|
|
'page': page,
|
|
'page_size': pageSize,
|
|
},
|
|
});
|
|
return result.body;
|
|
}
|
|
/**
|
|
* Post
|
|
* Create a new stats client. <br> Please remember that the client's key will be generated automaticly and that it can only be viewed on creation.
|
|
* @param requestBody CreateStatsClient
|
|
* @returns ResponseStatsClient
|
|
* @throws ApiError
|
|
*/
|
|
static async statsClientControllerPost(requestBody) {
|
|
const result = await (0, request_1.request)({
|
|
method: 'POST',
|
|
path: `/api/statsclients`,
|
|
body: requestBody,
|
|
});
|
|
return result.body;
|
|
}
|
|
/**
|
|
* Get one
|
|
* Lists all information about the stats client whose id got provided. Please remember that the key can only be viewed on creation.
|
|
* @param id
|
|
* @returns ResponseStatsClient
|
|
* @throws ApiError
|
|
*/
|
|
static async statsClientControllerGetOne(id) {
|
|
const result = await (0, request_1.request)({
|
|
method: 'GET',
|
|
path: `/api/statsclients/${id}`,
|
|
});
|
|
return result.body;
|
|
}
|
|
/**
|
|
* Remove
|
|
* Delete the stats client whose id you provided. <br> If no client with this id exists it will just return 204(no content).
|
|
* @param id
|
|
* @param force
|
|
* @returns ResponseStatsClient
|
|
* @returns ResponseEmpty
|
|
* @throws ApiError
|
|
*/
|
|
static async statsClientControllerRemove(id, force) {
|
|
const result = await (0, request_1.request)({
|
|
method: 'DELETE',
|
|
path: `/api/statsclients/${id}`,
|
|
query: {
|
|
'force': force,
|
|
},
|
|
});
|
|
return result.body;
|
|
}
|
|
}
|
|
exports.StatsClientService = StatsClientService;
|