public static void ReportAdActivity(ReportAdActivityRequest request, Action <ReportAdActivityResponse> resultCallback, Action <PlayFab.PlayFabError> errorCallback, object customData = null) { if (!PlayFabHttp.IsClientLoggedIn()) { throw new Exception("Must be logged in to call this method"); } PlayFabHttp.MakeApiCall("/Client/ReportAdActivity", request, AuthType.LoginSession, resultCallback, errorCallback, customData); }
public static void ReportAdActivity(ReportAdActivityRequest request, Action <ReportAdActivityResponse> resultCallback, Action <PlayFab.PlayFabError> errorCallback, object customData = null, Dictionary <string, string> extraHeaders = null) { // var context = (request == null ? null : request.AuthenticationContext) ?? PlayFab.PlayFabSettings.staticPlayer; if (!PlayFab.PlayFabClientAPI.IsClientLoggedIn()) { throw new PlayFab.PlayFabException(PlayFab.PlayFabExceptionCode.NotLoggedIn, "Must be logged in to call this method"); } PlayFabHttp.MakeApiCall("/Client/ReportAdActivity", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders); }
/// <summary> /// アクティビティの報告 /// </summary> /// <param name="activity">PlayFabのアクティビティ</param> public async void ReportAdActivity(AdActivity activity) { var request = new ReportAdActivityRequest { PlacementId = PlacementId, RewardId = RewardId, Activity = activity }; var result = await PlayFabClientAPI.ReportAdActivityAsync(request); if (result.Error != null) { Debug.Log(result.Error.GenerateErrorReport()); } else { if (activity == AdActivity.End) { RewardAdActivityAsync(); } } }