new lib version [CI SKIP]
This commit is contained in:
99
dist/services/TrackService.ts
vendored
99
dist/services/TrackService.ts
vendored
@@ -1,99 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { CreateTrack } from '../models/CreateTrack';
|
||||
import type { ResponseEmpty } from '../models/ResponseEmpty';
|
||||
import type { ResponseTrack } from '../models/ResponseTrack';
|
||||
import type { Track } from '../models/Track';
|
||||
import { request as __request } from '../core/request';
|
||||
|
||||
export class TrackService {
|
||||
|
||||
/**
|
||||
* Get all
|
||||
* Lists all tracks.
|
||||
* @result ResponseTrack
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async trackControllerGetAll(): Promise<Array<ResponseTrack>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/tracks`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Post
|
||||
* Create a new track object (id will be generated automagicly).
|
||||
* @param requestBody CreateTrack
|
||||
* @result ResponseTrack
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async trackControllerPost(
|
||||
requestBody?: CreateTrack,
|
||||
): Promise<ResponseTrack> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/tracks`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get one
|
||||
* Returns a track of a specified id (if it exists)
|
||||
* @param id
|
||||
* @result ResponseTrack
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async trackControllerGetOne(
|
||||
id: number,
|
||||
): Promise<ResponseTrack> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/tracks/${id}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Put
|
||||
* Update a track object (id can't be changed).
|
||||
* @param id
|
||||
* @param requestBody Track
|
||||
* @result ResponseTrack
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async trackControllerPut(
|
||||
id: number,
|
||||
requestBody?: Track,
|
||||
): Promise<ResponseTrack> {
|
||||
const result = await __request({
|
||||
method: 'PUT',
|
||||
path: `/api/tracks/${id}`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove
|
||||
* Delete a specified track (if it exists).
|
||||
* @param id
|
||||
* @result ResponseTrack
|
||||
* @result ResponseEmpty
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async trackControllerRemove(
|
||||
id: number,
|
||||
): Promise<ResponseTrack | ResponseEmpty> {
|
||||
const result = await __request({
|
||||
method: 'DELETE',
|
||||
path: `/api/tracks/${id}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user