I have the below code snippet from an Azure Function:
foreach ( var i in args.ids ) // create an entity for each of the other title_player_accounts
entities.Add ( new EntityKey { Id = i, Type = "title_player_account" } );
PlayFabSettings.staticSettings.TitleId = context.TitleAuthenticationContext.Id;
var titleContext = new PlayFabAuthenticationContext
{
EntityId = context.TitleAuthenticationContext.Id,
EntityToken = context.TitleAuthenticationContext.EntityToken,
EntityType = "title"
};
var players = await PlayFabProfilesAPI.GetProfilesAsync (
new PlayFab.ProfilesModels.GetEntityProfilesRequest
{
Entities = entities,
AuthenticationContext = titleContext
}
);
foreach ( var p in players.Result.Profiles )
profiles.Add ( new PlayerProfile { titleId = p.Entity.Id, displayName = p.DisplayName } );
return new { profiles };
The function works, I'm able to view the log stream in Azure Portal. The problem is, most of the title information is 'null', for instance, the DisplayName. Now, answers here say that I need to set InfoRequestParameters, but GetProfilesAsync doesn't accept InfoRequestParameters. Tell me I don't have to make one call using the title_player_account id, and then ANOTHER call to something like GetPlayerCombinedInfoAsync?!?
In other words, how do I get the DisplayName using GetProfilesAsync? Thanks in advance for any help.