Skip to content

Latest commit

 

History

History
executable file
·
84 lines (56 loc) · 3.16 KB

README.md

File metadata and controls

executable file
·
84 lines (56 loc) · 3.16 KB

user

Overview

User

Available Operations

  • login - Login user
  • me - Show current user

login

Login user

Example Usage

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
  }
});

Parameters

Parameter Type Required Description
request operations.LoginApplicationJSON ✔️ The request object to use for the request.
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.LoginResponse>

me

Show current user

Example Usage

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
  }
});

Parameters

Parameter Type Required Description
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.MeResponse>