/// <summary> /// Lists all outstanding invitations and group applications for an entity /// </summary> public void ListMembershipOpportunities(ListMembershipOpportunitiesRequest request, Action <ListMembershipOpportunitiesResponse> resultCallback, Action <PlayFabError> errorCallback, object customData = null, Dictionary <string, string> extraHeaders = null) { var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; var callSettings = apiSettings ?? PlayFabSettings.staticSettings; if (!context.IsEntityLoggedIn()) { throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn, "Must be logged in to call this method"); } PlayFabHttp.MakeApiCall("/Group/ListMembershipOpportunities", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); }
/// <summary> /// Lists all outstanding invitations and group applications for an entity /// </summary> /// <param name="Entity">The entity to perform this action on. (Optional)</param> public static Task <ListMembershipOpportunitiesResponse> ListMembershipOpportunities(EntityKey Entity = default, PlayFabAuthenticationContext customAuthContext = null, object customData = null, Dictionary <string, string> extraHeaders = null) { ListMembershipOpportunitiesRequest request = new ListMembershipOpportunitiesRequest() { Entity = Entity, }; var context = GetContext(customAuthContext); return(PlayFabHttp.MakeApiCallAsync <ListMembershipOpportunitiesResponse>("/Group/ListMembershipOpportunities", request, AuthType.EntityToken, customData, extraHeaders, context)); }
/// <summary> /// Lists all outstanding invitations and group applications for an entity /// </summary> public static async Task <PlayFabResult <ListMembershipOpportunitiesResponse> > ListMembershipOpportunitiesAsync(ListMembershipOpportunitiesRequest request, object customData = null, Dictionary <string, string> extraHeaders = null) { if ((request?.AuthenticationContext?.EntityToken ?? PlayFabSettings.staticPlayer.EntityToken) == null) { throw new PlayFabException(PlayFabExceptionCode.EntityTokenNotSet, "Must call GetEntityToken before calling this method"); } var httpResult = await PlayFabHttp.DoPost("/Group/ListMembershipOpportunities", request, "X-EntityToken", PlayFabSettings.staticPlayer.EntityToken, extraHeaders); if (httpResult is PlayFabError) { var error = (PlayFabError)httpResult; PlayFabSettings.GlobalErrorHandler?.Invoke(error); return(new PlayFabResult <ListMembershipOpportunitiesResponse> { Error = error, CustomData = customData }); } var resultRawJson = (string)httpResult; var resultData = PluginManager.GetPlugin <ISerializerPlugin>(PluginContract.PlayFab_Serializer).DeserializeObject <PlayFabJsonSuccess <ListMembershipOpportunitiesResponse> >(resultRawJson); var result = resultData.data; return(new PlayFabResult <ListMembershipOpportunitiesResponse> { Result = result, CustomData = customData }); }
/// <summary> /// Lists all outstanding invitations and group applications for an entity /// </summary> public static void ListMembershipOpportunities(ListMembershipOpportunitiesRequest request, Action <ListMembershipOpportunitiesResponse> resultCallback, Action <PlayFabError> errorCallback, object customData = null, Dictionary <string, string> extraHeaders = null) { PlayFabHttp.MakeApiCall("/Group/ListMembershipOpportunities", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders); }
/// <summary> /// Lists all outstanding invitations and group applications for an entity /// </summary> public void ListMembershipOpportunities(ListMembershipOpportunitiesRequest request, Action <ListMembershipOpportunitiesResponse> resultCallback, Action <PlayFabError> errorCallback, object customData = null, Dictionary <string, string> extraHeaders = null) { var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; PlayFabHttp.MakeApiCall("/Group/ListMembershipOpportunities", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, apiSettings, this); }