emotiv-ts
Version:
A Typescript library that wraps the Cortex API functionalities to communicate with Emotiv headsets
20 lines (19 loc) • 733 B
JavaScript
import { CortexRequest } from "../../../internal/cortex-request";
import { Requests } from "../../../../enums/internal/emotiv.requests";
import { ProfileActions } from "../../../../enums/profile-action.enum";
export class SetupProfile extends CortexRequest {
constructor(authToken, action, profileName, headsetId, newProfileName) {
super();
this.id = Requests.SETUP_PROFILE;
this.method = "setupProfile";
this.params = {
"cortexToken": authToken,
"status": action,
"profile": profileName,
"headset": headsetId
};
if (action == ProfileActions.RENAME) {
this.params.newProfileName = newProfileName || "";
}
}
}