Interface UserApi

Api for accessing information about users of LUY

interface UserApi {
    create(loginName: string, firstName: string, lastName: string): User;
    get(userId: number): User;
    get(loginName: string): User;
    getAll(): User[];
}

Methods

Methods

  • Creates and returns new User with given login name.

    When the loginName parameter is empty or user with the given loginName already exist will throw exception with an appropriate message.

    Parameters

    • loginName: string
    • firstName: string
    • lastName: string

    Returns User

  • Returns user with given id.

    Parameters

    • userId: number

    Returns User

  • Returns User object with given login name.

    Parameters

    • loginName: string

    Returns User

  • Returns all users of LUY.

    Returns User[]