mirror of
https://github.com/cloudmaker97/TikTok-mGBA-Emulator.git
synced 2025-12-05 23:48:38 +00:00
104 lines
3.5 KiB
TypeScript
104 lines
3.5 KiB
TypeScript
/* eslint-disable */
|
|
/* tslint:disable */
|
|
/*
|
|
* ---------------------------------------------------------------
|
|
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
* ## ##
|
|
* ## AUTHOR: acacode ##
|
|
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
* ---------------------------------------------------------------
|
|
*/
|
|
|
|
import { KeysEnum } from "./data-contracts";
|
|
import { HttpClient, RequestParams } from "./http-client";
|
|
|
|
export class MgbaHttp<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
|
|
/**
|
|
* @description A custom convenience API that implements a key press and release. This is as opposed to the key based core API that sends only either a press or release message.
|
|
*
|
|
* @tags Button
|
|
* @name ButtonTapCreate
|
|
* @summary Sends button presses.
|
|
* @request POST:/mgba-http/button/tap
|
|
*/
|
|
buttonTapCreate = (
|
|
query: {
|
|
/** Key value of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. */
|
|
key: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, any>({
|
|
path: `/mgba-http/button/tap`,
|
|
method: "POST",
|
|
query: query,
|
|
...params,
|
|
});
|
|
/**
|
|
* @description A custom convenience API that implements multiple simultaneously keys being pressed and released. This is as opposed to the key based core API that sends only either a press or release message.
|
|
*
|
|
* @tags Button
|
|
* @name ButtonTapmanyCreate
|
|
* @summary Sends multiple button presses simultaneously.
|
|
* @request POST:/mgba-http/button/tapmany
|
|
*/
|
|
buttonTapmanyCreate = (
|
|
query: {
|
|
/** Key array containing any of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. */
|
|
keys: KeysEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, any>({
|
|
path: `/mgba-http/button/tapmany`,
|
|
method: "POST",
|
|
query: query,
|
|
...params,
|
|
});
|
|
/**
|
|
* @description A custom convenience API that implements a held down button for a given duration in frames. This is as opposed to the key based core API that sends only either a press or release message.
|
|
*
|
|
* @tags Button
|
|
* @name ButtonHoldCreate
|
|
* @summary Sends a held down button for a given duration in frames.
|
|
* @request POST:/mgba-http/button/hold
|
|
*/
|
|
buttonHoldCreate = (
|
|
query: {
|
|
/** Key value of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. */
|
|
key: string;
|
|
/** @format int32 */
|
|
duration: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, any>({
|
|
path: `/mgba-http/button/hold`,
|
|
method: "POST",
|
|
query: query,
|
|
...params,
|
|
});
|
|
/**
|
|
* @description A custom convenience API that implements multiple simultaneously keys being pressed and released for a given duration in frames. This is as opposed to the key based core API that sends only either a press or release message.
|
|
*
|
|
* @tags Button
|
|
* @name ButtonHoldmanyCreate
|
|
* @summary Sends multiple button presses simultaneously for a given duration in frames.
|
|
* @request POST:/mgba-http/button/holdmany
|
|
*/
|
|
buttonHoldmanyCreate = (
|
|
query: {
|
|
/** Key array containing any of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. */
|
|
keys: KeysEnum[];
|
|
/** @format int32 */
|
|
duration: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, any>({
|
|
path: `/mgba-http/button/holdmany`,
|
|
method: "POST",
|
|
query: query,
|
|
...params,
|
|
});
|
|
}
|