Skip to content

Latest commit

 

History

History
93 lines (60 loc) · 2.03 KB

UserApi.md

File metadata and controls

93 lines (60 loc) · 2.03 KB

openapi.api.UserApi

Load the API package

import 'package:openapi/api.dart';

All URIs are relative to https://demo.2fauth.app

Method HTTP request Description
getUser GET /api/v1/user Get user
getUserName GET /api/v1/user/name Get user name

getUser

UserRead getUser()

Get user

Use this endpoint to get informations about the authenticated user.

Example

import 'package:openapi/api.dart';

final api_instance = UserApi();

try {
    final result = api_instance.getUser();
    print(result);
} catch (e) {
    print('Exception when calling UserApi->getUser: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

UserRead

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUserName

GetUserName200Response getUserName()

Get user name

This endpoint is deprecated since API v1.1.0 Use this endpoint to check if a registered user exists by getting its name, null otherwise.

Example

import 'package:openapi/api.dart';

final api_instance = UserApi();

try {
    final result = api_instance.getUserName();
    print(result);
} catch (e) {
    print('Exception when calling UserApi->getUserName: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

GetUserName200Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]