REST.Backend.EMSApi.TEMSClientAPI.RetrieveUser

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function RetrieveUser(const AObjectID: string; out AUser: TUser;
const AJSON: TJSONArray; AProc: TRetrieveUserProc): Boolean; overload;
function RetrieveUser(const AUser: TUser; AProc: TRetrieveUserProc): Boolean; overload;
function RetrieveUser(const AUser: TUser; out AFoundUser: TUser;
const AJSON: TJSONArray = nil): Boolean; overload;
function RetrieveUser(const AObjectID: string; out AUser: TUser;
const AJSON: TJSONArray = nil): Boolean; overload;
function RetrieveUser(const AObjectID: string; AProc: TRetrieveUserProc): Boolean; overload;

C++

bool __fastcall RetrieveUser(const System::UnicodeString AObjectID, /* out */ TUser &AUser, System::Json::TJSONArray* const AJSON, _di_TRetrieveUserProc AProc)/* overload */;
bool __fastcall RetrieveUser(const TUser &AUser, _di_TRetrieveUserProc AProc)/* overload */;
bool __fastcall RetrieveUser(const TUser &AUser, /* out */ TUser &AFoundUser, System::Json::TJSONArray* const AJSON = (System::Json::TJSONArray*)(0x0))/* overload */;
bool __fastcall RetrieveUser(const System::UnicodeString AObjectID, /* out */ TUser &AUser, System::Json::TJSONArray* const AJSON = (System::Json::TJSONArray*)(0x0))/* overload */;
bool __fastcall RetrieveUser(const System::UnicodeString AObjectID, _di_TRetrieveUserProc AProc)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
REST.Backend.EMSApi.pas
REST.Backend.EMSApi.hpp
REST.Backend.EMSApi TEMSClientAPI

Description

Requests the information of a user from the EMS server and returns True if it receives the information successfully or False otherwise.

To specify the target user, provide either a string with the user ID (AObjectID) or an instance of TUser (AUser).

To handle the received information, you must provide either of the following:

  • An instance of TUser (AUser or AFoundUser). RetrieveUser fills the specified object with the received user data.

    You may optionally provide a third argument, an instance of TJSONArray (AJSON), so that RetrieveUser fills that object with the received user data in JSON format.

  • A procedure of type TRetrieveUserProc (AProc). RetrieveUser calls your procedure and provides the received user data both as an instance of TUser (first argument) and as an instance of TJSONArray (second argument).

Exceptions

Exception Message Description

EEMSClientAPIError

MasterSecret required

Authentication is TAuthentication.MasterSecret and ConnectionInfo.MasterSecret is an empty string.

Session token required

Authentication is TAuthentication.Session and you did not log in or the session authentication token that you provided to Login is an empty string.

User ID required

The specified user ID is an empty string.

See Also