User
Login user
import { Structure } from "structure-ac";
import { LoginResponse } from "structure-ac/dist/sdk/models/operations";
const sdk = new Structure({
security: {
bearerAuth: "",
},
});
sdk.user.login({
email: "[email protected]",
password: "rem",
}).then((res: LoginResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.LoginApplicationJSON | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.LoginResponse>
Show current user
import { Structure } from "structure-ac";
import { MeResponse } from "structure-ac/dist/sdk/models/operations";
const sdk = new Structure({
security: {
bearerAuth: "",
},
});
sdk.user.me().then((res: MeResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.MeResponse>