Added PlayFab
parent
761fe0f0e3
commit
37a4b5bee8
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e53d5e839d5caa945b9b859abe15689b
|
||||
folderAsset: yes
|
||||
timeCreated: 1558474635
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4592bb1110a6b1e4dacb06b424cd2759
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,390 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.AddonModels;
|
||||
using PlayFab.Internal;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// APIs for managing addons.
|
||||
/// </summary>
|
||||
public static class PlayFabAddonAPI
|
||||
{
|
||||
static PlayFabAddonAPI() {}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public static bool IsEntityLoggedIn()
|
||||
{
|
||||
return PlayFabSettings.staticPlayer.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public static void ForgetAllCredentials()
|
||||
{
|
||||
PlayFabSettings.staticPlayer.ForgetAllCredentials();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Apple addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public static void CreateOrUpdateApple(CreateOrUpdateAppleRequest request, Action<CreateOrUpdateAppleResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Facebook addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public static void CreateOrUpdateFacebook(CreateOrUpdateFacebookRequest request, Action<CreateOrUpdateFacebookResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Facebook Instant Games addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public static void CreateOrUpdateFacebookInstantGames(CreateOrUpdateFacebookInstantGamesRequest request, Action<CreateOrUpdateFacebookInstantGamesResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Google addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public static void CreateOrUpdateGoogle(CreateOrUpdateGoogleRequest request, Action<CreateOrUpdateGoogleResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Kongregate addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public static void CreateOrUpdateKongregate(CreateOrUpdateKongregateRequest request, Action<CreateOrUpdateKongregateResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Nintendo addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public static void CreateOrUpdateNintendo(CreateOrUpdateNintendoRequest request, Action<CreateOrUpdateNintendoResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the PSN addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public static void CreateOrUpdatePSN(CreateOrUpdatePSNRequest request, Action<CreateOrUpdatePSNResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdatePSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Steam addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public static void CreateOrUpdateSteam(CreateOrUpdateSteamRequest request, Action<CreateOrUpdateSteamResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Twitch addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public static void CreateOrUpdateTwitch(CreateOrUpdateTwitchRequest request, Action<CreateOrUpdateTwitchResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Apple addon on a title.
|
||||
/// </summary>
|
||||
public static void DeleteApple(DeleteAppleRequest request, Action<DeleteAppleResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/DeleteApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Facebook addon on a title.
|
||||
/// </summary>
|
||||
public static void DeleteFacebook(DeleteFacebookRequest request, Action<DeleteFacebookResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/DeleteFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Facebook addon on a title.
|
||||
/// </summary>
|
||||
public static void DeleteFacebookInstantGames(DeleteFacebookInstantGamesRequest request, Action<DeleteFacebookInstantGamesResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/DeleteFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Google addon on a title.
|
||||
/// </summary>
|
||||
public static void DeleteGoogle(DeleteGoogleRequest request, Action<DeleteGoogleResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/DeleteGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Kongregate addon on a title.
|
||||
/// </summary>
|
||||
public static void DeleteKongregate(DeleteKongregateRequest request, Action<DeleteKongregateResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/DeleteKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Nintendo addon on a title.
|
||||
/// </summary>
|
||||
public static void DeleteNintendo(DeleteNintendoRequest request, Action<DeleteNintendoResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/DeleteNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the PSN addon on a title.
|
||||
/// </summary>
|
||||
public static void DeletePSN(DeletePSNRequest request, Action<DeletePSNResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/DeletePSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Steam addon on a title.
|
||||
/// </summary>
|
||||
public static void DeleteSteam(DeleteSteamRequest request, Action<DeleteSteamResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/DeleteSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Twitch addon on a title.
|
||||
/// </summary>
|
||||
public static void DeleteTwitch(DeleteTwitchRequest request, Action<DeleteTwitchResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/DeleteTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Apple addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public static void GetApple(GetAppleRequest request, Action<GetAppleResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/GetApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Facebook addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public static void GetFacebook(GetFacebookRequest request, Action<GetFacebookResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/GetFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Facebook Instant Games addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public static void GetFacebookInstantGames(GetFacebookInstantGamesRequest request, Action<GetFacebookInstantGamesResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/GetFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Google addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public static void GetGoogle(GetGoogleRequest request, Action<GetGoogleResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/GetGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Kongregate addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public static void GetKongregate(GetKongregateRequest request, Action<GetKongregateResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/GetKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Nintendo addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public static void GetNintendo(GetNintendoRequest request, Action<GetNintendoResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/GetNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the PSN addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public static void GetPSN(GetPSNRequest request, Action<GetPSNResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/GetPSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Steam addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public static void GetSteam(GetSteamRequest request, Action<GetSteamResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/GetSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Twitch addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public static void GetTwitch(GetTwitchRequest request, Action<GetTwitchResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Addon/GetTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16e6981cbc311934bab9111885dbfc1a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,354 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.AddonModels;
|
||||
using PlayFab.Internal;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// APIs for managing addons.
|
||||
/// </summary>
|
||||
public class PlayFabAddonInstanceAPI : IPlayFabInstanceApi
|
||||
{
|
||||
public readonly PlayFabApiSettings apiSettings = null;
|
||||
public readonly PlayFabAuthenticationContext authenticationContext = null;
|
||||
|
||||
public PlayFabAddonInstanceAPI(PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
public PlayFabAddonInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
apiSettings = settings;
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public bool IsEntityLoggedIn()
|
||||
{
|
||||
return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public void ForgetAllCredentials()
|
||||
{
|
||||
if (authenticationContext != null)
|
||||
{
|
||||
authenticationContext.ForgetAllCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Apple addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public void CreateOrUpdateApple(CreateOrUpdateAppleRequest request, Action<CreateOrUpdateAppleResponse> 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("/Addon/CreateOrUpdateApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Facebook addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public void CreateOrUpdateFacebook(CreateOrUpdateFacebookRequest request, Action<CreateOrUpdateFacebookResponse> 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("/Addon/CreateOrUpdateFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Facebook Instant Games addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public void CreateOrUpdateFacebookInstantGames(CreateOrUpdateFacebookInstantGamesRequest request, Action<CreateOrUpdateFacebookInstantGamesResponse> 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("/Addon/CreateOrUpdateFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Google addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public void CreateOrUpdateGoogle(CreateOrUpdateGoogleRequest request, Action<CreateOrUpdateGoogleResponse> 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("/Addon/CreateOrUpdateGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Kongregate addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public void CreateOrUpdateKongregate(CreateOrUpdateKongregateRequest request, Action<CreateOrUpdateKongregateResponse> 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("/Addon/CreateOrUpdateKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Nintendo addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public void CreateOrUpdateNintendo(CreateOrUpdateNintendoRequest request, Action<CreateOrUpdateNintendoResponse> 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("/Addon/CreateOrUpdateNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the PSN addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public void CreateOrUpdatePSN(CreateOrUpdatePSNRequest request, Action<CreateOrUpdatePSNResponse> 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("/Addon/CreateOrUpdatePSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Steam addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public void CreateOrUpdateSteam(CreateOrUpdateSteamRequest request, Action<CreateOrUpdateSteamResponse> 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("/Addon/CreateOrUpdateSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Twitch addon on a title, or updates it if it already exists.
|
||||
/// </summary>
|
||||
public void CreateOrUpdateTwitch(CreateOrUpdateTwitchRequest request, Action<CreateOrUpdateTwitchResponse> 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("/Addon/CreateOrUpdateTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Apple addon on a title.
|
||||
/// </summary>
|
||||
public void DeleteApple(DeleteAppleRequest request, Action<DeleteAppleResponse> 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("/Addon/DeleteApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Facebook addon on a title.
|
||||
/// </summary>
|
||||
public void DeleteFacebook(DeleteFacebookRequest request, Action<DeleteFacebookResponse> 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("/Addon/DeleteFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Facebook addon on a title.
|
||||
/// </summary>
|
||||
public void DeleteFacebookInstantGames(DeleteFacebookInstantGamesRequest request, Action<DeleteFacebookInstantGamesResponse> 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("/Addon/DeleteFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Google addon on a title.
|
||||
/// </summary>
|
||||
public void DeleteGoogle(DeleteGoogleRequest request, Action<DeleteGoogleResponse> 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("/Addon/DeleteGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Kongregate addon on a title.
|
||||
/// </summary>
|
||||
public void DeleteKongregate(DeleteKongregateRequest request, Action<DeleteKongregateResponse> 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("/Addon/DeleteKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Nintendo addon on a title.
|
||||
/// </summary>
|
||||
public void DeleteNintendo(DeleteNintendoRequest request, Action<DeleteNintendoResponse> 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("/Addon/DeleteNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the PSN addon on a title.
|
||||
/// </summary>
|
||||
public void DeletePSN(DeletePSNRequest request, Action<DeletePSNResponse> 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("/Addon/DeletePSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Steam addon on a title.
|
||||
/// </summary>
|
||||
public void DeleteSteam(DeleteSteamRequest request, Action<DeleteSteamResponse> 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("/Addon/DeleteSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the Twitch addon on a title.
|
||||
/// </summary>
|
||||
public void DeleteTwitch(DeleteTwitchRequest request, Action<DeleteTwitchResponse> 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("/Addon/DeleteTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Apple addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public void GetApple(GetAppleRequest request, Action<GetAppleResponse> 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("/Addon/GetApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Facebook addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public void GetFacebook(GetFacebookRequest request, Action<GetFacebookResponse> 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("/Addon/GetFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Facebook Instant Games addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public void GetFacebookInstantGames(GetFacebookInstantGamesRequest request, Action<GetFacebookInstantGamesResponse> 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("/Addon/GetFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Google addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public void GetGoogle(GetGoogleRequest request, Action<GetGoogleResponse> 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("/Addon/GetGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Kongregate addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public void GetKongregate(GetKongregateRequest request, Action<GetKongregateResponse> 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("/Addon/GetKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Nintendo addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public void GetNintendo(GetNintendoRequest request, Action<GetNintendoResponse> 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("/Addon/GetNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the PSN addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public void GetPSN(GetPSNRequest request, Action<GetPSNResponse> 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("/Addon/GetPSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Steam addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public void GetSteam(GetSteamRequest request, Action<GetSteamResponse> 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("/Addon/GetSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information of the Twitch addon on a title, omits secrets.
|
||||
/// </summary>
|
||||
public void GetTwitch(GetTwitchRequest request, Action<GetTwitchResponse> 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("/Addon/GetTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb16ee30d77a0bd4095b94a53a375676
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,793 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab.AddonModels
|
||||
{
|
||||
[Serializable]
|
||||
public class CreateOrUpdateAppleRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// iOS App Bundle ID obtained after setting up your app in the App Store.
|
||||
/// </summary>
|
||||
public string AppBundleId;
|
||||
/// <summary>
|
||||
/// iOS App Shared Secret obtained after setting up your app in the App Store.
|
||||
/// </summary>
|
||||
public string AppSharedSecret;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// If an error should be returned if the addon already exists.
|
||||
/// </summary>
|
||||
public bool? ErrorIfExists;
|
||||
/// <summary>
|
||||
/// Ignore expiration date for identity tokens. Be aware that when set to true this can invalidate expired tokens in the
|
||||
/// case where Apple rotates their signing keys.
|
||||
/// </summary>
|
||||
public bool? IgnoreExpirationDate;
|
||||
/// <summary>
|
||||
/// Require secure authentication only for this app.
|
||||
/// </summary>
|
||||
public bool? RequireSecureAuthentication;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateAppleResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateFacebookInstantGamesRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Facebook App ID obtained after setting up your app in Facebook Instant Games.
|
||||
/// </summary>
|
||||
public string AppID;
|
||||
/// <summary>
|
||||
/// Facebook App Secret obtained after setting up your app in Facebook Instant Games.
|
||||
/// </summary>
|
||||
public string AppSecret;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// If an error should be returned if the addon already exists.
|
||||
/// </summary>
|
||||
public bool? ErrorIfExists;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateFacebookInstantGamesResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateFacebookRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Facebook App ID obtained after setting up your app in Facebook.
|
||||
/// </summary>
|
||||
public string AppID;
|
||||
/// <summary>
|
||||
/// Facebook App Secret obtained after setting up your app in Facebook.
|
||||
/// </summary>
|
||||
public string AppSecret;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// If an error should be returned if the addon already exists.
|
||||
/// </summary>
|
||||
public bool? ErrorIfExists;
|
||||
/// <summary>
|
||||
/// Email address for purchase dispute notifications.
|
||||
/// </summary>
|
||||
public string NotificationEmail;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateFacebookResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateGoogleRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Google App License Key obtained after setting up your app in the Google Play developer portal. Required if using Google
|
||||
/// receipt validation.
|
||||
/// </summary>
|
||||
public string AppLicenseKey;
|
||||
/// <summary>
|
||||
/// Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google
|
||||
/// receipt validation.
|
||||
/// </summary>
|
||||
public string AppPackageID;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// If an error should be returned if the addon already exists.
|
||||
/// </summary>
|
||||
public bool? ErrorIfExists;
|
||||
/// <summary>
|
||||
/// Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID".
|
||||
/// Required if using Google Authentication.
|
||||
/// </summary>
|
||||
public string OAuthClientID;
|
||||
/// <summary>
|
||||
/// Google OAuth Client Secret obtained through the Google Developer Console by creating a new set of "OAuth Client ID".
|
||||
/// Required if using Google Authentication.
|
||||
/// </summary>
|
||||
public string OAuthClientSecret;
|
||||
/// <summary>
|
||||
/// Authorized Redirect Uri obtained through the Google Developer Console. This currently defaults to
|
||||
/// https://oauth.playfab.com/oauth2/google. If you are authenticating players via browser, please update this to your own
|
||||
/// domain.
|
||||
/// </summary>
|
||||
public string OAuthCustomRedirectUri;
|
||||
/// <summary>
|
||||
/// Needed to enable pending purchase handling and subscription processing.
|
||||
/// </summary>
|
||||
public string ServiceAccountKey;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateGoogleResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateKongregateRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// If an error should be returned if the addon already exists.
|
||||
/// </summary>
|
||||
public bool? ErrorIfExists;
|
||||
/// <summary>
|
||||
/// Kongregate Secret API Key obtained after setting up your game in your Kongregate developer account.
|
||||
/// </summary>
|
||||
public string SecretAPIKey;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateKongregateResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateNintendoRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Nintendo Switch Application ID, without the "0x" prefix.
|
||||
/// </summary>
|
||||
public string ApplicationID;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// List of Nintendo Environments, currently supporting up to 4. Needs Catalog enabled.
|
||||
/// </summary>
|
||||
public List<NintendoEnvironment> Environments;
|
||||
/// <summary>
|
||||
/// If an error should be returned if the addon already exists.
|
||||
/// </summary>
|
||||
public bool? ErrorIfExists;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateNintendoResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdatePSNRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace.
|
||||
/// </summary>
|
||||
public string ClientID;
|
||||
/// <summary>
|
||||
/// Client secret obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace.
|
||||
/// </summary>
|
||||
public string ClientSecret;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// If an error should be returned if the addon already exists.
|
||||
/// </summary>
|
||||
public bool? ErrorIfExists;
|
||||
/// <summary>
|
||||
/// Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which
|
||||
/// includes PS5, cross-generation for PS4, and unified entitlements.
|
||||
/// </summary>
|
||||
public string NextGenClientID;
|
||||
/// <summary>
|
||||
/// Client secret obtained after setting up your game with Sony. This one is associated with the modern marketplace, which
|
||||
/// includes PS5, cross-generation for PS4, and unified entitlements.
|
||||
/// </summary>
|
||||
public string NextGenClientSecret;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdatePSNResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateSteamRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Application ID obtained after setting up your app in Valve's developer portal.
|
||||
/// </summary>
|
||||
public string ApplicationId;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// Enforce usage of AzurePlayFab identity in user authentication tickets.
|
||||
/// </summary>
|
||||
public bool? EnforceServiceSpecificTickets;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// If an error should be returned if the addon already exists.
|
||||
/// </summary>
|
||||
public bool? ErrorIfExists;
|
||||
/// <summary>
|
||||
/// Sercet Key obtained after setting up your app in Valve's developer portal.
|
||||
/// </summary>
|
||||
public string SecretKey;
|
||||
/// <summary>
|
||||
/// Use Steam Payments sandbox endpoint for test transactions.
|
||||
/// </summary>
|
||||
public bool? UseSandbox;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateSteamResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateTwitchRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Client ID obtained after creating your Twitch developer account.
|
||||
/// </summary>
|
||||
public string ClientID;
|
||||
/// <summary>
|
||||
/// Client Secret obtained after creating your Twitch developer account.
|
||||
/// </summary>
|
||||
public string ClientSecret;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// If an error should be returned if the addon already exists.
|
||||
/// </summary>
|
||||
public bool? ErrorIfExists;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateOrUpdateTwitchResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteAppleRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteAppleResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteFacebookInstantGamesRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteFacebookInstantGamesResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteFacebookRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteFacebookResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteGoogleRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteGoogleResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteKongregateRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteKongregateResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteNintendoRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteNintendoResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeletePSNRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeletePSNResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteSteamRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteSteamResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteTwitchRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteTwitchResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Combined entity type and ID structure which uniquely identifies a single entity.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class EntityKey : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique ID of the entity.
|
||||
/// </summary>
|
||||
public string Id;
|
||||
/// <summary>
|
||||
/// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
|
||||
/// </summary>
|
||||
public string Type;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetAppleRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetAppleResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// iOS App Bundle ID obtained after setting up your app in the App Store.
|
||||
/// </summary>
|
||||
public string AppBundleId;
|
||||
/// <summary>
|
||||
/// Addon status.
|
||||
/// </summary>
|
||||
public bool Created;
|
||||
/// <summary>
|
||||
/// Ignore expiration date for identity tokens.
|
||||
/// </summary>
|
||||
public bool? IgnoreExpirationDate;
|
||||
/// <summary>
|
||||
/// Require secure authentication only for this app.
|
||||
/// </summary>
|
||||
public bool? RequireSecureAuthentication;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetFacebookInstantGamesRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetFacebookInstantGamesResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Facebook App ID obtained after setting up your app in Facebook Instant Games.
|
||||
/// </summary>
|
||||
public string AppID;
|
||||
/// <summary>
|
||||
/// Addon status.
|
||||
/// </summary>
|
||||
public bool Created;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetFacebookRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetFacebookResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Facebook App ID obtained after setting up your app in Facebook.
|
||||
/// </summary>
|
||||
public string AppID;
|
||||
/// <summary>
|
||||
/// Addon status.
|
||||
/// </summary>
|
||||
public bool Created;
|
||||
/// <summary>
|
||||
/// Email address for purchase dispute notifications.
|
||||
/// </summary>
|
||||
public string NotificationEmail;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetGoogleRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetGoogleResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google
|
||||
/// receipt validation.
|
||||
/// </summary>
|
||||
public string AppPackageID;
|
||||
/// <summary>
|
||||
/// Addon status.
|
||||
/// </summary>
|
||||
public bool Created;
|
||||
/// <summary>
|
||||
/// Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID".
|
||||
/// Required if using Google Authentication.
|
||||
/// </summary>
|
||||
public string OAuthClientID;
|
||||
/// <summary>
|
||||
/// Authorized Redirect Uri obtained through the Google Developer Console. This currently defaults to
|
||||
/// https://oauth.playfab.com/oauth2/google. If you are authenticating players via browser, please update this to your own
|
||||
/// domain.
|
||||
/// </summary>
|
||||
public string OauthCustomRedirectUri;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetKongregateRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetKongregateResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Addon status.
|
||||
/// </summary>
|
||||
public bool Created;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetNintendoRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetNintendoResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Nintendo Switch Application ID, without the "0x" prefix.
|
||||
/// </summary>
|
||||
public string ApplicationID;
|
||||
/// <summary>
|
||||
/// Addon status.
|
||||
/// </summary>
|
||||
public bool Created;
|
||||
/// <summary>
|
||||
/// List of Nintendo Environments, currently supporting up to 4.
|
||||
/// </summary>
|
||||
public List<NintendoEnvironment> Environments;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetPSNRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetPSNResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace.
|
||||
/// </summary>
|
||||
public string ClientID;
|
||||
/// <summary>
|
||||
/// Addon status.
|
||||
/// </summary>
|
||||
public bool Created;
|
||||
/// <summary>
|
||||
/// Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which
|
||||
/// includes PS5, cross-generation for PS4, and unified entitlements.
|
||||
/// </summary>
|
||||
public string NextGenClientID;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetSteamRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetSteamResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Application ID obtained after setting up your game in Valve's developer portal.
|
||||
/// </summary>
|
||||
public string ApplicationId;
|
||||
/// <summary>
|
||||
/// Addon status.
|
||||
/// </summary>
|
||||
public bool Created;
|
||||
/// <summary>
|
||||
/// Enforce usage of AzurePlayFab identity in user authentication tickets.
|
||||
/// </summary>
|
||||
public bool? EnforceServiceSpecificTickets;
|
||||
/// <summary>
|
||||
/// Use Steam Payments sandbox endpoint for test transactions.
|
||||
/// </summary>
|
||||
public bool? UseSandbox;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetTwitchRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetTwitchResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Client ID obtained after creating your Twitch developer account.
|
||||
/// </summary>
|
||||
public string ClientID;
|
||||
/// <summary>
|
||||
/// Addon status.
|
||||
/// </summary>
|
||||
public bool Created;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class NintendoEnvironment : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Client ID for the Nintendo Environment.
|
||||
/// </summary>
|
||||
public string ClientID;
|
||||
/// <summary>
|
||||
/// Client Secret for the Nintendo Environment.
|
||||
/// </summary>
|
||||
public string ClientSecret;
|
||||
/// <summary>
|
||||
/// ID for the Nintendo Environment.
|
||||
/// </summary>
|
||||
public string ID;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87ffcc7751ee8d54a9effc1467d73c87
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,64 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using PlayFab.AddonModels;
|
||||
|
||||
namespace PlayFab.Events
|
||||
{
|
||||
public partial class PlayFabEvents
|
||||
{
|
||||
public event PlayFabRequestEvent<CreateOrUpdateAppleRequest> OnAddonCreateOrUpdateAppleRequestEvent;
|
||||
public event PlayFabResultEvent<CreateOrUpdateAppleResponse> OnAddonCreateOrUpdateAppleResultEvent;
|
||||
public event PlayFabRequestEvent<CreateOrUpdateFacebookRequest> OnAddonCreateOrUpdateFacebookRequestEvent;
|
||||
public event PlayFabResultEvent<CreateOrUpdateFacebookResponse> OnAddonCreateOrUpdateFacebookResultEvent;
|
||||
public event PlayFabRequestEvent<CreateOrUpdateFacebookInstantGamesRequest> OnAddonCreateOrUpdateFacebookInstantGamesRequestEvent;
|
||||
public event PlayFabResultEvent<CreateOrUpdateFacebookInstantGamesResponse> OnAddonCreateOrUpdateFacebookInstantGamesResultEvent;
|
||||
public event PlayFabRequestEvent<CreateOrUpdateGoogleRequest> OnAddonCreateOrUpdateGoogleRequestEvent;
|
||||
public event PlayFabResultEvent<CreateOrUpdateGoogleResponse> OnAddonCreateOrUpdateGoogleResultEvent;
|
||||
public event PlayFabRequestEvent<CreateOrUpdateKongregateRequest> OnAddonCreateOrUpdateKongregateRequestEvent;
|
||||
public event PlayFabResultEvent<CreateOrUpdateKongregateResponse> OnAddonCreateOrUpdateKongregateResultEvent;
|
||||
public event PlayFabRequestEvent<CreateOrUpdateNintendoRequest> OnAddonCreateOrUpdateNintendoRequestEvent;
|
||||
public event PlayFabResultEvent<CreateOrUpdateNintendoResponse> OnAddonCreateOrUpdateNintendoResultEvent;
|
||||
public event PlayFabRequestEvent<CreateOrUpdatePSNRequest> OnAddonCreateOrUpdatePSNRequestEvent;
|
||||
public event PlayFabResultEvent<CreateOrUpdatePSNResponse> OnAddonCreateOrUpdatePSNResultEvent;
|
||||
public event PlayFabRequestEvent<CreateOrUpdateSteamRequest> OnAddonCreateOrUpdateSteamRequestEvent;
|
||||
public event PlayFabResultEvent<CreateOrUpdateSteamResponse> OnAddonCreateOrUpdateSteamResultEvent;
|
||||
public event PlayFabRequestEvent<CreateOrUpdateTwitchRequest> OnAddonCreateOrUpdateTwitchRequestEvent;
|
||||
public event PlayFabResultEvent<CreateOrUpdateTwitchResponse> OnAddonCreateOrUpdateTwitchResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteAppleRequest> OnAddonDeleteAppleRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteAppleResponse> OnAddonDeleteAppleResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteFacebookRequest> OnAddonDeleteFacebookRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteFacebookResponse> OnAddonDeleteFacebookResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteFacebookInstantGamesRequest> OnAddonDeleteFacebookInstantGamesRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteFacebookInstantGamesResponse> OnAddonDeleteFacebookInstantGamesResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteGoogleRequest> OnAddonDeleteGoogleRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteGoogleResponse> OnAddonDeleteGoogleResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteKongregateRequest> OnAddonDeleteKongregateRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteKongregateResponse> OnAddonDeleteKongregateResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteNintendoRequest> OnAddonDeleteNintendoRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteNintendoResponse> OnAddonDeleteNintendoResultEvent;
|
||||
public event PlayFabRequestEvent<DeletePSNRequest> OnAddonDeletePSNRequestEvent;
|
||||
public event PlayFabResultEvent<DeletePSNResponse> OnAddonDeletePSNResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteSteamRequest> OnAddonDeleteSteamRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteSteamResponse> OnAddonDeleteSteamResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteTwitchRequest> OnAddonDeleteTwitchRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteTwitchResponse> OnAddonDeleteTwitchResultEvent;
|
||||
public event PlayFabRequestEvent<GetAppleRequest> OnAddonGetAppleRequestEvent;
|
||||
public event PlayFabResultEvent<GetAppleResponse> OnAddonGetAppleResultEvent;
|
||||
public event PlayFabRequestEvent<GetFacebookRequest> OnAddonGetFacebookRequestEvent;
|
||||
public event PlayFabResultEvent<GetFacebookResponse> OnAddonGetFacebookResultEvent;
|
||||
public event PlayFabRequestEvent<GetFacebookInstantGamesRequest> OnAddonGetFacebookInstantGamesRequestEvent;
|
||||
public event PlayFabResultEvent<GetFacebookInstantGamesResponse> OnAddonGetFacebookInstantGamesResultEvent;
|
||||
public event PlayFabRequestEvent<GetGoogleRequest> OnAddonGetGoogleRequestEvent;
|
||||
public event PlayFabResultEvent<GetGoogleResponse> OnAddonGetGoogleResultEvent;
|
||||
public event PlayFabRequestEvent<GetKongregateRequest> OnAddonGetKongregateRequestEvent;
|
||||
public event PlayFabResultEvent<GetKongregateResponse> OnAddonGetKongregateResultEvent;
|
||||
public event PlayFabRequestEvent<GetNintendoRequest> OnAddonGetNintendoRequestEvent;
|
||||
public event PlayFabResultEvent<GetNintendoResponse> OnAddonGetNintendoResultEvent;
|
||||
public event PlayFabRequestEvent<GetPSNRequest> OnAddonGetPSNRequestEvent;
|
||||
public event PlayFabResultEvent<GetPSNResponse> OnAddonGetPSNResultEvent;
|
||||
public event PlayFabRequestEvent<GetSteamRequest> OnAddonGetSteamRequestEvent;
|
||||
public event PlayFabResultEvent<GetSteamResponse> OnAddonGetSteamResultEvent;
|
||||
public event PlayFabRequestEvent<GetTwitchRequest> OnAddonGetTwitchRequestEvent;
|
||||
public event PlayFabResultEvent<GetTwitchResponse> OnAddonGetTwitchResultEvent;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d196246361876214999b16fe616a0f32
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f80b73ed5fc053a409c5e9347d9c609a
|
||||
folderAsset: yes
|
||||
timeCreated: 1468524875
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98aa7d0b4d53fe24392fc8cc52120845
|
||||
timeCreated: 1468524876
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 942c3c5d808dfed49b4c4369cc282d49
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d7a769446de4b7459591c36c05197ed
|
||||
timeCreated: 1468524875
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,236 @@
|
||||
#if ENABLE_PLAYFABADMIN_API
|
||||
using PlayFab.AdminModels;
|
||||
|
||||
namespace PlayFab.Events
|
||||
{
|
||||
public partial class PlayFabEvents
|
||||
{
|
||||
public event PlayFabRequestEvent<AbortTaskInstanceRequest> OnAdminAbortTaskInstanceRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnAdminAbortTaskInstanceResultEvent;
|
||||
public event PlayFabRequestEvent<AddLocalizedNewsRequest> OnAdminAddLocalizedNewsRequestEvent;
|
||||
public event PlayFabResultEvent<AddLocalizedNewsResult> OnAdminAddLocalizedNewsResultEvent;
|
||||
public event PlayFabRequestEvent<AddNewsRequest> OnAdminAddNewsRequestEvent;
|
||||
public event PlayFabResultEvent<AddNewsResult> OnAdminAddNewsResultEvent;
|
||||
public event PlayFabRequestEvent<AddPlayerTagRequest> OnAdminAddPlayerTagRequestEvent;
|
||||
public event PlayFabResultEvent<AddPlayerTagResult> OnAdminAddPlayerTagResultEvent;
|
||||
public event PlayFabRequestEvent<AddUserVirtualCurrencyRequest> OnAdminAddUserVirtualCurrencyRequestEvent;
|
||||
public event PlayFabResultEvent<ModifyUserVirtualCurrencyResult> OnAdminAddUserVirtualCurrencyResultEvent;
|
||||
public event PlayFabRequestEvent<AddVirtualCurrencyTypesRequest> OnAdminAddVirtualCurrencyTypesRequestEvent;
|
||||
public event PlayFabResultEvent<BlankResult> OnAdminAddVirtualCurrencyTypesResultEvent;
|
||||
public event PlayFabRequestEvent<BanUsersRequest> OnAdminBanUsersRequestEvent;
|
||||
public event PlayFabResultEvent<BanUsersResult> OnAdminBanUsersResultEvent;
|
||||
public event PlayFabRequestEvent<CheckLimitedEditionItemAvailabilityRequest> OnAdminCheckLimitedEditionItemAvailabilityRequestEvent;
|
||||
public event PlayFabResultEvent<CheckLimitedEditionItemAvailabilityResult> OnAdminCheckLimitedEditionItemAvailabilityResultEvent;
|
||||
public event PlayFabRequestEvent<CreateActionsOnPlayerSegmentTaskRequest> OnAdminCreateActionsOnPlayersInSegmentTaskRequestEvent;
|
||||
public event PlayFabResultEvent<CreateTaskResult> OnAdminCreateActionsOnPlayersInSegmentTaskResultEvent;
|
||||
public event PlayFabRequestEvent<CreateCloudScriptTaskRequest> OnAdminCreateCloudScriptTaskRequestEvent;
|
||||
public event PlayFabResultEvent<CreateTaskResult> OnAdminCreateCloudScriptTaskResultEvent;
|
||||
public event PlayFabRequestEvent<CreateInsightsScheduledScalingTaskRequest> OnAdminCreateInsightsScheduledScalingTaskRequestEvent;
|
||||
public event PlayFabResultEvent<CreateTaskResult> OnAdminCreateInsightsScheduledScalingTaskResultEvent;
|
||||
public event PlayFabRequestEvent<CreateOpenIdConnectionRequest> OnAdminCreateOpenIdConnectionRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnAdminCreateOpenIdConnectionResultEvent;
|
||||
public event PlayFabRequestEvent<CreatePlayerSharedSecretRequest> OnAdminCreatePlayerSharedSecretRequestEvent;
|
||||
public event PlayFabResultEvent<CreatePlayerSharedSecretResult> OnAdminCreatePlayerSharedSecretResultEvent;
|
||||
public event PlayFabRequestEvent<CreatePlayerStatisticDefinitionRequest> OnAdminCreatePlayerStatisticDefinitionRequestEvent;
|
||||
public event PlayFabResultEvent<CreatePlayerStatisticDefinitionResult> OnAdminCreatePlayerStatisticDefinitionResultEvent;
|
||||
public event PlayFabRequestEvent<CreateSegmentRequest> OnAdminCreateSegmentRequestEvent;
|
||||
public event PlayFabResultEvent<CreateSegmentResponse> OnAdminCreateSegmentResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteContentRequest> OnAdminDeleteContentRequestEvent;
|
||||
public event PlayFabResultEvent<BlankResult> OnAdminDeleteContentResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteMasterPlayerAccountRequest> OnAdminDeleteMasterPlayerAccountRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteMasterPlayerAccountResult> OnAdminDeleteMasterPlayerAccountResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteMasterPlayerEventDataRequest> OnAdminDeleteMasterPlayerEventDataRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteMasterPlayerEventDataResult> OnAdminDeleteMasterPlayerEventDataResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteMembershipSubscriptionRequest> OnAdminDeleteMembershipSubscriptionRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteMembershipSubscriptionResult> OnAdminDeleteMembershipSubscriptionResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteOpenIdConnectionRequest> OnAdminDeleteOpenIdConnectionRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnAdminDeleteOpenIdConnectionResultEvent;
|
||||
public event PlayFabRequestEvent<DeletePlayerRequest> OnAdminDeletePlayerRequestEvent;
|
||||
public event PlayFabResultEvent<DeletePlayerResult> OnAdminDeletePlayerResultEvent;
|
||||
public event PlayFabRequestEvent<DeletePlayerSharedSecretRequest> OnAdminDeletePlayerSharedSecretRequestEvent;
|
||||
public event PlayFabResultEvent<DeletePlayerSharedSecretResult> OnAdminDeletePlayerSharedSecretResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteSegmentRequest> OnAdminDeleteSegmentRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteSegmentsResponse> OnAdminDeleteSegmentResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteStoreRequest> OnAdminDeleteStoreRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteStoreResult> OnAdminDeleteStoreResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteTaskRequest> OnAdminDeleteTaskRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnAdminDeleteTaskResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteTitleRequest> OnAdminDeleteTitleRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteTitleResult> OnAdminDeleteTitleResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteTitleDataOverrideRequest> OnAdminDeleteTitleDataOverrideRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteTitleDataOverrideResult> OnAdminDeleteTitleDataOverrideResultEvent;
|
||||
public event PlayFabRequestEvent<ExportMasterPlayerDataRequest> OnAdminExportMasterPlayerDataRequestEvent;
|
||||
public event PlayFabResultEvent<ExportMasterPlayerDataResult> OnAdminExportMasterPlayerDataResultEvent;
|
||||
public event PlayFabRequestEvent<ExportPlayersInSegmentRequest> OnAdminExportPlayersInSegmentRequestEvent;
|
||||
public event PlayFabResultEvent<ExportPlayersInSegmentResult> OnAdminExportPlayersInSegmentResultEvent;
|
||||
public event PlayFabRequestEvent<GetTaskInstanceRequest> OnAdminGetActionsOnPlayersInSegmentTaskInstanceRequestEvent;
|
||||
public event PlayFabResultEvent<GetActionsOnPlayersInSegmentTaskInstanceResult> OnAdminGetActionsOnPlayersInSegmentTaskInstanceResultEvent;
|
||||
public event PlayFabRequestEvent<GetAllSegmentsRequest> OnAdminGetAllSegmentsRequestEvent;
|
||||
public event PlayFabResultEvent<GetAllSegmentsResult> OnAdminGetAllSegmentsResultEvent;
|
||||
public event PlayFabRequestEvent<GetCatalogItemsRequest> OnAdminGetCatalogItemsRequestEvent;
|
||||
public event PlayFabResultEvent<GetCatalogItemsResult> OnAdminGetCatalogItemsResultEvent;
|
||||
public event PlayFabRequestEvent<GetCloudScriptRevisionRequest> OnAdminGetCloudScriptRevisionRequestEvent;
|
||||
public event PlayFabResultEvent<GetCloudScriptRevisionResult> OnAdminGetCloudScriptRevisionResultEvent;
|
||||
public event PlayFabRequestEvent<GetTaskInstanceRequest> OnAdminGetCloudScriptTaskInstanceRequestEvent;
|
||||
public event PlayFabResultEvent<GetCloudScriptTaskInstanceResult> OnAdminGetCloudScriptTaskInstanceResultEvent;
|
||||
public event PlayFabRequestEvent<GetCloudScriptVersionsRequest> OnAdminGetCloudScriptVersionsRequestEvent;
|
||||
public event PlayFabResultEvent<GetCloudScriptVersionsResult> OnAdminGetCloudScriptVersionsResultEvent;
|
||||
public event PlayFabRequestEvent<GetContentListRequest> OnAdminGetContentListRequestEvent;
|
||||
public event PlayFabResultEvent<GetContentListResult> OnAdminGetContentListResultEvent;
|
||||
public event PlayFabRequestEvent<GetContentUploadUrlRequest> OnAdminGetContentUploadUrlRequestEvent;
|
||||
public event PlayFabResultEvent<GetContentUploadUrlResult> OnAdminGetContentUploadUrlResultEvent;
|
||||
public event PlayFabRequestEvent<GetDataReportRequest> OnAdminGetDataReportRequestEvent;
|
||||
public event PlayFabResultEvent<GetDataReportResult> OnAdminGetDataReportResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayedTitleListRequest> OnAdminGetPlayedTitleListRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayedTitleListResult> OnAdminGetPlayedTitleListResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerIdFromAuthTokenRequest> OnAdminGetPlayerIdFromAuthTokenRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerIdFromAuthTokenResult> OnAdminGetPlayerIdFromAuthTokenResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerProfileRequest> OnAdminGetPlayerProfileRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerProfileResult> OnAdminGetPlayerProfileResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayersSegmentsRequest> OnAdminGetPlayerSegmentsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerSegmentsResult> OnAdminGetPlayerSegmentsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerSharedSecretsRequest> OnAdminGetPlayerSharedSecretsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerSharedSecretsResult> OnAdminGetPlayerSharedSecretsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayersInSegmentRequest> OnAdminGetPlayersInSegmentRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayersInSegmentResult> OnAdminGetPlayersInSegmentResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerStatisticDefinitionsRequest> OnAdminGetPlayerStatisticDefinitionsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerStatisticDefinitionsResult> OnAdminGetPlayerStatisticDefinitionsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerStatisticVersionsRequest> OnAdminGetPlayerStatisticVersionsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerStatisticVersionsResult> OnAdminGetPlayerStatisticVersionsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerTagsRequest> OnAdminGetPlayerTagsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerTagsResult> OnAdminGetPlayerTagsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPolicyRequest> OnAdminGetPolicyRequestEvent;
|
||||
public event PlayFabResultEvent<GetPolicyResponse> OnAdminGetPolicyResultEvent;
|
||||
public event PlayFabRequestEvent<GetPublisherDataRequest> OnAdminGetPublisherDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetPublisherDataResult> OnAdminGetPublisherDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetRandomResultTablesRequest> OnAdminGetRandomResultTablesRequestEvent;
|
||||
public event PlayFabResultEvent<GetRandomResultTablesResult> OnAdminGetRandomResultTablesResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayersInSegmentExportRequest> OnAdminGetSegmentExportRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayersInSegmentExportResponse> OnAdminGetSegmentExportResultEvent;
|
||||
public event PlayFabRequestEvent<GetSegmentsRequest> OnAdminGetSegmentsRequestEvent;
|
||||
public event PlayFabResultEvent<GetSegmentsResponse> OnAdminGetSegmentsResultEvent;
|
||||
public event PlayFabRequestEvent<GetStoreItemsRequest> OnAdminGetStoreItemsRequestEvent;
|
||||
public event PlayFabResultEvent<GetStoreItemsResult> OnAdminGetStoreItemsResultEvent;
|
||||
public event PlayFabRequestEvent<GetTaskInstancesRequest> OnAdminGetTaskInstancesRequestEvent;
|
||||
public event PlayFabResultEvent<GetTaskInstancesResult> OnAdminGetTaskInstancesResultEvent;
|
||||
public event PlayFabRequestEvent<GetTasksRequest> OnAdminGetTasksRequestEvent;
|
||||
public event PlayFabResultEvent<GetTasksResult> OnAdminGetTasksResultEvent;
|
||||
public event PlayFabRequestEvent<GetTitleDataRequest> OnAdminGetTitleDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetTitleDataResult> OnAdminGetTitleDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetTitleDataRequest> OnAdminGetTitleInternalDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetTitleDataResult> OnAdminGetTitleInternalDataResultEvent;
|
||||
public event PlayFabRequestEvent<LookupUserAccountInfoRequest> OnAdminGetUserAccountInfoRequestEvent;
|
||||
public event PlayFabResultEvent<LookupUserAccountInfoResult> OnAdminGetUserAccountInfoResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserBansRequest> OnAdminGetUserBansRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserBansResult> OnAdminGetUserBansResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserDataRequest> OnAdminGetUserDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserDataResult> OnAdminGetUserDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserDataRequest> OnAdminGetUserInternalDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserDataResult> OnAdminGetUserInternalDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserInventoryRequest> OnAdminGetUserInventoryRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserInventoryResult> OnAdminGetUserInventoryResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserDataRequest> OnAdminGetUserPublisherDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserDataResult> OnAdminGetUserPublisherDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserDataRequest> OnAdminGetUserPublisherInternalDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserDataResult> OnAdminGetUserPublisherInternalDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserDataRequest> OnAdminGetUserPublisherReadOnlyDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserDataResult> OnAdminGetUserPublisherReadOnlyDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserDataRequest> OnAdminGetUserReadOnlyDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserDataResult> OnAdminGetUserReadOnlyDataResultEvent;
|
||||
public event PlayFabRequestEvent<GrantItemsToUsersRequest> OnAdminGrantItemsToUsersRequestEvent;
|
||||
public event PlayFabResultEvent<GrantItemsToUsersResult> OnAdminGrantItemsToUsersResultEvent;
|
||||
public event PlayFabRequestEvent<IncrementLimitedEditionItemAvailabilityRequest> OnAdminIncrementLimitedEditionItemAvailabilityRequestEvent;
|
||||
public event PlayFabResultEvent<IncrementLimitedEditionItemAvailabilityResult> OnAdminIncrementLimitedEditionItemAvailabilityResultEvent;
|
||||
public event PlayFabRequestEvent<IncrementPlayerStatisticVersionRequest> OnAdminIncrementPlayerStatisticVersionRequestEvent;
|
||||
public event PlayFabResultEvent<IncrementPlayerStatisticVersionResult> OnAdminIncrementPlayerStatisticVersionResultEvent;
|
||||
public event PlayFabRequestEvent<ListOpenIdConnectionRequest> OnAdminListOpenIdConnectionRequestEvent;
|
||||
public event PlayFabResultEvent<ListOpenIdConnectionResponse> OnAdminListOpenIdConnectionResultEvent;
|
||||
public event PlayFabRequestEvent<ListVirtualCurrencyTypesRequest> OnAdminListVirtualCurrencyTypesRequestEvent;
|
||||
public event PlayFabResultEvent<ListVirtualCurrencyTypesResult> OnAdminListVirtualCurrencyTypesResultEvent;
|
||||
public event PlayFabRequestEvent<RefundPurchaseRequest> OnAdminRefundPurchaseRequestEvent;
|
||||
public event PlayFabResultEvent<RefundPurchaseResponse> OnAdminRefundPurchaseResultEvent;
|
||||
public event PlayFabRequestEvent<RemovePlayerTagRequest> OnAdminRemovePlayerTagRequestEvent;
|
||||
public event PlayFabResultEvent<RemovePlayerTagResult> OnAdminRemovePlayerTagResultEvent;
|
||||
public event PlayFabRequestEvent<RemoveVirtualCurrencyTypesRequest> OnAdminRemoveVirtualCurrencyTypesRequestEvent;
|
||||
public event PlayFabResultEvent<BlankResult> OnAdminRemoveVirtualCurrencyTypesResultEvent;
|
||||
public event PlayFabRequestEvent<ResetCharacterStatisticsRequest> OnAdminResetCharacterStatisticsRequestEvent;
|
||||
public event PlayFabResultEvent<ResetCharacterStatisticsResult> OnAdminResetCharacterStatisticsResultEvent;
|
||||
public event PlayFabRequestEvent<ResetPasswordRequest> OnAdminResetPasswordRequestEvent;
|
||||
public event PlayFabResultEvent<ResetPasswordResult> OnAdminResetPasswordResultEvent;
|
||||
public event PlayFabRequestEvent<ResetUserStatisticsRequest> OnAdminResetUserStatisticsRequestEvent;
|
||||
public event PlayFabResultEvent<ResetUserStatisticsResult> OnAdminResetUserStatisticsResultEvent;
|
||||
public event PlayFabRequestEvent<ResolvePurchaseDisputeRequest> OnAdminResolvePurchaseDisputeRequestEvent;
|
||||
public event PlayFabResultEvent<ResolvePurchaseDisputeResponse> OnAdminResolvePurchaseDisputeResultEvent;
|
||||
public event PlayFabRequestEvent<RevokeAllBansForUserRequest> OnAdminRevokeAllBansForUserRequestEvent;
|
||||
public event PlayFabResultEvent<RevokeAllBansForUserResult> OnAdminRevokeAllBansForUserResultEvent;
|
||||
public event PlayFabRequestEvent<RevokeBansRequest> OnAdminRevokeBansRequestEvent;
|
||||
public event PlayFabResultEvent<RevokeBansResult> OnAdminRevokeBansResultEvent;
|
||||
public event PlayFabRequestEvent<RevokeInventoryItemRequest> OnAdminRevokeInventoryItemRequestEvent;
|
||||
public event PlayFabResultEvent<RevokeInventoryResult> OnAdminRevokeInventoryItemResultEvent;
|
||||
public event PlayFabRequestEvent<RevokeInventoryItemsRequest> OnAdminRevokeInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<RevokeInventoryItemsResult> OnAdminRevokeInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<RunTaskRequest> OnAdminRunTaskRequestEvent;
|
||||
public event PlayFabResultEvent<RunTaskResult> OnAdminRunTaskResultEvent;
|
||||
public event PlayFabRequestEvent<SendAccountRecoveryEmailRequest> OnAdminSendAccountRecoveryEmailRequestEvent;
|
||||
public event PlayFabResultEvent<SendAccountRecoveryEmailResult> OnAdminSendAccountRecoveryEmailResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateCatalogItemsRequest> OnAdminSetCatalogItemsRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateCatalogItemsResult> OnAdminSetCatalogItemsResultEvent;
|
||||
public event PlayFabRequestEvent<SetMembershipOverrideRequest> OnAdminSetMembershipOverrideRequestEvent;
|
||||
public event PlayFabResultEvent<SetMembershipOverrideResult> OnAdminSetMembershipOverrideResultEvent;
|
||||
public event PlayFabRequestEvent<SetPlayerSecretRequest> OnAdminSetPlayerSecretRequestEvent;
|
||||
public event PlayFabResultEvent<SetPlayerSecretResult> OnAdminSetPlayerSecretResultEvent;
|
||||
public event PlayFabRequestEvent<SetPublishedRevisionRequest> OnAdminSetPublishedRevisionRequestEvent;
|
||||
public event PlayFabResultEvent<SetPublishedRevisionResult> OnAdminSetPublishedRevisionResultEvent;
|
||||
public event PlayFabRequestEvent<SetPublisherDataRequest> OnAdminSetPublisherDataRequestEvent;
|
||||
public event PlayFabResultEvent<SetPublisherDataResult> OnAdminSetPublisherDataResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateStoreItemsRequest> OnAdminSetStoreItemsRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateStoreItemsResult> OnAdminSetStoreItemsResultEvent;
|
||||
public event PlayFabRequestEvent<SetTitleDataRequest> OnAdminSetTitleDataRequestEvent;
|
||||
public event PlayFabResultEvent<SetTitleDataResult> OnAdminSetTitleDataResultEvent;
|
||||
public event PlayFabRequestEvent<SetTitleDataAndOverridesRequest> OnAdminSetTitleDataAndOverridesRequestEvent;
|
||||
public event PlayFabResultEvent<SetTitleDataAndOverridesResult> OnAdminSetTitleDataAndOverridesResultEvent;
|
||||
public event PlayFabRequestEvent<SetTitleDataRequest> OnAdminSetTitleInternalDataRequestEvent;
|
||||
public event PlayFabResultEvent<SetTitleDataResult> OnAdminSetTitleInternalDataResultEvent;
|
||||
public event PlayFabRequestEvent<SetupPushNotificationRequest> OnAdminSetupPushNotificationRequestEvent;
|
||||
public event PlayFabResultEvent<SetupPushNotificationResult> OnAdminSetupPushNotificationResultEvent;
|
||||
public event PlayFabRequestEvent<SubtractUserVirtualCurrencyRequest> OnAdminSubtractUserVirtualCurrencyRequestEvent;
|
||||
public event PlayFabResultEvent<ModifyUserVirtualCurrencyResult> OnAdminSubtractUserVirtualCurrencyResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateBansRequest> OnAdminUpdateBansRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateBansResult> OnAdminUpdateBansResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateCatalogItemsRequest> OnAdminUpdateCatalogItemsRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateCatalogItemsResult> OnAdminUpdateCatalogItemsResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateCloudScriptRequest> OnAdminUpdateCloudScriptRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateCloudScriptResult> OnAdminUpdateCloudScriptResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateOpenIdConnectionRequest> OnAdminUpdateOpenIdConnectionRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnAdminUpdateOpenIdConnectionResultEvent;
|
||||
public event PlayFabRequestEvent<UpdatePlayerSharedSecretRequest> OnAdminUpdatePlayerSharedSecretRequestEvent;
|
||||
public event PlayFabResultEvent<UpdatePlayerSharedSecretResult> OnAdminUpdatePlayerSharedSecretResultEvent;
|
||||
public event PlayFabRequestEvent<UpdatePlayerStatisticDefinitionRequest> OnAdminUpdatePlayerStatisticDefinitionRequestEvent;
|
||||
public event PlayFabResultEvent<UpdatePlayerStatisticDefinitionResult> OnAdminUpdatePlayerStatisticDefinitionResultEvent;
|
||||
public event PlayFabRequestEvent<UpdatePolicyRequest> OnAdminUpdatePolicyRequestEvent;
|
||||
public event PlayFabResultEvent<UpdatePolicyResponse> OnAdminUpdatePolicyResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateRandomResultTablesRequest> OnAdminUpdateRandomResultTablesRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateRandomResultTablesResult> OnAdminUpdateRandomResultTablesResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateSegmentRequest> OnAdminUpdateSegmentRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateSegmentResponse> OnAdminUpdateSegmentResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateStoreItemsRequest> OnAdminUpdateStoreItemsRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateStoreItemsResult> OnAdminUpdateStoreItemsResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateTaskRequest> OnAdminUpdateTaskRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnAdminUpdateTaskResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateUserDataRequest> OnAdminUpdateUserDataRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateUserDataResult> OnAdminUpdateUserDataResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateUserInternalDataRequest> OnAdminUpdateUserInternalDataRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateUserDataResult> OnAdminUpdateUserInternalDataResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateUserDataRequest> OnAdminUpdateUserPublisherDataRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateUserDataResult> OnAdminUpdateUserPublisherDataResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateUserInternalDataRequest> OnAdminUpdateUserPublisherInternalDataRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateUserDataResult> OnAdminUpdateUserPublisherInternalDataResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateUserDataRequest> OnAdminUpdateUserPublisherReadOnlyDataRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateUserDataResult> OnAdminUpdateUserPublisherReadOnlyDataResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateUserDataRequest> OnAdminUpdateUserReadOnlyDataRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateUserDataResult> OnAdminUpdateUserReadOnlyDataResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateUserTitleDisplayNameRequest> OnAdminUpdateUserTitleDisplayNameRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateUserTitleDisplayNameResult> OnAdminUpdateUserTitleDisplayNameResultEvent;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17d913d4a2b01d044a0f70f2679f2fca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14f4be27db90b5d408494e5a681a55f6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,104 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.AuthenticationModels;
|
||||
using PlayFab.Internal;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// The Authentication APIs provide a convenient way to convert classic authentication responses into entity authentication
|
||||
/// models. These APIs will provide you with the entity authentication token needed for subsequent Entity API calls. The
|
||||
/// game_server API is designed to create uniquely identifiable game_server entities. The game_server Entity token can be
|
||||
/// used to call Matchmaking Lobby and Pubsub for server scenarios.
|
||||
/// </summary>
|
||||
public static class PlayFabAuthenticationAPI
|
||||
{
|
||||
static PlayFabAuthenticationAPI() {}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public static bool IsEntityLoggedIn()
|
||||
{
|
||||
return PlayFabSettings.staticPlayer.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public static void ForgetAllCredentials()
|
||||
{
|
||||
PlayFabSettings.staticPlayer.ForgetAllCredentials();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a game_server entity token and return a new or existing game_server entity.
|
||||
/// </summary>
|
||||
public static void AuthenticateGameServerWithCustomId(AuthenticateCustomIdRequest request, Action<AuthenticateCustomIdResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/GameServerIdentity/AuthenticateGameServerWithCustomId", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete a game_server entity.
|
||||
/// </summary>
|
||||
public static void Delete(DeleteRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/GameServerIdentity/Delete", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method to exchange a legacy AuthenticationTicket or title SecretKey for an Entity Token or to refresh a still valid
|
||||
/// Entity Token.
|
||||
/// </summary>
|
||||
public static void GetEntityToken(GetEntityTokenRequest request, Action<GetEntityTokenResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
AuthType authType = AuthType.None;
|
||||
#if !DISABLE_PLAYFABCLIENT_API
|
||||
if (context.IsClientLoggedIn()) { authType = AuthType.LoginSession; }
|
||||
#endif
|
||||
#if ENABLE_PLAYFABSERVER_API || ENABLE_PLAYFABADMIN_API || ENABLE_PLAYFAB_SECRETKEY
|
||||
if (callSettings.DeveloperSecretKey != null) { authType = AuthType.DevSecretKey; }
|
||||
#endif
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
if (context.IsEntityLoggedIn()) { authType = AuthType.EntityToken; }
|
||||
#endif
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Authentication/GetEntityToken", request, authType, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method for a server to validate a client provided EntityToken. Only callable by the title entity.
|
||||
/// </summary>
|
||||
public static void ValidateEntityToken(ValidateEntityTokenRequest request, Action<ValidateEntityTokenResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Authentication/ValidateEntityToken", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf5e0beea20361a45aee9c2329eafd01
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,121 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.AuthenticationModels;
|
||||
using PlayFab.Internal;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// The Authentication APIs provide a convenient way to convert classic authentication responses into entity authentication
|
||||
/// models. These APIs will provide you with the entity authentication token needed for subsequent Entity API calls. The
|
||||
/// game_server API is designed to create uniquely identifiable game_server entities. The game_server Entity token can be
|
||||
/// used to call Matchmaking Lobby and Pubsub for server scenarios.
|
||||
/// </summary>
|
||||
public class PlayFabAuthenticationInstanceAPI : IPlayFabInstanceApi
|
||||
{
|
||||
public readonly PlayFabApiSettings apiSettings = null;
|
||||
public readonly PlayFabAuthenticationContext authenticationContext = null;
|
||||
|
||||
public PlayFabAuthenticationInstanceAPI()
|
||||
{
|
||||
authenticationContext = new PlayFabAuthenticationContext();
|
||||
}
|
||||
|
||||
public PlayFabAuthenticationInstanceAPI(PlayFabApiSettings settings)
|
||||
{
|
||||
apiSettings = settings;
|
||||
authenticationContext = new PlayFabAuthenticationContext();
|
||||
}
|
||||
|
||||
public PlayFabAuthenticationInstanceAPI(PlayFabAuthenticationContext context)
|
||||
{
|
||||
authenticationContext = context ?? new PlayFabAuthenticationContext();
|
||||
}
|
||||
|
||||
public PlayFabAuthenticationInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context)
|
||||
{
|
||||
apiSettings = settings;
|
||||
authenticationContext = context ?? new PlayFabAuthenticationContext();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public bool IsEntityLoggedIn()
|
||||
{
|
||||
return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public void ForgetAllCredentials()
|
||||
{
|
||||
if (authenticationContext != null)
|
||||
{
|
||||
authenticationContext.ForgetAllCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a game_server entity token and return a new or existing game_server entity.
|
||||
/// </summary>
|
||||
public void AuthenticateGameServerWithCustomId(AuthenticateCustomIdRequest request, Action<AuthenticateCustomIdResult> 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("/GameServerIdentity/AuthenticateGameServerWithCustomId", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete a game_server entity.
|
||||
/// </summary>
|
||||
public void Delete(DeleteRequest request, Action<EmptyResponse> 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("/GameServerIdentity/Delete", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method to exchange a legacy AuthenticationTicket or title SecretKey for an Entity Token or to refresh a still valid
|
||||
/// Entity Token.
|
||||
/// </summary>
|
||||
public void GetEntityToken(GetEntityTokenRequest request, Action<GetEntityTokenResponse> 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;
|
||||
AuthType authType = AuthType.None;
|
||||
#if !DISABLE_PLAYFABCLIENT_API
|
||||
if (context.IsClientLoggedIn()) { authType = AuthType.LoginSession; }
|
||||
#endif
|
||||
#if ENABLE_PLAYFABSERVER_API || ENABLE_PLAYFABADMIN_API || ENABLE_PLAYFAB_SECRETKEY
|
||||
if (callSettings.DeveloperSecretKey != null) { authType = AuthType.DevSecretKey; }
|
||||
#endif
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
if (context.IsEntityLoggedIn()) { authType = AuthType.EntityToken; }
|
||||
#endif
|
||||
PlayFabHttp.MakeApiCall("/Authentication/GetEntityToken", request, authType, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method for a server to validate a client provided EntityToken. Only callable by the title entity.
|
||||
/// </summary>
|
||||
public void ValidateEntityToken(ValidateEntityTokenRequest request, Action<ValidateEntityTokenResponse> 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("/Authentication/ValidateEntityToken", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ecff04cca276a454aad3baf64c4a2ab4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,242 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab.AuthenticationModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Create or return a game_server entity token. Caller must be a title entity.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AuthenticateCustomIdRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The customId used to create and retrieve game_server entity tokens. This is unique at the title level. CustomId must be
|
||||
/// between 32 and 100 characters.
|
||||
/// </summary>
|
||||
public string CustomId;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AuthenticateCustomIdResult : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The token generated used to set X-EntityToken for game_server calls.
|
||||
/// </summary>
|
||||
public EntityTokenResponse EntityToken;
|
||||
/// <summary>
|
||||
/// True if the account was newly created on this authentication.
|
||||
/// </summary>
|
||||
public bool NewlyCreated;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete a game_server entity. The caller can be the game_server entity attempting to delete itself. Or a title entity
|
||||
/// attempting to delete game_server entities for this title.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DeleteRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The game_server entity to be removed.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EmptyResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Combined entity type and ID structure which uniquely identifies a single entity.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class EntityKey : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique ID of the entity.
|
||||
/// </summary>
|
||||
public string Id;
|
||||
/// <summary>
|
||||
/// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
|
||||
/// </summary>
|
||||
public string Type;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EntityLineage : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The Character Id of the associated entity.
|
||||
/// </summary>
|
||||
public string CharacterId;
|
||||
/// <summary>
|
||||
/// The Group Id of the associated entity.
|
||||
/// </summary>
|
||||
public string GroupId;
|
||||
/// <summary>
|
||||
/// The Master Player Account Id of the associated entity.
|
||||
/// </summary>
|
||||
public string MasterPlayerAccountId;
|
||||
/// <summary>
|
||||
/// The Namespace Id of the associated entity.
|
||||
/// </summary>
|
||||
public string NamespaceId;
|
||||
/// <summary>
|
||||
/// The Title Id of the associated entity.
|
||||
/// </summary>
|
||||
public string TitleId;
|
||||
/// <summary>
|
||||
/// The Title Player Account Id of the associated entity.
|
||||
/// </summary>
|
||||
public string TitlePlayerAccountId;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EntityTokenResponse : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity id and type.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The token used to set X-EntityToken for all entity based API calls.
|
||||
/// </summary>
|
||||
public string EntityToken;
|
||||
/// <summary>
|
||||
/// The time the token will expire, if it is an expiring token, in UTC.
|
||||
/// </summary>
|
||||
public DateTime? TokenExpiration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This API must be called with X-SecretKey, X-Authentication or X-EntityToken headers. An optional EntityKey may be
|
||||
/// included to attempt to set the resulting EntityToken to a specific entity, however the entity must be a relation of the
|
||||
/// caller, such as the master_player_account of a character. If sending X-EntityToken the account will be marked as freshly
|
||||
/// logged in and will issue a new token. If using X-Authentication or X-EntityToken the header must still be valid and
|
||||
/// cannot be expired or revoked.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GetEntityTokenRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetEntityTokenResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity id and type.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The token used to set X-EntityToken for all entity based API calls.
|
||||
/// </summary>
|
||||
public string EntityToken;
|
||||
/// <summary>
|
||||
/// The time the token will expire, if it is an expiring token, in UTC.
|
||||
/// </summary>
|
||||
public DateTime? TokenExpiration;
|
||||
}
|
||||
|
||||
public enum IdentifiedDeviceType
|
||||
{
|
||||
Unknown,
|
||||
XboxOne,
|
||||
Scarlett,
|
||||
WindowsOneCore,
|
||||
WindowsOneCoreMobile,
|
||||
Win32,
|
||||
android,
|
||||
iOS,
|
||||
PlayStation,
|
||||
Nintendo
|
||||
}
|
||||
|
||||
public enum LoginIdentityProvider
|
||||
{
|
||||
Unknown,
|
||||
PlayFab,
|
||||
Custom,
|
||||
GameCenter,
|
||||
GooglePlay,
|
||||
Steam,
|
||||
XBoxLive,
|
||||
PSN,
|
||||
Kongregate,
|
||||
Facebook,
|
||||
IOSDevice,
|
||||
AndroidDevice,
|
||||
Twitch,
|
||||
WindowsHello,
|
||||
GameServer,
|
||||
CustomServer,
|
||||
NintendoSwitch,
|
||||
FacebookInstantGames,
|
||||
OpenIdConnect,
|
||||
Apple,
|
||||
NintendoSwitchAccount,
|
||||
GooglePlayGames,
|
||||
XboxMobileStore,
|
||||
King
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given an entity token, validates that it hasn't expired or been revoked and will return details of the owner.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ValidateEntityTokenRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// Client EntityToken
|
||||
/// </summary>
|
||||
public string EntityToken;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ValidateEntityTokenResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity id and type.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The authenticated device for this entity, for the given login
|
||||
/// </summary>
|
||||
public IdentifiedDeviceType? IdentifiedDeviceType;
|
||||
/// <summary>
|
||||
/// The identity provider for this entity, for the given login
|
||||
/// </summary>
|
||||
public LoginIdentityProvider? IdentityProvider;
|
||||
/// <summary>
|
||||
/// The ID issued by the identity provider, e.g. a XUID on Xbox Live
|
||||
/// </summary>
|
||||
public string IdentityProviderIssuedId;
|
||||
/// <summary>
|
||||
/// The lineage of this profile.
|
||||
/// </summary>
|
||||
public EntityLineage Lineage;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec656500f922b0b4db8e13c80770e0d5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,18 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using PlayFab.AuthenticationModels;
|
||||
|
||||
namespace PlayFab.Events
|
||||
{
|
||||
public partial class PlayFabEvents
|
||||
{
|
||||
public event PlayFabRequestEvent<AuthenticateCustomIdRequest> OnAuthenticationAuthenticateGameServerWithCustomIdRequestEvent;
|
||||
public event PlayFabResultEvent<AuthenticateCustomIdResult> OnAuthenticationAuthenticateGameServerWithCustomIdResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteRequest> OnAuthenticationDeleteRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnAuthenticationDeleteResultEvent;
|
||||
public event PlayFabRequestEvent<GetEntityTokenRequest> OnAuthenticationGetEntityTokenRequestEvent;
|
||||
public event PlayFabResultEvent<GetEntityTokenResponse> OnAuthenticationGetEntityTokenResultEvent;
|
||||
public event PlayFabRequestEvent<ValidateEntityTokenRequest> OnAuthenticationValidateEntityTokenRequestEvent;
|
||||
public event PlayFabResultEvent<ValidateEntityTokenResponse> OnAuthenticationValidateEntityTokenResultEvent;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c3701fef92515c438633c5d41bf87c8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea91f77d2459767449ffe7e92185faa3
|
||||
folderAsset: yes
|
||||
timeCreated: 1468524875
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90390500e82fe784caf147e8a6dee649
|
||||
timeCreated: 1468524876
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ddd185cc4cdc40643a08607da563ddc4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a0a4ef9b600e6540b14561880293235
|
||||
timeCreated: 1468524875
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,109 @@
|
||||
#if !DISABLE_PLAYFABCLIENT_API
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.SharedModels;
|
||||
using UnityEngine;
|
||||
|
||||
namespace PlayFab.Internal
|
||||
{
|
||||
public static class PlayFabDeviceUtil
|
||||
{
|
||||
private static bool _needsAttribution, _gatherDeviceInfo, _gatherScreenTime;
|
||||
|
||||
#region Scrape Device Info
|
||||
private static void SendDeviceInfoToPlayFab(PlayFabApiSettings settings, IPlayFabInstanceApi instanceApi)
|
||||
{
|
||||
if (settings.DisableDeviceInfo || !_gatherDeviceInfo) return;
|
||||
|
||||
var serializer = PluginManager.GetPlugin<ISerializerPlugin>(PluginContract.PlayFab_Serializer);
|
||||
var request = new ClientModels.DeviceInfoRequest
|
||||
{
|
||||
Info = serializer.DeserializeObject<Dictionary<string, object>>(serializer.SerializeObject(new PlayFabDataGatherer()))
|
||||
};
|
||||
var clientInstanceApi = instanceApi as PlayFabClientInstanceAPI;
|
||||
if (clientInstanceApi != null)
|
||||
clientInstanceApi.ReportDeviceInfo(request, null, OnGatherFail, settings);
|
||||
#if !DISABLE_PLAYFAB_STATIC_API
|
||||
else
|
||||
PlayFabClientAPI.ReportDeviceInfo(request, null, OnGatherFail, settings);
|
||||
#endif
|
||||
}
|
||||
private static void OnGatherFail(PlayFabError error)
|
||||
{
|
||||
Debug.Log("OnGatherFail: " + error.GenerateErrorReport());
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// When a PlayFab login occurs, check the result information, and
|
||||
/// relay it to _OnPlayFabLogin where the information is used
|
||||
/// </summary>
|
||||
/// <param name="result"></param>
|
||||
public static void OnPlayFabLogin(PlayFabResultCommon result, PlayFabApiSettings settings, IPlayFabInstanceApi instanceApi)
|
||||
{
|
||||
var loginResult = result as ClientModels.LoginResult;
|
||||
var registerResult = result as ClientModels.RegisterPlayFabUserResult;
|
||||
if (loginResult == null && registerResult == null)
|
||||
return;
|
||||
|
||||
// Gather things common to the result types
|
||||
ClientModels.UserSettings settingsForUser = null;
|
||||
string playFabId = null;
|
||||
string entityId = null;
|
||||
string entityType = null;
|
||||
|
||||
if (loginResult != null)
|
||||
{
|
||||
settingsForUser = loginResult.SettingsForUser;
|
||||
playFabId = loginResult.PlayFabId;
|
||||
if (loginResult.EntityToken != null)
|
||||
{
|
||||
entityId = loginResult.EntityToken.Entity.Id;
|
||||
entityType = loginResult.EntityToken.Entity.Type;
|
||||
}
|
||||
}
|
||||
else if (registerResult != null)
|
||||
{
|
||||
settingsForUser = registerResult.SettingsForUser;
|
||||
playFabId = registerResult.PlayFabId;
|
||||
if (registerResult.EntityToken != null)
|
||||
{
|
||||
entityId = registerResult.EntityToken.Entity.Id;
|
||||
entityType = registerResult.EntityToken.Entity.Type;
|
||||
}
|
||||
}
|
||||
|
||||
_OnPlayFabLogin(settingsForUser, playFabId, entityId, entityType, settings, instanceApi);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Separated from OnPlayFabLogin, to explicitly lose the refs to loginResult and registerResult, because
|
||||
/// only one will be defined, but both usually have all the information we REALLY need here.
|
||||
/// But the result signatures are different and clunky, so do the separation above, and processing here
|
||||
/// </summary>
|
||||
private static void _OnPlayFabLogin(ClientModels.UserSettings settingsForUser, string playFabId, string entityId, string entityType, PlayFabApiSettings settings, IPlayFabInstanceApi instanceApi)
|
||||
{
|
||||
_needsAttribution = _gatherDeviceInfo = _gatherScreenTime = false;
|
||||
if (settingsForUser != null)
|
||||
{
|
||||
_needsAttribution = settingsForUser.NeedsAttribution;
|
||||
_gatherDeviceInfo = settingsForUser.GatherDeviceInfo;
|
||||
_gatherScreenTime = settingsForUser.GatherFocusInfo;
|
||||
}
|
||||
|
||||
// Device information gathering
|
||||
SendDeviceInfoToPlayFab(settings, instanceApi);
|
||||
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
if (!string.IsNullOrEmpty(entityId) && !string.IsNullOrEmpty(entityType) && _gatherScreenTime)
|
||||
{
|
||||
PlayFabHttp.InitializeScreenTimeTracker(entityId, entityType, playFabId);
|
||||
}
|
||||
else
|
||||
{
|
||||
settings.DisableFocusTimeCollection = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd4190ddf909a304eb43068a0caea903
|
||||
timeCreated: 1494526811
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,321 @@
|
||||
#if !DISABLE_PLAYFABCLIENT_API
|
||||
using PlayFab.ClientModels;
|
||||
|
||||
namespace PlayFab.Events
|
||||
{
|
||||
public partial class PlayFabEvents
|
||||
{
|
||||
public event PlayFabResultEvent<LoginResult> OnLoginResultEvent;
|
||||
|
||||
public event PlayFabRequestEvent<AcceptTradeRequest> OnAcceptTradeRequestEvent;
|
||||
public event PlayFabResultEvent<AcceptTradeResponse> OnAcceptTradeResultEvent;
|
||||
public event PlayFabRequestEvent<AddFriendRequest> OnAddFriendRequestEvent;
|
||||
public event PlayFabResultEvent<AddFriendResult> OnAddFriendResultEvent;
|
||||
public event PlayFabRequestEvent<AddGenericIDRequest> OnAddGenericIDRequestEvent;
|
||||
public event PlayFabResultEvent<AddGenericIDResult> OnAddGenericIDResultEvent;
|
||||
public event PlayFabRequestEvent<AddOrUpdateContactEmailRequest> OnAddOrUpdateContactEmailRequestEvent;
|
||||
public event PlayFabResultEvent<AddOrUpdateContactEmailResult> OnAddOrUpdateContactEmailResultEvent;
|
||||
public event PlayFabRequestEvent<AddSharedGroupMembersRequest> OnAddSharedGroupMembersRequestEvent;
|
||||
public event PlayFabResultEvent<AddSharedGroupMembersResult> OnAddSharedGroupMembersResultEvent;
|
||||
public event PlayFabRequestEvent<AddUsernamePasswordRequest> OnAddUsernamePasswordRequestEvent;
|
||||
public event PlayFabResultEvent<AddUsernamePasswordResult> OnAddUsernamePasswordResultEvent;
|
||||
public event PlayFabRequestEvent<AddUserVirtualCurrencyRequest> OnAddUserVirtualCurrencyRequestEvent;
|
||||
public event PlayFabResultEvent<ModifyUserVirtualCurrencyResult> OnAddUserVirtualCurrencyResultEvent;
|
||||
public event PlayFabRequestEvent<AndroidDevicePushNotificationRegistrationRequest> OnAndroidDevicePushNotificationRegistrationRequestEvent;
|
||||
public event PlayFabResultEvent<AndroidDevicePushNotificationRegistrationResult> OnAndroidDevicePushNotificationRegistrationResultEvent;
|
||||
public event PlayFabRequestEvent<AttributeInstallRequest> OnAttributeInstallRequestEvent;
|
||||
public event PlayFabResultEvent<AttributeInstallResult> OnAttributeInstallResultEvent;
|
||||
public event PlayFabRequestEvent<CancelTradeRequest> OnCancelTradeRequestEvent;
|
||||
public event PlayFabResultEvent<CancelTradeResponse> OnCancelTradeResultEvent;
|
||||
public event PlayFabRequestEvent<ConfirmPurchaseRequest> OnConfirmPurchaseRequestEvent;
|
||||
public event PlayFabResultEvent<ConfirmPurchaseResult> OnConfirmPurchaseResultEvent;
|
||||
public event PlayFabRequestEvent<ConsumeItemRequest> OnConsumeItemRequestEvent;
|
||||
public event PlayFabResultEvent<ConsumeItemResult> OnConsumeItemResultEvent;
|
||||
public event PlayFabRequestEvent<ConsumeMicrosoftStoreEntitlementsRequest> OnConsumeMicrosoftStoreEntitlementsRequestEvent;
|
||||
public event PlayFabResultEvent<ConsumeMicrosoftStoreEntitlementsResponse> OnConsumeMicrosoftStoreEntitlementsResultEvent;
|
||||
public event PlayFabRequestEvent<ConsumePS5EntitlementsRequest> OnConsumePS5EntitlementsRequestEvent;
|
||||
public event PlayFabResultEvent<ConsumePS5EntitlementsResult> OnConsumePS5EntitlementsResultEvent;
|
||||
public event PlayFabRequestEvent<ConsumePSNEntitlementsRequest> OnConsumePSNEntitlementsRequestEvent;
|
||||
public event PlayFabResultEvent<ConsumePSNEntitlementsResult> OnConsumePSNEntitlementsResultEvent;
|
||||
public event PlayFabRequestEvent<ConsumeXboxEntitlementsRequest> OnConsumeXboxEntitlementsRequestEvent;
|
||||
public event PlayFabResultEvent<ConsumeXboxEntitlementsResult> OnConsumeXboxEntitlementsResultEvent;
|
||||
public event PlayFabRequestEvent<CreateSharedGroupRequest> OnCreateSharedGroupRequestEvent;
|
||||
public event PlayFabResultEvent<CreateSharedGroupResult> OnCreateSharedGroupResultEvent;
|
||||
public event PlayFabRequestEvent<ExecuteCloudScriptRequest> OnExecuteCloudScriptRequestEvent;
|
||||
public event PlayFabResultEvent<ExecuteCloudScriptResult> OnExecuteCloudScriptResultEvent;
|
||||
public event PlayFabRequestEvent<GetAccountInfoRequest> OnGetAccountInfoRequestEvent;
|
||||
public event PlayFabResultEvent<GetAccountInfoResult> OnGetAccountInfoResultEvent;
|
||||
public event PlayFabRequestEvent<GetAdPlacementsRequest> OnGetAdPlacementsRequestEvent;
|
||||
public event PlayFabResultEvent<GetAdPlacementsResult> OnGetAdPlacementsResultEvent;
|
||||
public event PlayFabRequestEvent<ListUsersCharactersRequest> OnGetAllUsersCharactersRequestEvent;
|
||||
public event PlayFabResultEvent<ListUsersCharactersResult> OnGetAllUsersCharactersResultEvent;
|
||||
public event PlayFabRequestEvent<GetCatalogItemsRequest> OnGetCatalogItemsRequestEvent;
|
||||
public event PlayFabResultEvent<GetCatalogItemsResult> OnGetCatalogItemsResultEvent;
|
||||
public event PlayFabRequestEvent<GetCharacterDataRequest> OnGetCharacterDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetCharacterDataResult> OnGetCharacterDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetCharacterInventoryRequest> OnGetCharacterInventoryRequestEvent;
|
||||
public event PlayFabResultEvent<GetCharacterInventoryResult> OnGetCharacterInventoryResultEvent;
|
||||
public event PlayFabRequestEvent<GetCharacterLeaderboardRequest> OnGetCharacterLeaderboardRequestEvent;
|
||||
public event PlayFabResultEvent<GetCharacterLeaderboardResult> OnGetCharacterLeaderboardResultEvent;
|
||||
public event PlayFabRequestEvent<GetCharacterDataRequest> OnGetCharacterReadOnlyDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetCharacterDataResult> OnGetCharacterReadOnlyDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetCharacterStatisticsRequest> OnGetCharacterStatisticsRequestEvent;
|
||||
public event PlayFabResultEvent<GetCharacterStatisticsResult> OnGetCharacterStatisticsResultEvent;
|
||||
public event PlayFabRequestEvent<GetContentDownloadUrlRequest> OnGetContentDownloadUrlRequestEvent;
|
||||
public event PlayFabResultEvent<GetContentDownloadUrlResult> OnGetContentDownloadUrlResultEvent;
|
||||
public event PlayFabRequestEvent<GetFriendLeaderboardRequest> OnGetFriendLeaderboardRequestEvent;
|
||||
public event PlayFabResultEvent<GetLeaderboardResult> OnGetFriendLeaderboardResultEvent;
|
||||
public event PlayFabRequestEvent<GetFriendLeaderboardAroundPlayerRequest> OnGetFriendLeaderboardAroundPlayerRequestEvent;
|
||||
public event PlayFabResultEvent<GetFriendLeaderboardAroundPlayerResult> OnGetFriendLeaderboardAroundPlayerResultEvent;
|
||||
public event PlayFabRequestEvent<GetFriendsListRequest> OnGetFriendsListRequestEvent;
|
||||
public event PlayFabResultEvent<GetFriendsListResult> OnGetFriendsListResultEvent;
|
||||
public event PlayFabRequestEvent<GetLeaderboardRequest> OnGetLeaderboardRequestEvent;
|
||||
public event PlayFabResultEvent<GetLeaderboardResult> OnGetLeaderboardResultEvent;
|
||||
public event PlayFabRequestEvent<GetLeaderboardAroundCharacterRequest> OnGetLeaderboardAroundCharacterRequestEvent;
|
||||
public event PlayFabResultEvent<GetLeaderboardAroundCharacterResult> OnGetLeaderboardAroundCharacterResultEvent;
|
||||
public event PlayFabRequestEvent<GetLeaderboardAroundPlayerRequest> OnGetLeaderboardAroundPlayerRequestEvent;
|
||||
public event PlayFabResultEvent<GetLeaderboardAroundPlayerResult> OnGetLeaderboardAroundPlayerResultEvent;
|
||||
public event PlayFabRequestEvent<GetLeaderboardForUsersCharactersRequest> OnGetLeaderboardForUserCharactersRequestEvent;
|
||||
public event PlayFabResultEvent<GetLeaderboardForUsersCharactersResult> OnGetLeaderboardForUserCharactersResultEvent;
|
||||
public event PlayFabRequestEvent<GetPaymentTokenRequest> OnGetPaymentTokenRequestEvent;
|
||||
public event PlayFabResultEvent<GetPaymentTokenResult> OnGetPaymentTokenResultEvent;
|
||||
public event PlayFabRequestEvent<GetPhotonAuthenticationTokenRequest> OnGetPhotonAuthenticationTokenRequestEvent;
|
||||
public event PlayFabResultEvent<GetPhotonAuthenticationTokenResult> OnGetPhotonAuthenticationTokenResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerCombinedInfoRequest> OnGetPlayerCombinedInfoRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerCombinedInfoResult> OnGetPlayerCombinedInfoResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerProfileRequest> OnGetPlayerProfileRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerProfileResult> OnGetPlayerProfileResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerSegmentsRequest> OnGetPlayerSegmentsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerSegmentsResult> OnGetPlayerSegmentsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerStatisticsRequest> OnGetPlayerStatisticsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerStatisticsResult> OnGetPlayerStatisticsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerStatisticVersionsRequest> OnGetPlayerStatisticVersionsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerStatisticVersionsResult> OnGetPlayerStatisticVersionsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerTagsRequest> OnGetPlayerTagsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerTagsResult> OnGetPlayerTagsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayerTradesRequest> OnGetPlayerTradesRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayerTradesResponse> OnGetPlayerTradesResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromFacebookIDsRequest> OnGetPlayFabIDsFromFacebookIDsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromFacebookIDsResult> OnGetPlayFabIDsFromFacebookIDsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromFacebookInstantGamesIdsRequest> OnGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromFacebookInstantGamesIdsResult> OnGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromGameCenterIDsRequest> OnGetPlayFabIDsFromGameCenterIDsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromGameCenterIDsResult> OnGetPlayFabIDsFromGameCenterIDsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromGenericIDsRequest> OnGetPlayFabIDsFromGenericIDsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromGenericIDsResult> OnGetPlayFabIDsFromGenericIDsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromGoogleIDsRequest> OnGetPlayFabIDsFromGoogleIDsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromGoogleIDsResult> OnGetPlayFabIDsFromGoogleIDsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest> OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult> OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromKongregateIDsRequest> OnGetPlayFabIDsFromKongregateIDsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromKongregateIDsResult> OnGetPlayFabIDsFromKongregateIDsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromNintendoServiceAccountIdsRequest> OnGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromNintendoServiceAccountIdsResult> OnGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest> OnGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromNintendoSwitchDeviceIdsResult> OnGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromPSNAccountIDsRequest> OnGetPlayFabIDsFromPSNAccountIDsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromPSNAccountIDsResult> OnGetPlayFabIDsFromPSNAccountIDsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromPSNOnlineIDsRequest> OnGetPlayFabIDsFromPSNOnlineIDsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromPSNOnlineIDsResult> OnGetPlayFabIDsFromPSNOnlineIDsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromSteamIDsRequest> OnGetPlayFabIDsFromSteamIDsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromSteamIDsResult> OnGetPlayFabIDsFromSteamIDsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromTwitchIDsRequest> OnGetPlayFabIDsFromTwitchIDsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromTwitchIDsResult> OnGetPlayFabIDsFromTwitchIDsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPlayFabIDsFromXboxLiveIDsRequest> OnGetPlayFabIDsFromXboxLiveIDsRequestEvent;
|
||||
public event PlayFabResultEvent<GetPlayFabIDsFromXboxLiveIDsResult> OnGetPlayFabIDsFromXboxLiveIDsResultEvent;
|
||||
public event PlayFabRequestEvent<GetPublisherDataRequest> OnGetPublisherDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetPublisherDataResult> OnGetPublisherDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetPurchaseRequest> OnGetPurchaseRequestEvent;
|
||||
public event PlayFabResultEvent<GetPurchaseResult> OnGetPurchaseResultEvent;
|
||||
public event PlayFabRequestEvent<GetSharedGroupDataRequest> OnGetSharedGroupDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetSharedGroupDataResult> OnGetSharedGroupDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetStoreItemsRequest> OnGetStoreItemsRequestEvent;
|
||||
public event PlayFabResultEvent<GetStoreItemsResult> OnGetStoreItemsResultEvent;
|
||||
public event PlayFabRequestEvent<GetTimeRequest> OnGetTimeRequestEvent;
|
||||
public event PlayFabResultEvent<GetTimeResult> OnGetTimeResultEvent;
|
||||
public event PlayFabRequestEvent<GetTitleDataRequest> OnGetTitleDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetTitleDataResult> OnGetTitleDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetTitleNewsRequest> OnGetTitleNewsRequestEvent;
|
||||
public event PlayFabResultEvent<GetTitleNewsResult> OnGetTitleNewsResultEvent;
|
||||
public event PlayFabRequestEvent<GetTitlePublicKeyRequest> OnGetTitlePublicKeyRequestEvent;
|
||||
public event PlayFabResultEvent<GetTitlePublicKeyResult> OnGetTitlePublicKeyResultEvent;
|
||||
public event PlayFabRequestEvent<GetTradeStatusRequest> OnGetTradeStatusRequestEvent;
|
||||
public event PlayFabResultEvent<GetTradeStatusResponse> OnGetTradeStatusResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserDataRequest> OnGetUserDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserDataResult> OnGetUserDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserInventoryRequest> OnGetUserInventoryRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserInventoryResult> OnGetUserInventoryResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserDataRequest> OnGetUserPublisherDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserDataResult> OnGetUserPublisherDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserDataRequest> OnGetUserPublisherReadOnlyDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserDataResult> OnGetUserPublisherReadOnlyDataResultEvent;
|
||||
public event PlayFabRequestEvent<GetUserDataRequest> OnGetUserReadOnlyDataRequestEvent;
|
||||
public event PlayFabResultEvent<GetUserDataResult> OnGetUserReadOnlyDataResultEvent;
|
||||
public event PlayFabRequestEvent<GrantCharacterToUserRequest> OnGrantCharacterToUserRequestEvent;
|
||||
public event PlayFabResultEvent<GrantCharacterToUserResult> OnGrantCharacterToUserResultEvent;
|
||||
public event PlayFabRequestEvent<LinkAndroidDeviceIDRequest> OnLinkAndroidDeviceIDRequestEvent;
|
||||
public event PlayFabResultEvent<LinkAndroidDeviceIDResult> OnLinkAndroidDeviceIDResultEvent;
|
||||
public event PlayFabRequestEvent<LinkAppleRequest> OnLinkAppleRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResult> OnLinkAppleResultEvent;
|
||||
public event PlayFabRequestEvent<LinkCustomIDRequest> OnLinkCustomIDRequestEvent;
|
||||
public event PlayFabResultEvent<LinkCustomIDResult> OnLinkCustomIDResultEvent;
|
||||
public event PlayFabRequestEvent<LinkFacebookAccountRequest> OnLinkFacebookAccountRequestEvent;
|
||||
public event PlayFabResultEvent<LinkFacebookAccountResult> OnLinkFacebookAccountResultEvent;
|
||||
public event PlayFabRequestEvent<LinkFacebookInstantGamesIdRequest> OnLinkFacebookInstantGamesIdRequestEvent;
|
||||
public event PlayFabResultEvent<LinkFacebookInstantGamesIdResult> OnLinkFacebookInstantGamesIdResultEvent;
|
||||
public event PlayFabRequestEvent<LinkGameCenterAccountRequest> OnLinkGameCenterAccountRequestEvent;
|
||||
public event PlayFabResultEvent<LinkGameCenterAccountResult> OnLinkGameCenterAccountResultEvent;
|
||||
public event PlayFabRequestEvent<LinkGoogleAccountRequest> OnLinkGoogleAccountRequestEvent;
|
||||
public event PlayFabResultEvent<LinkGoogleAccountResult> OnLinkGoogleAccountResultEvent;
|
||||
public event PlayFabRequestEvent<LinkGooglePlayGamesServicesAccountRequest> OnLinkGooglePlayGamesServicesAccountRequestEvent;
|
||||
public event PlayFabResultEvent<LinkGooglePlayGamesServicesAccountResult> OnLinkGooglePlayGamesServicesAccountResultEvent;
|
||||
public event PlayFabRequestEvent<LinkIOSDeviceIDRequest> OnLinkIOSDeviceIDRequestEvent;
|
||||
public event PlayFabResultEvent<LinkIOSDeviceIDResult> OnLinkIOSDeviceIDResultEvent;
|
||||
public event PlayFabRequestEvent<LinkKongregateAccountRequest> OnLinkKongregateRequestEvent;
|
||||
public event PlayFabResultEvent<LinkKongregateAccountResult> OnLinkKongregateResultEvent;
|
||||
public event PlayFabRequestEvent<LinkNintendoServiceAccountRequest> OnLinkNintendoServiceAccountRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResult> OnLinkNintendoServiceAccountResultEvent;
|
||||
public event PlayFabRequestEvent<LinkNintendoSwitchDeviceIdRequest> OnLinkNintendoSwitchDeviceIdRequestEvent;
|
||||
public event PlayFabResultEvent<LinkNintendoSwitchDeviceIdResult> OnLinkNintendoSwitchDeviceIdResultEvent;
|
||||
public event PlayFabRequestEvent<LinkOpenIdConnectRequest> OnLinkOpenIdConnectRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResult> OnLinkOpenIdConnectResultEvent;
|
||||
public event PlayFabRequestEvent<LinkPSNAccountRequest> OnLinkPSNAccountRequestEvent;
|
||||
public event PlayFabResultEvent<LinkPSNAccountResult> OnLinkPSNAccountResultEvent;
|
||||
public event PlayFabRequestEvent<LinkSteamAccountRequest> OnLinkSteamAccountRequestEvent;
|
||||
public event PlayFabResultEvent<LinkSteamAccountResult> OnLinkSteamAccountResultEvent;
|
||||
public event PlayFabRequestEvent<LinkTwitchAccountRequest> OnLinkTwitchRequestEvent;
|
||||
public event PlayFabResultEvent<LinkTwitchAccountResult> OnLinkTwitchResultEvent;
|
||||
public event PlayFabRequestEvent<LinkXboxAccountRequest> OnLinkXboxAccountRequestEvent;
|
||||
public event PlayFabResultEvent<LinkXboxAccountResult> OnLinkXboxAccountResultEvent;
|
||||
public event PlayFabRequestEvent<LoginWithAndroidDeviceIDRequest> OnLoginWithAndroidDeviceIDRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithAppleRequest> OnLoginWithAppleRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithCustomIDRequest> OnLoginWithCustomIDRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithEmailAddressRequest> OnLoginWithEmailAddressRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithFacebookRequest> OnLoginWithFacebookRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithFacebookInstantGamesIdRequest> OnLoginWithFacebookInstantGamesIdRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithGameCenterRequest> OnLoginWithGameCenterRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithGoogleAccountRequest> OnLoginWithGoogleAccountRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithGooglePlayGamesServicesRequest> OnLoginWithGooglePlayGamesServicesRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithIOSDeviceIDRequest> OnLoginWithIOSDeviceIDRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithKongregateRequest> OnLoginWithKongregateRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithNintendoServiceAccountRequest> OnLoginWithNintendoServiceAccountRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithNintendoSwitchDeviceIdRequest> OnLoginWithNintendoSwitchDeviceIdRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithOpenIdConnectRequest> OnLoginWithOpenIdConnectRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithPlayFabRequest> OnLoginWithPlayFabRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithPSNRequest> OnLoginWithPSNRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithSteamRequest> OnLoginWithSteamRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithTwitchRequest> OnLoginWithTwitchRequestEvent;
|
||||
public event PlayFabRequestEvent<LoginWithXboxRequest> OnLoginWithXboxRequestEvent;
|
||||
public event PlayFabRequestEvent<OpenTradeRequest> OnOpenTradeRequestEvent;
|
||||
public event PlayFabResultEvent<OpenTradeResponse> OnOpenTradeResultEvent;
|
||||
public event PlayFabRequestEvent<PayForPurchaseRequest> OnPayForPurchaseRequestEvent;
|
||||
public event PlayFabResultEvent<PayForPurchaseResult> OnPayForPurchaseResultEvent;
|
||||
public event PlayFabRequestEvent<PurchaseItemRequest> OnPurchaseItemRequestEvent;
|
||||
public event PlayFabResultEvent<PurchaseItemResult> OnPurchaseItemResultEvent;
|
||||
public event PlayFabRequestEvent<RedeemCouponRequest> OnRedeemCouponRequestEvent;
|
||||
public event PlayFabResultEvent<RedeemCouponResult> OnRedeemCouponResultEvent;
|
||||
public event PlayFabRequestEvent<RefreshPSNAuthTokenRequest> OnRefreshPSNAuthTokenRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnRefreshPSNAuthTokenResultEvent;
|
||||
public event PlayFabRequestEvent<RegisterForIOSPushNotificationRequest> OnRegisterForIOSPushNotificationRequestEvent;
|
||||
public event PlayFabResultEvent<RegisterForIOSPushNotificationResult> OnRegisterForIOSPushNotificationResultEvent;
|
||||
public event PlayFabRequestEvent<RegisterPlayFabUserRequest> OnRegisterPlayFabUserRequestEvent;
|
||||
public event PlayFabResultEvent<RegisterPlayFabUserResult> OnRegisterPlayFabUserResultEvent;
|
||||
public event PlayFabRequestEvent<RemoveContactEmailRequest> OnRemoveContactEmailRequestEvent;
|
||||
public event PlayFabResultEvent<RemoveContactEmailResult> OnRemoveContactEmailResultEvent;
|
||||
public event PlayFabRequestEvent<RemoveFriendRequest> OnRemoveFriendRequestEvent;
|
||||
public event PlayFabResultEvent<RemoveFriendResult> OnRemoveFriendResultEvent;
|
||||
public event PlayFabRequestEvent<RemoveGenericIDRequest> OnRemoveGenericIDRequestEvent;
|
||||
public event PlayFabResultEvent<RemoveGenericIDResult> OnRemoveGenericIDResultEvent;
|
||||
public event PlayFabRequestEvent<RemoveSharedGroupMembersRequest> OnRemoveSharedGroupMembersRequestEvent;
|
||||
public event PlayFabResultEvent<RemoveSharedGroupMembersResult> OnRemoveSharedGroupMembersResultEvent;
|
||||
public event PlayFabRequestEvent<ReportAdActivityRequest> OnReportAdActivityRequestEvent;
|
||||
public event PlayFabResultEvent<ReportAdActivityResult> OnReportAdActivityResultEvent;
|
||||
public event PlayFabRequestEvent<DeviceInfoRequest> OnReportDeviceInfoRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnReportDeviceInfoResultEvent;
|
||||
public event PlayFabRequestEvent<ReportPlayerClientRequest> OnReportPlayerRequestEvent;
|
||||
public event PlayFabResultEvent<ReportPlayerClientResult> OnReportPlayerResultEvent;
|
||||
public event PlayFabRequestEvent<RestoreIOSPurchasesRequest> OnRestoreIOSPurchasesRequestEvent;
|
||||
public event PlayFabResultEvent<RestoreIOSPurchasesResult> OnRestoreIOSPurchasesResultEvent;
|
||||
public event PlayFabRequestEvent<RewardAdActivityRequest> OnRewardAdActivityRequestEvent;
|
||||
public event PlayFabResultEvent<RewardAdActivityResult> OnRewardAdActivityResultEvent;
|
||||
public event PlayFabRequestEvent<SendAccountRecoveryEmailRequest> OnSendAccountRecoveryEmailRequestEvent;
|
||||
public event PlayFabResultEvent<SendAccountRecoveryEmailResult> OnSendAccountRecoveryEmailResultEvent;
|
||||
public event PlayFabRequestEvent<SetFriendTagsRequest> OnSetFriendTagsRequestEvent;
|
||||
public event PlayFabResultEvent<SetFriendTagsResult> OnSetFriendTagsResultEvent;
|
||||
public event PlayFabRequestEvent<SetPlayerSecretRequest> OnSetPlayerSecretRequestEvent;
|
||||
public event PlayFabResultEvent<SetPlayerSecretResult> OnSetPlayerSecretResultEvent;
|
||||
public event PlayFabRequestEvent<StartPurchaseRequest> OnStartPurchaseRequestEvent;
|
||||
public event PlayFabResultEvent<StartPurchaseResult> OnStartPurchaseResultEvent;
|
||||
public event PlayFabRequestEvent<SubtractUserVirtualCurrencyRequest> OnSubtractUserVirtualCurrencyRequestEvent;
|
||||
public event PlayFabResultEvent<ModifyUserVirtualCurrencyResult> OnSubtractUserVirtualCurrencyResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkAndroidDeviceIDRequest> OnUnlinkAndroidDeviceIDRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkAndroidDeviceIDResult> OnUnlinkAndroidDeviceIDResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkAppleRequest> OnUnlinkAppleRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnUnlinkAppleResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkCustomIDRequest> OnUnlinkCustomIDRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkCustomIDResult> OnUnlinkCustomIDResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkFacebookAccountRequest> OnUnlinkFacebookAccountRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkFacebookAccountResult> OnUnlinkFacebookAccountResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkFacebookInstantGamesIdRequest> OnUnlinkFacebookInstantGamesIdRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkFacebookInstantGamesIdResult> OnUnlinkFacebookInstantGamesIdResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkGameCenterAccountRequest> OnUnlinkGameCenterAccountRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkGameCenterAccountResult> OnUnlinkGameCenterAccountResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkGoogleAccountRequest> OnUnlinkGoogleAccountRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkGoogleAccountResult> OnUnlinkGoogleAccountResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkGooglePlayGamesServicesAccountRequest> OnUnlinkGooglePlayGamesServicesAccountRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkGooglePlayGamesServicesAccountResult> OnUnlinkGooglePlayGamesServicesAccountResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkIOSDeviceIDRequest> OnUnlinkIOSDeviceIDRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkIOSDeviceIDResult> OnUnlinkIOSDeviceIDResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkKongregateAccountRequest> OnUnlinkKongregateRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkKongregateAccountResult> OnUnlinkKongregateResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkNintendoServiceAccountRequest> OnUnlinkNintendoServiceAccountRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnUnlinkNintendoServiceAccountResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkNintendoSwitchDeviceIdRequest> OnUnlinkNintendoSwitchDeviceIdRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkNintendoSwitchDeviceIdResult> OnUnlinkNintendoSwitchDeviceIdResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkOpenIdConnectRequest> OnUnlinkOpenIdConnectRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnUnlinkOpenIdConnectResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkPSNAccountRequest> OnUnlinkPSNAccountRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkPSNAccountResult> OnUnlinkPSNAccountResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkSteamAccountRequest> OnUnlinkSteamAccountRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkSteamAccountResult> OnUnlinkSteamAccountResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkTwitchAccountRequest> OnUnlinkTwitchRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkTwitchAccountResult> OnUnlinkTwitchResultEvent;
|
||||
public event PlayFabRequestEvent<UnlinkXboxAccountRequest> OnUnlinkXboxAccountRequestEvent;
|
||||
public event PlayFabResultEvent<UnlinkXboxAccountResult> OnUnlinkXboxAccountResultEvent;
|
||||
public event PlayFabRequestEvent<UnlockContainerInstanceRequest> OnUnlockContainerInstanceRequestEvent;
|
||||
public event PlayFabResultEvent<UnlockContainerItemResult> OnUnlockContainerInstanceResultEvent;
|
||||
public event PlayFabRequestEvent<UnlockContainerItemRequest> OnUnlockContainerItemRequestEvent;
|
||||
public event PlayFabResultEvent<UnlockContainerItemResult> OnUnlockContainerItemResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateAvatarUrlRequest> OnUpdateAvatarUrlRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnUpdateAvatarUrlResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateCharacterDataRequest> OnUpdateCharacterDataRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateCharacterDataResult> OnUpdateCharacterDataResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateCharacterStatisticsRequest> OnUpdateCharacterStatisticsRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateCharacterStatisticsResult> OnUpdateCharacterStatisticsResultEvent;
|
||||
public event PlayFabRequestEvent<UpdatePlayerStatisticsRequest> OnUpdatePlayerStatisticsRequestEvent;
|
||||
public event PlayFabResultEvent<UpdatePlayerStatisticsResult> OnUpdatePlayerStatisticsResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateSharedGroupDataRequest> OnUpdateSharedGroupDataRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateSharedGroupDataResult> OnUpdateSharedGroupDataResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateUserDataRequest> OnUpdateUserDataRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateUserDataResult> OnUpdateUserDataResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateUserDataRequest> OnUpdateUserPublisherDataRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateUserDataResult> OnUpdateUserPublisherDataResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateUserTitleDisplayNameRequest> OnUpdateUserTitleDisplayNameRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateUserTitleDisplayNameResult> OnUpdateUserTitleDisplayNameResultEvent;
|
||||
public event PlayFabRequestEvent<ValidateAmazonReceiptRequest> OnValidateAmazonIAPReceiptRequestEvent;
|
||||
public event PlayFabResultEvent<ValidateAmazonReceiptResult> OnValidateAmazonIAPReceiptResultEvent;
|
||||
public event PlayFabRequestEvent<ValidateGooglePlayPurchaseRequest> OnValidateGooglePlayPurchaseRequestEvent;
|
||||
public event PlayFabResultEvent<ValidateGooglePlayPurchaseResult> OnValidateGooglePlayPurchaseResultEvent;
|
||||
public event PlayFabRequestEvent<ValidateIOSReceiptRequest> OnValidateIOSReceiptRequestEvent;
|
||||
public event PlayFabResultEvent<ValidateIOSReceiptResult> OnValidateIOSReceiptResultEvent;
|
||||
public event PlayFabRequestEvent<ValidateWindowsReceiptRequest> OnValidateWindowsStoreReceiptRequestEvent;
|
||||
public event PlayFabResultEvent<ValidateWindowsReceiptResult> OnValidateWindowsStoreReceiptResultEvent;
|
||||
public event PlayFabRequestEvent<WriteClientCharacterEventRequest> OnWriteCharacterEventRequestEvent;
|
||||
public event PlayFabResultEvent<WriteEventResponse> OnWriteCharacterEventResultEvent;
|
||||
public event PlayFabRequestEvent<WriteClientPlayerEventRequest> OnWritePlayerEventRequestEvent;
|
||||
public event PlayFabResultEvent<WriteEventResponse> OnWritePlayerEventResultEvent;
|
||||
public event PlayFabRequestEvent<WriteTitleEventRequest> OnWriteTitleEventRequestEvent;
|
||||
public event PlayFabResultEvent<WriteEventResponse> OnWriteTitleEventResultEvent;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da33df462ae2fa04cb401398dc2b8a5d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02094465bfb2b7541a0a06763843a2ee
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,244 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.CloudScriptModels;
|
||||
using PlayFab.Internal;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// API methods for executing CloudScript using an Entity Profile
|
||||
/// </summary>
|
||||
public static class PlayFabCloudScriptAPI
|
||||
{
|
||||
static PlayFabCloudScriptAPI() {}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public static bool IsEntityLoggedIn()
|
||||
{
|
||||
return PlayFabSettings.staticPlayer.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public static void ForgetAllCredentials()
|
||||
{
|
||||
PlayFabSettings.staticPlayer.ForgetAllCredentials();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of
|
||||
/// custom server-side functionality you can implement, and it can be used in conjunction with virtually anything.
|
||||
/// </summary>
|
||||
public static void ExecuteEntityCloudScript(ExecuteEntityCloudScriptRequest request, Action<ExecuteCloudScriptResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/ExecuteEntityCloudScript", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of
|
||||
/// custom server-side functionality you can implement, and it can be used in conjunction with virtually anything.
|
||||
/// </summary>
|
||||
public static void ExecuteFunction(ExecuteFunctionRequest request, Action<ExecuteFunctionResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
var localApiServerString = PlayFabSettings.LocalApiServer;
|
||||
if (!string.IsNullOrEmpty(localApiServerString))
|
||||
{
|
||||
var baseUri = new Uri(localApiServerString);
|
||||
var fullUri = new Uri(baseUri, "/CloudScript/ExecuteFunction".TrimStart('/'));
|
||||
PlayFabHttp.MakeApiCallWithFullUri(fullUri.AbsoluteUri, request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
return;
|
||||
}
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/ExecuteFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets registered Azure Functions for a given title id and function name.
|
||||
/// </summary>
|
||||
public static void GetFunction(GetFunctionRequest request, Action<GetFunctionResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/GetFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all currently registered Event Hub triggered Azure Functions for a given title.
|
||||
/// </summary>
|
||||
public static void ListEventHubFunctions(ListFunctionsRequest request, Action<ListEventHubFunctionsResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/ListEventHubFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all currently registered Azure Functions for a given title.
|
||||
/// </summary>
|
||||
public static void ListFunctions(ListFunctionsRequest request, Action<ListFunctionsResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/ListFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all currently registered HTTP triggered Azure Functions for a given title.
|
||||
/// </summary>
|
||||
public static void ListHttpFunctions(ListFunctionsRequest request, Action<ListHttpFunctionsResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/ListHttpFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all currently registered Queue triggered Azure Functions for a given title.
|
||||
/// </summary>
|
||||
public static void ListQueuedFunctions(ListFunctionsRequest request, Action<ListQueuedFunctionsResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/ListQueuedFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate an entity PlayStream event for the provided function result.
|
||||
/// </summary>
|
||||
public static void PostFunctionResultForEntityTriggeredAction(PostFunctionResultForEntityTriggeredActionRequest request, Action<EmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForEntityTriggeredAction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate an entity PlayStream event for the provided function result.
|
||||
/// </summary>
|
||||
public static void PostFunctionResultForFunctionExecution(PostFunctionResultForFunctionExecutionRequest request, Action<EmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForFunctionExecution", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate a player PlayStream event for the provided function result.
|
||||
/// </summary>
|
||||
public static void PostFunctionResultForPlayerTriggeredAction(PostFunctionResultForPlayerTriggeredActionRequest request, Action<EmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForPlayerTriggeredAction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate a PlayStream event for the provided function result.
|
||||
/// </summary>
|
||||
public static void PostFunctionResultForScheduledTask(PostFunctionResultForScheduledTaskRequest request, Action<EmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForScheduledTask", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers an event hub triggered Azure Function with a title.
|
||||
/// </summary>
|
||||
public static void RegisterEventHubFunction(RegisterEventHubFunctionRequest request, Action<EmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/RegisterEventHubFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers an HTTP triggered Azure function with a title.
|
||||
/// </summary>
|
||||
public static void RegisterHttpFunction(RegisterHttpFunctionRequest request, Action<EmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/RegisterHttpFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers a queue triggered Azure Function with a title.
|
||||
/// </summary>
|
||||
public static void RegisterQueuedFunction(RegisterQueuedFunctionRequest request, Action<EmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/RegisterQueuedFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unregisters an Azure Function with a title.
|
||||
/// </summary>
|
||||
public static void UnregisterFunction(UnregisterFunctionRequest request, Action<EmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/CloudScript/UnregisterFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9b8ec61c6ab7d2438b7b65a4dd9ef59
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,224 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.CloudScriptModels;
|
||||
using PlayFab.Internal;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// API methods for executing CloudScript using an Entity Profile
|
||||
/// </summary>
|
||||
public class PlayFabCloudScriptInstanceAPI : IPlayFabInstanceApi
|
||||
{
|
||||
public readonly PlayFabApiSettings apiSettings = null;
|
||||
public readonly PlayFabAuthenticationContext authenticationContext = null;
|
||||
|
||||
public PlayFabCloudScriptInstanceAPI(PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
public PlayFabCloudScriptInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
apiSettings = settings;
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public bool IsEntityLoggedIn()
|
||||
{
|
||||
return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public void ForgetAllCredentials()
|
||||
{
|
||||
if (authenticationContext != null)
|
||||
{
|
||||
authenticationContext.ForgetAllCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of
|
||||
/// custom server-side functionality you can implement, and it can be used in conjunction with virtually anything.
|
||||
/// </summary>
|
||||
public void ExecuteEntityCloudScript(ExecuteEntityCloudScriptRequest request, Action<ExecuteCloudScriptResult> 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("/CloudScript/ExecuteEntityCloudScript", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of
|
||||
/// custom server-side functionality you can implement, and it can be used in conjunction with virtually anything.
|
||||
/// </summary>
|
||||
public void ExecuteFunction(ExecuteFunctionRequest request, Action<ExecuteFunctionResult> 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("/CloudScript/ExecuteFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets registered Azure Functions for a given title id and function name.
|
||||
/// </summary>
|
||||
public void GetFunction(GetFunctionRequest request, Action<GetFunctionResult> 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("/CloudScript/GetFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all currently registered Event Hub triggered Azure Functions for a given title.
|
||||
/// </summary>
|
||||
public void ListEventHubFunctions(ListFunctionsRequest request, Action<ListEventHubFunctionsResult> 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("/CloudScript/ListEventHubFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all currently registered Azure Functions for a given title.
|
||||
/// </summary>
|
||||
public void ListFunctions(ListFunctionsRequest request, Action<ListFunctionsResult> 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("/CloudScript/ListFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all currently registered HTTP triggered Azure Functions for a given title.
|
||||
/// </summary>
|
||||
public void ListHttpFunctions(ListFunctionsRequest request, Action<ListHttpFunctionsResult> 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("/CloudScript/ListHttpFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all currently registered Queue triggered Azure Functions for a given title.
|
||||
/// </summary>
|
||||
public void ListQueuedFunctions(ListFunctionsRequest request, Action<ListQueuedFunctionsResult> 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("/CloudScript/ListQueuedFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate an entity PlayStream event for the provided function result.
|
||||
/// </summary>
|
||||
public void PostFunctionResultForEntityTriggeredAction(PostFunctionResultForEntityTriggeredActionRequest request, Action<EmptyResult> 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("/CloudScript/PostFunctionResultForEntityTriggeredAction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate an entity PlayStream event for the provided function result.
|
||||
/// </summary>
|
||||
public void PostFunctionResultForFunctionExecution(PostFunctionResultForFunctionExecutionRequest request, Action<EmptyResult> 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("/CloudScript/PostFunctionResultForFunctionExecution", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate a player PlayStream event for the provided function result.
|
||||
/// </summary>
|
||||
public void PostFunctionResultForPlayerTriggeredAction(PostFunctionResultForPlayerTriggeredActionRequest request, Action<EmptyResult> 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("/CloudScript/PostFunctionResultForPlayerTriggeredAction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate a PlayStream event for the provided function result.
|
||||
/// </summary>
|
||||
public void PostFunctionResultForScheduledTask(PostFunctionResultForScheduledTaskRequest request, Action<EmptyResult> 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("/CloudScript/PostFunctionResultForScheduledTask", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers an event hub triggered Azure Function with a title.
|
||||
/// </summary>
|
||||
public void RegisterEventHubFunction(RegisterEventHubFunctionRequest request, Action<EmptyResult> 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("/CloudScript/RegisterEventHubFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers an HTTP triggered Azure function with a title.
|
||||
/// </summary>
|
||||
public void RegisterHttpFunction(RegisterHttpFunctionRequest request, Action<EmptyResult> 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("/CloudScript/RegisterHttpFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers a queue triggered Azure Function with a title.
|
||||
/// </summary>
|
||||
public void RegisterQueuedFunction(RegisterQueuedFunctionRequest request, Action<EmptyResult> 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("/CloudScript/RegisterQueuedFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unregisters an Azure Function with a title.
|
||||
/// </summary>
|
||||
public void UnregisterFunction(UnregisterFunctionRequest request, Action<EmptyResult> 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("/CloudScript/UnregisterFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac313c777a2b7054e9632c96829e1f7d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e51e70743e2edab4f88b8de52466db7d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,40 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using PlayFab.CloudScriptModels;
|
||||
|
||||
namespace PlayFab.Events
|
||||
{
|
||||
public partial class PlayFabEvents
|
||||
{
|
||||
public event PlayFabRequestEvent<ExecuteEntityCloudScriptRequest> OnCloudScriptExecuteEntityCloudScriptRequestEvent;
|
||||
public event PlayFabResultEvent<ExecuteCloudScriptResult> OnCloudScriptExecuteEntityCloudScriptResultEvent;
|
||||
public event PlayFabRequestEvent<ExecuteFunctionRequest> OnCloudScriptExecuteFunctionRequestEvent;
|
||||
public event PlayFabResultEvent<ExecuteFunctionResult> OnCloudScriptExecuteFunctionResultEvent;
|
||||
public event PlayFabRequestEvent<GetFunctionRequest> OnCloudScriptGetFunctionRequestEvent;
|
||||
public event PlayFabResultEvent<GetFunctionResult> OnCloudScriptGetFunctionResultEvent;
|
||||
public event PlayFabRequestEvent<ListFunctionsRequest> OnCloudScriptListEventHubFunctionsRequestEvent;
|
||||
public event PlayFabResultEvent<ListEventHubFunctionsResult> OnCloudScriptListEventHubFunctionsResultEvent;
|
||||
public event PlayFabRequestEvent<ListFunctionsRequest> OnCloudScriptListFunctionsRequestEvent;
|
||||
public event PlayFabResultEvent<ListFunctionsResult> OnCloudScriptListFunctionsResultEvent;
|
||||
public event PlayFabRequestEvent<ListFunctionsRequest> OnCloudScriptListHttpFunctionsRequestEvent;
|
||||
public event PlayFabResultEvent<ListHttpFunctionsResult> OnCloudScriptListHttpFunctionsResultEvent;
|
||||
public event PlayFabRequestEvent<ListFunctionsRequest> OnCloudScriptListQueuedFunctionsRequestEvent;
|
||||
public event PlayFabResultEvent<ListQueuedFunctionsResult> OnCloudScriptListQueuedFunctionsResultEvent;
|
||||
public event PlayFabRequestEvent<PostFunctionResultForEntityTriggeredActionRequest> OnCloudScriptPostFunctionResultForEntityTriggeredActionRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResult> OnCloudScriptPostFunctionResultForEntityTriggeredActionResultEvent;
|
||||
public event PlayFabRequestEvent<PostFunctionResultForFunctionExecutionRequest> OnCloudScriptPostFunctionResultForFunctionExecutionRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResult> OnCloudScriptPostFunctionResultForFunctionExecutionResultEvent;
|
||||
public event PlayFabRequestEvent<PostFunctionResultForPlayerTriggeredActionRequest> OnCloudScriptPostFunctionResultForPlayerTriggeredActionRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResult> OnCloudScriptPostFunctionResultForPlayerTriggeredActionResultEvent;
|
||||
public event PlayFabRequestEvent<PostFunctionResultForScheduledTaskRequest> OnCloudScriptPostFunctionResultForScheduledTaskRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResult> OnCloudScriptPostFunctionResultForScheduledTaskResultEvent;
|
||||
public event PlayFabRequestEvent<RegisterEventHubFunctionRequest> OnCloudScriptRegisterEventHubFunctionRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResult> OnCloudScriptRegisterEventHubFunctionResultEvent;
|
||||
public event PlayFabRequestEvent<RegisterHttpFunctionRequest> OnCloudScriptRegisterHttpFunctionRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResult> OnCloudScriptRegisterHttpFunctionResultEvent;
|
||||
public event PlayFabRequestEvent<RegisterQueuedFunctionRequest> OnCloudScriptRegisterQueuedFunctionRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResult> OnCloudScriptRegisterQueuedFunctionResultEvent;
|
||||
public event PlayFabRequestEvent<UnregisterFunctionRequest> OnCloudScriptUnregisterFunctionRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResult> OnCloudScriptUnregisterFunctionResultEvent;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea444771567a8e747be86eb07cdef93a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f754faf8b4b186c438c8419bed778294
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,133 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.DataModels;
|
||||
using PlayFab.Internal;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// Store arbitrary data associated with an entity. Objects are small (~1KB) JSON-compatible objects which are stored
|
||||
/// directly on the entity profile. Objects are made available for use in other PlayFab contexts, such as PlayStream events
|
||||
/// and CloudScript functions. Files can efficiently store data of any size or format. Both objects and files support a
|
||||
/// flexible permissions system to control read and write access by other entities.
|
||||
/// </summary>
|
||||
public static class PlayFabDataAPI
|
||||
{
|
||||
static PlayFabDataAPI() {}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public static bool IsEntityLoggedIn()
|
||||
{
|
||||
return PlayFabSettings.staticPlayer.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public static void ForgetAllCredentials()
|
||||
{
|
||||
PlayFabSettings.staticPlayer.ForgetAllCredentials();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Abort pending file uploads to an entity's profile.
|
||||
/// </summary>
|
||||
public static void AbortFileUploads(AbortFileUploadsRequest request, Action<AbortFileUploadsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/File/AbortFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete files on an entity's profile.
|
||||
/// </summary>
|
||||
public static void DeleteFiles(DeleteFilesRequest request, Action<DeleteFilesResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/File/DeleteFiles", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finalize file uploads to an entity's profile.
|
||||
/// </summary>
|
||||
public static void FinalizeFileUploads(FinalizeFileUploadsRequest request, Action<FinalizeFileUploadsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/File/FinalizeFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves file metadata from an entity's profile.
|
||||
/// </summary>
|
||||
public static void GetFiles(GetFilesRequest request, Action<GetFilesResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/File/GetFiles", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves objects from an entity's profile.
|
||||
/// </summary>
|
||||
public static void GetObjects(GetObjectsRequest request, Action<GetObjectsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Object/GetObjects", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initiates file uploads to an entity's profile.
|
||||
/// </summary>
|
||||
public static void InitiateFileUploads(InitiateFileUploadsRequest request, Action<InitiateFileUploadsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/File/InitiateFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets objects on an entity's profile.
|
||||
/// </summary>
|
||||
public static void SetObjects(SetObjectsRequest request, Action<SetObjectsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Object/SetObjects", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1cb3cb06f2399ca44ad3395fed658494
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,137 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.DataModels;
|
||||
using PlayFab.Internal;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// Store arbitrary data associated with an entity. Objects are small (~1KB) JSON-compatible objects which are stored
|
||||
/// directly on the entity profile. Objects are made available for use in other PlayFab contexts, such as PlayStream events
|
||||
/// and CloudScript functions. Files can efficiently store data of any size or format. Both objects and files support a
|
||||
/// flexible permissions system to control read and write access by other entities.
|
||||
/// </summary>
|
||||
public class PlayFabDataInstanceAPI : IPlayFabInstanceApi
|
||||
{
|
||||
public readonly PlayFabApiSettings apiSettings = null;
|
||||
public readonly PlayFabAuthenticationContext authenticationContext = null;
|
||||
|
||||
public PlayFabDataInstanceAPI(PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
public PlayFabDataInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
apiSettings = settings;
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public bool IsEntityLoggedIn()
|
||||
{
|
||||
return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public void ForgetAllCredentials()
|
||||
{
|
||||
if (authenticationContext != null)
|
||||
{
|
||||
authenticationContext.ForgetAllCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Abort pending file uploads to an entity's profile.
|
||||
/// </summary>
|
||||
public void AbortFileUploads(AbortFileUploadsRequest request, Action<AbortFileUploadsResponse> 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("/File/AbortFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete files on an entity's profile.
|
||||
/// </summary>
|
||||
public void DeleteFiles(DeleteFilesRequest request, Action<DeleteFilesResponse> 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("/File/DeleteFiles", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finalize file uploads to an entity's profile.
|
||||
/// </summary>
|
||||
public void FinalizeFileUploads(FinalizeFileUploadsRequest request, Action<FinalizeFileUploadsResponse> 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("/File/FinalizeFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves file metadata from an entity's profile.
|
||||
/// </summary>
|
||||
public void GetFiles(GetFilesRequest request, Action<GetFilesResponse> 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("/File/GetFiles", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves objects from an entity's profile.
|
||||
/// </summary>
|
||||
public void GetObjects(GetObjectsRequest request, Action<GetObjectsResponse> 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("/Object/GetObjects", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initiates file uploads to an entity's profile.
|
||||
/// </summary>
|
||||
public void InitiateFileUploads(InitiateFileUploadsRequest request, Action<InitiateFileUploadsResponse> 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("/File/InitiateFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets objects on an entity's profile.
|
||||
/// </summary>
|
||||
public void SetObjects(SetObjectsRequest request, Action<SetObjectsResponse> 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("/Object/SetObjects", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c754c6db47f4d943954121319b071d6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,404 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab.DataModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Aborts the pending upload of the requested files.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AbortFileUploadsRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// Names of the files to have their pending uploads aborted.
|
||||
/// </summary>
|
||||
public List<string> FileNames;
|
||||
/// <summary>
|
||||
/// The expected version of the profile, if set and doesn't match the current version of the profile the operation will not
|
||||
/// be performed.
|
||||
/// </summary>
|
||||
public int? ProfileVersion;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AbortFileUploadsResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity id and type.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The current version of the profile, can be used for concurrency control during updates.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the requested files from the entity's profile.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DeleteFilesRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// Names of the files to be deleted.
|
||||
/// </summary>
|
||||
public List<string> FileNames;
|
||||
/// <summary>
|
||||
/// The expected version of the profile, if set and doesn't match the current version of the profile the operation will not
|
||||
/// be performed.
|
||||
/// </summary>
|
||||
public int? ProfileVersion;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteFilesResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity id and type.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The current version of the profile, can be used for concurrency control during updates.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Combined entity type and ID structure which uniquely identifies a single entity.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class EntityKey : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique ID of the entity.
|
||||
/// </summary>
|
||||
public string Id;
|
||||
/// <summary>
|
||||
/// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
|
||||
/// </summary>
|
||||
public string Type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finalizes the upload of the requested files. Verifies that the files have been successfully uploaded and moves the file
|
||||
/// pointers from pending to live.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class FinalizeFileUploadsRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// Names of the files to be finalized. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.'
|
||||
/// </summary>
|
||||
public List<string> FileNames;
|
||||
/// <summary>
|
||||
/// The current version of the profile, can be used for concurrency control during updates.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class FinalizeFileUploadsResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity id and type.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// Collection of metadata for the entity's files
|
||||
/// </summary>
|
||||
public Dictionary<string,GetFileMetadata> Metadata;
|
||||
/// <summary>
|
||||
/// The current version of the profile, can be used for concurrency control during updates.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetFileMetadata : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Checksum value for the file, can be used to check if the file on the server has changed.
|
||||
/// </summary>
|
||||
public string Checksum;
|
||||
/// <summary>
|
||||
/// Download URL where the file can be retrieved
|
||||
/// </summary>
|
||||
public string DownloadUrl;
|
||||
/// <summary>
|
||||
/// Name of the file
|
||||
/// </summary>
|
||||
public string FileName;
|
||||
/// <summary>
|
||||
/// Last UTC time the file was modified
|
||||
/// </summary>
|
||||
public DateTime LastModified;
|
||||
/// <summary>
|
||||
/// Storage service's reported byte count
|
||||
/// </summary>
|
||||
public int Size;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns URLs that may be used to download the files for a profile for a limited length of time. Only returns files that
|
||||
/// have been successfully uploaded, files that are still pending will either return the old value, if it exists, or
|
||||
/// nothing.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GetFilesRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetFilesResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity id and type.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// Collection of metadata for the entity's files
|
||||
/// </summary>
|
||||
public Dictionary<string,GetFileMetadata> Metadata;
|
||||
/// <summary>
|
||||
/// The current version of the profile, can be used for concurrency control during updates.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets JSON objects from an entity profile and returns it.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GetObjectsRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// Determines whether the object will be returned as an escaped JSON string or as a un-escaped JSON object. Default is JSON
|
||||
/// object.
|
||||
/// </summary>
|
||||
public bool? EscapeObject;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetObjectsResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity id and type.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// Requested objects that the calling entity has access to
|
||||
/// </summary>
|
||||
public Dictionary<string,ObjectResult> Objects;
|
||||
/// <summary>
|
||||
/// The current version of the profile, can be used for concurrency control during updates.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class InitiateFileUploadMetadata : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the file.
|
||||
/// </summary>
|
||||
public string FileName;
|
||||
/// <summary>
|
||||
/// Location the data should be sent to via an HTTP PUT operation.
|
||||
/// </summary>
|
||||
public string UploadUrl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns URLs that may be used to upload the files for a profile 5 minutes. After using the upload calls
|
||||
/// FinalizeFileUploads must be called to move the file status from pending to live.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class InitiateFileUploadsRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// Names of the files to be set. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.'
|
||||
/// </summary>
|
||||
public List<string> FileNames;
|
||||
/// <summary>
|
||||
/// The expected version of the profile, if set and doesn't match the current version of the profile the operation will not
|
||||
/// be performed.
|
||||
/// </summary>
|
||||
public int? ProfileVersion;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class InitiateFileUploadsResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity id and type.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The current version of the profile, can be used for concurrency control during updates.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
/// <summary>
|
||||
/// Collection of file names and upload urls
|
||||
/// </summary>
|
||||
public List<InitiateFileUploadMetadata> UploadDetails;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ObjectResult : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Un-escaped JSON object, if EscapeObject false or default.
|
||||
/// </summary>
|
||||
public object DataObject;
|
||||
/// <summary>
|
||||
/// Escaped string JSON body of the object, if EscapeObject is true.
|
||||
/// </summary>
|
||||
public string EscapedDataObject;
|
||||
/// <summary>
|
||||
/// Name of the object. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.'
|
||||
/// </summary>
|
||||
public string ObjectName;
|
||||
}
|
||||
|
||||
public enum OperationTypes
|
||||
{
|
||||
Created,
|
||||
Updated,
|
||||
Deleted,
|
||||
None
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class SetObject : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Body of the object to be saved. If empty and DeleteObject is true object will be deleted if it exists, or no operation
|
||||
/// will occur if it does not exist. Only one of Object or EscapedDataObject fields may be used.
|
||||
/// </summary>
|
||||
public object DataObject;
|
||||
/// <summary>
|
||||
/// Flag to indicate that this object should be deleted. Both DataObject and EscapedDataObject must not be set as well.
|
||||
/// </summary>
|
||||
public bool? DeleteObject;
|
||||
/// <summary>
|
||||
/// Body of the object to be saved as an escaped JSON string. If empty and DeleteObject is true object will be deleted if it
|
||||
/// exists, or no operation will occur if it does not exist. Only one of DataObject or EscapedDataObject fields may be used.
|
||||
/// </summary>
|
||||
public string EscapedDataObject;
|
||||
/// <summary>
|
||||
/// Name of object. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.'.
|
||||
/// </summary>
|
||||
public string ObjectName;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class SetObjectInfo : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the object
|
||||
/// </summary>
|
||||
public string ObjectName;
|
||||
/// <summary>
|
||||
/// Optional reason to explain why the operation was the result that it was.
|
||||
/// </summary>
|
||||
public string OperationReason;
|
||||
/// <summary>
|
||||
/// Indicates which operation was completed, either Created, Updated, Deleted or None.
|
||||
/// </summary>
|
||||
public OperationTypes? SetResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets JSON objects on the requested entity profile. May include a version number to be used to perform optimistic
|
||||
/// concurrency operations during update. If the current version differs from the version in the request the request will be
|
||||
/// ignored. If no version is set on the request then the value will always be updated if the values differ. Using the
|
||||
/// version value does not guarantee a write though, ConcurrentEditError may still occur if multiple clients are attempting
|
||||
/// to update the same profile.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class SetObjectsRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// Optional field used for concurrency control. By specifying the previously returned value of ProfileVersion from
|
||||
/// GetProfile API, you can ensure that the object set will only be performed if the profile has not been updated by any
|
||||
/// other clients since the version you last loaded.
|
||||
/// </summary>
|
||||
public int? ExpectedProfileVersion;
|
||||
/// <summary>
|
||||
/// Collection of objects to set on the profile.
|
||||
/// </summary>
|
||||
public List<SetObject> Objects;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class SetObjectsResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// New version of the entity profile.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
/// <summary>
|
||||
/// New version of the entity profile.
|
||||
/// </summary>
|
||||
public List<SetObjectInfo> SetResults;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ab3048b1bd63d747b28b2fe0b181743
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,24 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using PlayFab.DataModels;
|
||||
|
||||
namespace PlayFab.Events
|
||||
{
|
||||
public partial class PlayFabEvents
|
||||
{
|
||||
public event PlayFabRequestEvent<AbortFileUploadsRequest> OnDataAbortFileUploadsRequestEvent;
|
||||
public event PlayFabResultEvent<AbortFileUploadsResponse> OnDataAbortFileUploadsResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteFilesRequest> OnDataDeleteFilesRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteFilesResponse> OnDataDeleteFilesResultEvent;
|
||||
public event PlayFabRequestEvent<FinalizeFileUploadsRequest> OnDataFinalizeFileUploadsRequestEvent;
|
||||
public event PlayFabResultEvent<FinalizeFileUploadsResponse> OnDataFinalizeFileUploadsResultEvent;
|
||||
public event PlayFabRequestEvent<GetFilesRequest> OnDataGetFilesRequestEvent;
|
||||
public event PlayFabResultEvent<GetFilesResponse> OnDataGetFilesResultEvent;
|
||||
public event PlayFabRequestEvent<GetObjectsRequest> OnDataGetObjectsRequestEvent;
|
||||
public event PlayFabResultEvent<GetObjectsResponse> OnDataGetObjectsResultEvent;
|
||||
public event PlayFabRequestEvent<InitiateFileUploadsRequest> OnDataInitiateFileUploadsRequestEvent;
|
||||
public event PlayFabResultEvent<InitiateFileUploadsResponse> OnDataInitiateFileUploadsResultEvent;
|
||||
public event PlayFabRequestEvent<SetObjectsRequest> OnDataSetObjectsRequestEvent;
|
||||
public event PlayFabResultEvent<SetObjectsResponse> OnDataSetObjectsResultEvent;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: deeaf7c863e34d24591edc6c7cf96650
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ecd0b4fece474db4098610599e27e9af
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,685 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.EconomyModels;
|
||||
using PlayFab.Internal;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// API methods for managing the catalog. Inventory manages in-game assets for any given entity.
|
||||
/// </summary>
|
||||
public static class PlayFabEconomyAPI
|
||||
{
|
||||
static PlayFabEconomyAPI() {}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public static bool IsEntityLoggedIn()
|
||||
{
|
||||
return PlayFabSettings.staticPlayer.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public static void ForgetAllCredentials()
|
||||
{
|
||||
PlayFabSettings.staticPlayer.ForgetAllCredentials();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add inventory items. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is uncapped.
|
||||
/// </summary>
|
||||
public static void AddInventoryItems(AddInventoryItemsRequest request, Action<AddInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/AddInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new item in the working catalog using provided metadata.
|
||||
/// </summary>
|
||||
public static void CreateDraftItem(CreateDraftItemRequest request, Action<CreateDraftItemResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/CreateDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates one or more upload URLs which can be used by the client to upload raw file data. Content URls and uploaded
|
||||
/// content will be garbage collected after 24 hours if not attached to a draft or published item. Detailed pricing info
|
||||
/// around uploading content can be found here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/pricing/meters/catalog-meters
|
||||
/// </summary>
|
||||
public static void CreateUploadUrls(CreateUploadUrlsRequest request, Action<CreateUploadUrlsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/CreateUploadUrls", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes all reviews, helpfulness votes, and ratings submitted by the entity specified.
|
||||
/// </summary>
|
||||
public static void DeleteEntityItemReviews(DeleteEntityItemReviewsRequest request, Action<DeleteEntityItemReviewsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/DeleteEntityItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete an Inventory Collection. More information about Inventory Collections can be found here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/inventory/collections
|
||||
/// </summary>
|
||||
public static void DeleteInventoryCollection(DeleteInventoryCollectionRequest request, Action<DeleteInventoryCollectionResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/DeleteInventoryCollection", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete inventory items
|
||||
/// </summary>
|
||||
public static void DeleteInventoryItems(DeleteInventoryItemsRequest request, Action<DeleteInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/DeleteInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an item from working catalog and all published versions from the public catalog.
|
||||
/// </summary>
|
||||
public static void DeleteItem(DeleteItemRequest request, Action<DeleteItemResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/DeleteItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Execute a list of Inventory Operations. A maximum list of 50 operations can be performed by a single request. There is
|
||||
/// also a limit to 300 items that can be modified/added in a single request. For example, adding a bundle with 50 items
|
||||
/// counts as 50 items modified. All operations must be done within a single inventory collection. This API has a reduced
|
||||
/// RPS compared to an individual inventory operation with Player Entities limited to 60 requests in 90 seconds.
|
||||
/// </summary>
|
||||
public static void ExecuteInventoryOperations(ExecuteInventoryOperationsRequest request, Action<ExecuteInventoryOperationsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/ExecuteInventoryOperations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer a list of inventory items. A maximum list of 50 operations can be performed by a single request. When the
|
||||
/// response code is 202, one or more operations did not complete within the timeframe of the request. You can identify the
|
||||
/// pending operations by looking for OperationStatus = 'InProgress'. You can check on the operation status at anytime
|
||||
/// within 1 day of the request by passing the TransactionToken to the GetInventoryOperationStatus API.
|
||||
/// </summary>
|
||||
public static void ExecuteTransferOperations(ExecuteTransferOperationsRequest request, Action<ExecuteTransferOperationsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/ExecuteTransferOperations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration for the catalog. Only Title Entities can call this API. There is a limit of 100 requests in 10
|
||||
/// seconds for this API. More information about the Catalog Config can be found here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/settings
|
||||
/// </summary>
|
||||
public static void GetCatalogConfig(GetCatalogConfigRequest request, Action<GetCatalogConfigResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetCatalogConfig", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves an item from the working catalog. This item represents the current working state of the item. GetDraftItem
|
||||
/// does not work off a cache of the Catalog and should be used when trying to get recent item updates. However, please note
|
||||
/// that item references data is cached and may take a few moments for changes to propagate.
|
||||
/// </summary>
|
||||
public static void GetDraftItem(GetDraftItemRequest request, Action<GetDraftItemResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a paginated list of the items from the draft catalog. Up to 50 IDs can be retrieved in a single request.
|
||||
/// GetDraftItems does not work off a cache of the Catalog and should be used when trying to get recent item updates.
|
||||
/// </summary>
|
||||
public static void GetDraftItems(GetDraftItemsRequest request, Action<GetDraftItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetDraftItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a paginated list of the items from the draft catalog created by the Entity. Up to 50 items can be returned at
|
||||
/// once. You can use continuation tokens to paginate through results that return greater than the limit.
|
||||
/// GetEntityDraftItems does not work off a cache of the Catalog and should be used when trying to get recent item updates.
|
||||
/// </summary>
|
||||
public static void GetEntityDraftItems(GetEntityDraftItemsRequest request, Action<GetEntityDraftItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetEntityDraftItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the submitted review for the specified item by the authenticated entity. Individual ratings and reviews data update
|
||||
/// in near real time with delays within a few seconds.
|
||||
/// </summary>
|
||||
public static void GetEntityItemReview(GetEntityItemReviewRequest request, Action<GetEntityItemReviewResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetEntityItemReview", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Inventory Collection Ids. Up to 50 Ids can be returned at once (or 250 with response compression enabled). You can
|
||||
/// use continuation tokens to paginate through results that return greater than the limit. It can take a few seconds for
|
||||
/// new collection Ids to show up.
|
||||
/// </summary>
|
||||
public static void GetInventoryCollectionIds(GetInventoryCollectionIdsRequest request, Action<GetInventoryCollectionIdsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/GetInventoryCollectionIds", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get current inventory items.
|
||||
/// </summary>
|
||||
public static void GetInventoryItems(GetInventoryItemsRequest request, Action<GetInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/GetInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the status of an inventory operation using an OperationToken. You can check on the operation status at anytime
|
||||
/// within 1 day of the request by passing the TransactionToken to the this API.
|
||||
/// </summary>
|
||||
public static void GetInventoryOperationStatus(GetInventoryOperationStatusRequest request, Action<GetInventoryOperationStatusResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/GetInventoryOperationStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves an item from the public catalog. GetItem does not work off a cache of the Catalog and should be used when
|
||||
/// trying to get recent item updates. However, please note that item references data is cached and may take a few moments
|
||||
/// for changes to propagate.
|
||||
/// </summary>
|
||||
public static void GetItem(GetItemRequest request, Action<GetItemResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Search for a given item and return a set of bundles and stores containing the item. Up to 50 items can be returned at
|
||||
/// once. You can use continuation tokens to paginate through results that return greater than the limit. This API is
|
||||
/// intended for tooling/automation scenarios and has a reduced RPS with Player Entities limited to 30 requests in 300
|
||||
/// seconds and Title Entities limited to 100 requests in 10 seconds.
|
||||
/// </summary>
|
||||
public static void GetItemContainers(GetItemContainersRequest request, Action<GetItemContainersResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetItemContainers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the moderation state for an item, including the concern category and string reason. More information about
|
||||
/// moderation states can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/ugc/moderation
|
||||
/// </summary>
|
||||
public static void GetItemModerationState(GetItemModerationStateRequest request, Action<GetItemModerationStateResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetItemModerationState", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the status of a publish of an item.
|
||||
/// </summary>
|
||||
public static void GetItemPublishStatus(GetItemPublishStatusRequest request, Action<GetItemPublishStatusResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetItemPublishStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a paginated set of reviews associated with the specified item. Individual ratings and reviews data update in near
|
||||
/// real time with delays within a few seconds.
|
||||
/// </summary>
|
||||
public static void GetItemReviews(GetItemReviewsRequest request, Action<GetItemReviewsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a summary of all ratings and reviews associated with the specified item. Summary ratings data is cached with update
|
||||
/// data coming within 15 minutes.
|
||||
/// </summary>
|
||||
public static void GetItemReviewSummary(GetItemReviewSummaryRequest request, Action<GetItemReviewSummaryResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetItemReviewSummary", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves items from the public catalog. Up to 50 items can be returned at once. GetItems does not work off a cache of
|
||||
/// the Catalog and should be used when trying to get recent item updates. However, please note that item references data is
|
||||
/// cached and may take a few moments for changes to propagate.
|
||||
/// </summary>
|
||||
public static void GetItems(GetItemsRequest request, Action<GetItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/GetItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the access tokens.
|
||||
/// </summary>
|
||||
public static void GetMicrosoftStoreAccessTokens(GetMicrosoftStoreAccessTokensRequest request, Action<GetMicrosoftStoreAccessTokensResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/GetMicrosoftStoreAccessTokens", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get transaction history for a player. Up to 250 Events can be returned at once. You can use continuation tokens to
|
||||
/// paginate through results that return greater than the limit. Getting transaction history has a lower RPS limit than
|
||||
/// getting a Player's inventory with Player Entities having a limit of 30 requests in 300 seconds.
|
||||
/// </summary>
|
||||
public static void GetTransactionHistory(GetTransactionHistoryRequest request, Action<GetTransactionHistoryResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/GetTransactionHistory", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initiates a publish of an item from the working catalog to the public catalog. You can use the GetItemPublishStatus API
|
||||
/// to track the state of the item publish.
|
||||
/// </summary>
|
||||
public static void PublishDraftItem(PublishDraftItemRequest request, Action<PublishDraftItemResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/PublishDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Purchase an item or bundle. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is
|
||||
/// uncapped.
|
||||
/// </summary>
|
||||
public static void PurchaseInventoryItems(PurchaseInventoryItemsRequest request, Action<PurchaseInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/PurchaseInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public static void RedeemAppleAppStoreInventoryItems(RedeemAppleAppStoreInventoryItemsRequest request, Action<RedeemAppleAppStoreInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/RedeemAppleAppStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public static void RedeemGooglePlayInventoryItems(RedeemGooglePlayInventoryItemsRequest request, Action<RedeemGooglePlayInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/RedeemGooglePlayInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public static void RedeemMicrosoftStoreInventoryItems(RedeemMicrosoftStoreInventoryItemsRequest request, Action<RedeemMicrosoftStoreInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/RedeemMicrosoftStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public static void RedeemNintendoEShopInventoryItems(RedeemNintendoEShopInventoryItemsRequest request, Action<RedeemNintendoEShopInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/RedeemNintendoEShopInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public static void RedeemPlayStationStoreInventoryItems(RedeemPlayStationStoreInventoryItemsRequest request, Action<RedeemPlayStationStoreInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/RedeemPlayStationStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public static void RedeemSteamInventoryItems(RedeemSteamInventoryItemsRequest request, Action<RedeemSteamInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/RedeemSteamInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Submit a report for an item, indicating in what way the item is inappropriate.
|
||||
/// </summary>
|
||||
public static void ReportItem(ReportItemRequest request, Action<ReportItemResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/ReportItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Submit a report for a review
|
||||
/// </summary>
|
||||
public static void ReportItemReview(ReportItemReviewRequest request, Action<ReportItemReviewResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/ReportItemReview", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates or updates a review for the specified item. More information around the caching surrounding item ratings and
|
||||
/// reviews can be found here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/ratings#ratings-design-and-caching
|
||||
/// </summary>
|
||||
public static void ReviewItem(ReviewItemRequest request, Action<ReviewItemResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/ReviewItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes a search against the public catalog using the provided search parameters and returns a set of paginated
|
||||
/// results. SearchItems uses a cache of the catalog with item updates taking up to a few minutes to propagate. You should
|
||||
/// use the GetItem API for when trying to immediately get recent item updates. More information about the Search API can be
|
||||
/// found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/search
|
||||
/// </summary>
|
||||
public static void SearchItems(SearchItemsRequest request, Action<SearchItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/SearchItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the moderation state for an item, including the concern category and string reason. More information about
|
||||
/// moderation states can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/ugc/moderation
|
||||
/// </summary>
|
||||
public static void SetItemModerationState(SetItemModerationStateRequest request, Action<SetItemModerationStateResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/SetItemModerationState", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Submit a vote for a review, indicating whether the review was helpful or unhelpful.
|
||||
/// </summary>
|
||||
public static void SubmitItemReviewVote(SubmitItemReviewVoteRequest request, Action<SubmitItemReviewVoteResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/SubmitItemReviewVote", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Subtract inventory items.
|
||||
/// </summary>
|
||||
public static void SubtractInventoryItems(SubtractInventoryItemsRequest request, Action<SubtractInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/SubtractInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Submit a request to takedown one or more reviews.
|
||||
/// </summary>
|
||||
public static void TakedownItemReviews(TakedownItemReviewsRequest request, Action<TakedownItemReviewsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/TakedownItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer inventory items. When transferring across collections, a 202 response indicates that the transfer did not
|
||||
/// complete within the timeframe of the request. You can identify the pending operations by looking for OperationStatus =
|
||||
/// 'InProgress'. You can check on the operation status at anytime within 1 day of the request by passing the
|
||||
/// TransactionToken to the GetInventoryOperationStatus API. More information about item transfer scenarios can be found
|
||||
/// here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/inventory/?tabs=inventory-game-manager#transfer-inventory-items
|
||||
/// </summary>
|
||||
public static void TransferInventoryItems(TransferInventoryItemsRequest request, Action<TransferInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/TransferInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the configuration for the catalog. Only Title Entities can call this API. There is a limit of 10 requests in 10
|
||||
/// seconds for this API. More information about the Catalog Config can be found here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/settings
|
||||
/// </summary>
|
||||
public static void UpdateCatalogConfig(UpdateCatalogConfigRequest request, Action<UpdateCatalogConfigResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/UpdateCatalogConfig", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update the metadata for an item in the working catalog.
|
||||
/// </summary>
|
||||
public static void UpdateDraftItem(UpdateDraftItemRequest request, Action<UpdateDraftItemResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Catalog/UpdateDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update inventory items
|
||||
/// </summary>
|
||||
public static void UpdateInventoryItems(UpdateInventoryItemsRequest request, Action<UpdateInventoryItemsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Inventory/UpdateInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56036e5215ab72544b38afa65f5684e0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,611 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.EconomyModels;
|
||||
using PlayFab.Internal;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// API methods for managing the catalog. Inventory manages in-game assets for any given entity.
|
||||
/// </summary>
|
||||
public class PlayFabEconomyInstanceAPI : IPlayFabInstanceApi
|
||||
{
|
||||
public readonly PlayFabApiSettings apiSettings = null;
|
||||
public readonly PlayFabAuthenticationContext authenticationContext = null;
|
||||
|
||||
public PlayFabEconomyInstanceAPI(PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
public PlayFabEconomyInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
apiSettings = settings;
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public bool IsEntityLoggedIn()
|
||||
{
|
||||
return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public void ForgetAllCredentials()
|
||||
{
|
||||
if (authenticationContext != null)
|
||||
{
|
||||
authenticationContext.ForgetAllCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add inventory items. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is uncapped.
|
||||
/// </summary>
|
||||
public void AddInventoryItems(AddInventoryItemsRequest request, Action<AddInventoryItemsResponse> 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("/Inventory/AddInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new item in the working catalog using provided metadata.
|
||||
/// </summary>
|
||||
public void CreateDraftItem(CreateDraftItemRequest request, Action<CreateDraftItemResponse> 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("/Catalog/CreateDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates one or more upload URLs which can be used by the client to upload raw file data. Content URls and uploaded
|
||||
/// content will be garbage collected after 24 hours if not attached to a draft or published item. Detailed pricing info
|
||||
/// around uploading content can be found here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/pricing/meters/catalog-meters
|
||||
/// </summary>
|
||||
public void CreateUploadUrls(CreateUploadUrlsRequest request, Action<CreateUploadUrlsResponse> 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("/Catalog/CreateUploadUrls", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes all reviews, helpfulness votes, and ratings submitted by the entity specified.
|
||||
/// </summary>
|
||||
public void DeleteEntityItemReviews(DeleteEntityItemReviewsRequest request, Action<DeleteEntityItemReviewsResponse> 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("/Catalog/DeleteEntityItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete an Inventory Collection. More information about Inventory Collections can be found here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/inventory/collections
|
||||
/// </summary>
|
||||
public void DeleteInventoryCollection(DeleteInventoryCollectionRequest request, Action<DeleteInventoryCollectionResponse> 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("/Inventory/DeleteInventoryCollection", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete inventory items
|
||||
/// </summary>
|
||||
public void DeleteInventoryItems(DeleteInventoryItemsRequest request, Action<DeleteInventoryItemsResponse> 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("/Inventory/DeleteInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an item from working catalog and all published versions from the public catalog.
|
||||
/// </summary>
|
||||
public void DeleteItem(DeleteItemRequest request, Action<DeleteItemResponse> 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("/Catalog/DeleteItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Execute a list of Inventory Operations. A maximum list of 50 operations can be performed by a single request. There is
|
||||
/// also a limit to 300 items that can be modified/added in a single request. For example, adding a bundle with 50 items
|
||||
/// counts as 50 items modified. All operations must be done within a single inventory collection. This API has a reduced
|
||||
/// RPS compared to an individual inventory operation with Player Entities limited to 60 requests in 90 seconds.
|
||||
/// </summary>
|
||||
public void ExecuteInventoryOperations(ExecuteInventoryOperationsRequest request, Action<ExecuteInventoryOperationsResponse> 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("/Inventory/ExecuteInventoryOperations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer a list of inventory items. A maximum list of 50 operations can be performed by a single request. When the
|
||||
/// response code is 202, one or more operations did not complete within the timeframe of the request. You can identify the
|
||||
/// pending operations by looking for OperationStatus = 'InProgress'. You can check on the operation status at anytime
|
||||
/// within 1 day of the request by passing the TransactionToken to the GetInventoryOperationStatus API.
|
||||
/// </summary>
|
||||
public void ExecuteTransferOperations(ExecuteTransferOperationsRequest request, Action<ExecuteTransferOperationsResponse> 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("/Inventory/ExecuteTransferOperations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration for the catalog. Only Title Entities can call this API. There is a limit of 100 requests in 10
|
||||
/// seconds for this API. More information about the Catalog Config can be found here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/settings
|
||||
/// </summary>
|
||||
public void GetCatalogConfig(GetCatalogConfigRequest request, Action<GetCatalogConfigResponse> 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("/Catalog/GetCatalogConfig", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves an item from the working catalog. This item represents the current working state of the item. GetDraftItem
|
||||
/// does not work off a cache of the Catalog and should be used when trying to get recent item updates. However, please note
|
||||
/// that item references data is cached and may take a few moments for changes to propagate.
|
||||
/// </summary>
|
||||
public void GetDraftItem(GetDraftItemRequest request, Action<GetDraftItemResponse> 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("/Catalog/GetDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a paginated list of the items from the draft catalog. Up to 50 IDs can be retrieved in a single request.
|
||||
/// GetDraftItems does not work off a cache of the Catalog and should be used when trying to get recent item updates.
|
||||
/// </summary>
|
||||
public void GetDraftItems(GetDraftItemsRequest request, Action<GetDraftItemsResponse> 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("/Catalog/GetDraftItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a paginated list of the items from the draft catalog created by the Entity. Up to 50 items can be returned at
|
||||
/// once. You can use continuation tokens to paginate through results that return greater than the limit.
|
||||
/// GetEntityDraftItems does not work off a cache of the Catalog and should be used when trying to get recent item updates.
|
||||
/// </summary>
|
||||
public void GetEntityDraftItems(GetEntityDraftItemsRequest request, Action<GetEntityDraftItemsResponse> 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("/Catalog/GetEntityDraftItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the submitted review for the specified item by the authenticated entity. Individual ratings and reviews data update
|
||||
/// in near real time with delays within a few seconds.
|
||||
/// </summary>
|
||||
public void GetEntityItemReview(GetEntityItemReviewRequest request, Action<GetEntityItemReviewResponse> 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("/Catalog/GetEntityItemReview", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Inventory Collection Ids. Up to 50 Ids can be returned at once (or 250 with response compression enabled). You can
|
||||
/// use continuation tokens to paginate through results that return greater than the limit. It can take a few seconds for
|
||||
/// new collection Ids to show up.
|
||||
/// </summary>
|
||||
public void GetInventoryCollectionIds(GetInventoryCollectionIdsRequest request, Action<GetInventoryCollectionIdsResponse> 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("/Inventory/GetInventoryCollectionIds", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get current inventory items.
|
||||
/// </summary>
|
||||
public void GetInventoryItems(GetInventoryItemsRequest request, Action<GetInventoryItemsResponse> 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("/Inventory/GetInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the status of an inventory operation using an OperationToken. You can check on the operation status at anytime
|
||||
/// within 1 day of the request by passing the TransactionToken to the this API.
|
||||
/// </summary>
|
||||
public void GetInventoryOperationStatus(GetInventoryOperationStatusRequest request, Action<GetInventoryOperationStatusResponse> 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("/Inventory/GetInventoryOperationStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves an item from the public catalog. GetItem does not work off a cache of the Catalog and should be used when
|
||||
/// trying to get recent item updates. However, please note that item references data is cached and may take a few moments
|
||||
/// for changes to propagate.
|
||||
/// </summary>
|
||||
public void GetItem(GetItemRequest request, Action<GetItemResponse> 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("/Catalog/GetItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Search for a given item and return a set of bundles and stores containing the item. Up to 50 items can be returned at
|
||||
/// once. You can use continuation tokens to paginate through results that return greater than the limit. This API is
|
||||
/// intended for tooling/automation scenarios and has a reduced RPS with Player Entities limited to 30 requests in 300
|
||||
/// seconds and Title Entities limited to 100 requests in 10 seconds.
|
||||
/// </summary>
|
||||
public void GetItemContainers(GetItemContainersRequest request, Action<GetItemContainersResponse> 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("/Catalog/GetItemContainers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the moderation state for an item, including the concern category and string reason. More information about
|
||||
/// moderation states can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/ugc/moderation
|
||||
/// </summary>
|
||||
public void GetItemModerationState(GetItemModerationStateRequest request, Action<GetItemModerationStateResponse> 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("/Catalog/GetItemModerationState", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the status of a publish of an item.
|
||||
/// </summary>
|
||||
public void GetItemPublishStatus(GetItemPublishStatusRequest request, Action<GetItemPublishStatusResponse> 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("/Catalog/GetItemPublishStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a paginated set of reviews associated with the specified item. Individual ratings and reviews data update in near
|
||||
/// real time with delays within a few seconds.
|
||||
/// </summary>
|
||||
public void GetItemReviews(GetItemReviewsRequest request, Action<GetItemReviewsResponse> 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("/Catalog/GetItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a summary of all ratings and reviews associated with the specified item. Summary ratings data is cached with update
|
||||
/// data coming within 15 minutes.
|
||||
/// </summary>
|
||||
public void GetItemReviewSummary(GetItemReviewSummaryRequest request, Action<GetItemReviewSummaryResponse> 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("/Catalog/GetItemReviewSummary", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves items from the public catalog. Up to 50 items can be returned at once. GetItems does not work off a cache of
|
||||
/// the Catalog and should be used when trying to get recent item updates. However, please note that item references data is
|
||||
/// cached and may take a few moments for changes to propagate.
|
||||
/// </summary>
|
||||
public void GetItems(GetItemsRequest request, Action<GetItemsResponse> 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("/Catalog/GetItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the access tokens.
|
||||
/// </summary>
|
||||
public void GetMicrosoftStoreAccessTokens(GetMicrosoftStoreAccessTokensRequest request, Action<GetMicrosoftStoreAccessTokensResponse> 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("/Inventory/GetMicrosoftStoreAccessTokens", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get transaction history for a player. Up to 250 Events can be returned at once. You can use continuation tokens to
|
||||
/// paginate through results that return greater than the limit. Getting transaction history has a lower RPS limit than
|
||||
/// getting a Player's inventory with Player Entities having a limit of 30 requests in 300 seconds.
|
||||
/// </summary>
|
||||
public void GetTransactionHistory(GetTransactionHistoryRequest request, Action<GetTransactionHistoryResponse> 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("/Inventory/GetTransactionHistory", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initiates a publish of an item from the working catalog to the public catalog. You can use the GetItemPublishStatus API
|
||||
/// to track the state of the item publish.
|
||||
/// </summary>
|
||||
public void PublishDraftItem(PublishDraftItemRequest request, Action<PublishDraftItemResponse> 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("/Catalog/PublishDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Purchase an item or bundle. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is
|
||||
/// uncapped.
|
||||
/// </summary>
|
||||
public void PurchaseInventoryItems(PurchaseInventoryItemsRequest request, Action<PurchaseInventoryItemsResponse> 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("/Inventory/PurchaseInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public void RedeemAppleAppStoreInventoryItems(RedeemAppleAppStoreInventoryItemsRequest request, Action<RedeemAppleAppStoreInventoryItemsResponse> 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("/Inventory/RedeemAppleAppStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public void RedeemGooglePlayInventoryItems(RedeemGooglePlayInventoryItemsRequest request, Action<RedeemGooglePlayInventoryItemsResponse> 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("/Inventory/RedeemGooglePlayInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public void RedeemMicrosoftStoreInventoryItems(RedeemMicrosoftStoreInventoryItemsRequest request, Action<RedeemMicrosoftStoreInventoryItemsResponse> 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("/Inventory/RedeemMicrosoftStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public void RedeemNintendoEShopInventoryItems(RedeemNintendoEShopInventoryItemsRequest request, Action<RedeemNintendoEShopInventoryItemsResponse> 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("/Inventory/RedeemNintendoEShopInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public void RedeemPlayStationStoreInventoryItems(RedeemPlayStationStoreInventoryItemsRequest request, Action<RedeemPlayStationStoreInventoryItemsResponse> 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("/Inventory/RedeemPlayStationStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redeem items.
|
||||
/// </summary>
|
||||
public void RedeemSteamInventoryItems(RedeemSteamInventoryItemsRequest request, Action<RedeemSteamInventoryItemsResponse> 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("/Inventory/RedeemSteamInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Submit a report for an item, indicating in what way the item is inappropriate.
|
||||
/// </summary>
|
||||
public void ReportItem(ReportItemRequest request, Action<ReportItemResponse> 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("/Catalog/ReportItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Submit a report for a review
|
||||
/// </summary>
|
||||
public void ReportItemReview(ReportItemReviewRequest request, Action<ReportItemReviewResponse> 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("/Catalog/ReportItemReview", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates or updates a review for the specified item. More information around the caching surrounding item ratings and
|
||||
/// reviews can be found here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/ratings#ratings-design-and-caching
|
||||
/// </summary>
|
||||
public void ReviewItem(ReviewItemRequest request, Action<ReviewItemResponse> 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("/Catalog/ReviewItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes a search against the public catalog using the provided search parameters and returns a set of paginated
|
||||
/// results. SearchItems uses a cache of the catalog with item updates taking up to a few minutes to propagate. You should
|
||||
/// use the GetItem API for when trying to immediately get recent item updates. More information about the Search API can be
|
||||
/// found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/search
|
||||
/// </summary>
|
||||
public void SearchItems(SearchItemsRequest request, Action<SearchItemsResponse> 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("/Catalog/SearchItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the moderation state for an item, including the concern category and string reason. More information about
|
||||
/// moderation states can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/ugc/moderation
|
||||
/// </summary>
|
||||
public void SetItemModerationState(SetItemModerationStateRequest request, Action<SetItemModerationStateResponse> 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("/Catalog/SetItemModerationState", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Submit a vote for a review, indicating whether the review was helpful or unhelpful.
|
||||
/// </summary>
|
||||
public void SubmitItemReviewVote(SubmitItemReviewVoteRequest request, Action<SubmitItemReviewVoteResponse> 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("/Catalog/SubmitItemReviewVote", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Subtract inventory items.
|
||||
/// </summary>
|
||||
public void SubtractInventoryItems(SubtractInventoryItemsRequest request, Action<SubtractInventoryItemsResponse> 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("/Inventory/SubtractInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Submit a request to takedown one or more reviews.
|
||||
/// </summary>
|
||||
public void TakedownItemReviews(TakedownItemReviewsRequest request, Action<TakedownItemReviewsResponse> 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("/Catalog/TakedownItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer inventory items. When transferring across collections, a 202 response indicates that the transfer did not
|
||||
/// complete within the timeframe of the request. You can identify the pending operations by looking for OperationStatus =
|
||||
/// 'InProgress'. You can check on the operation status at anytime within 1 day of the request by passing the
|
||||
/// TransactionToken to the GetInventoryOperationStatus API. More information about item transfer scenarios can be found
|
||||
/// here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/inventory/?tabs=inventory-game-manager#transfer-inventory-items
|
||||
/// </summary>
|
||||
public void TransferInventoryItems(TransferInventoryItemsRequest request, Action<TransferInventoryItemsResponse> 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("/Inventory/TransferInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the configuration for the catalog. Only Title Entities can call this API. There is a limit of 10 requests in 10
|
||||
/// seconds for this API. More information about the Catalog Config can be found here:
|
||||
/// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/settings
|
||||
/// </summary>
|
||||
public void UpdateCatalogConfig(UpdateCatalogConfigRequest request, Action<UpdateCatalogConfigResponse> 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("/Catalog/UpdateCatalogConfig", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update the metadata for an item in the working catalog.
|
||||
/// </summary>
|
||||
public void UpdateDraftItem(UpdateDraftItemRequest request, Action<UpdateDraftItemResponse> 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("/Catalog/UpdateDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update inventory items
|
||||
/// </summary>
|
||||
public void UpdateInventoryItems(UpdateInventoryItemsRequest request, Action<UpdateInventoryItemsResponse> 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("/Inventory/UpdateInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57229903c0965c74b90bc2ef8ccbc31c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e420d6be63cf50498180c2df1199abc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,102 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using PlayFab.EconomyModels;
|
||||
|
||||
namespace PlayFab.Events
|
||||
{
|
||||
public partial class PlayFabEvents
|
||||
{
|
||||
public event PlayFabRequestEvent<AddInventoryItemsRequest> OnEconomyAddInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<AddInventoryItemsResponse> OnEconomyAddInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<CreateDraftItemRequest> OnEconomyCreateDraftItemRequestEvent;
|
||||
public event PlayFabResultEvent<CreateDraftItemResponse> OnEconomyCreateDraftItemResultEvent;
|
||||
public event PlayFabRequestEvent<CreateUploadUrlsRequest> OnEconomyCreateUploadUrlsRequestEvent;
|
||||
public event PlayFabResultEvent<CreateUploadUrlsResponse> OnEconomyCreateUploadUrlsResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteEntityItemReviewsRequest> OnEconomyDeleteEntityItemReviewsRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteEntityItemReviewsResponse> OnEconomyDeleteEntityItemReviewsResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteInventoryCollectionRequest> OnEconomyDeleteInventoryCollectionRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteInventoryCollectionResponse> OnEconomyDeleteInventoryCollectionResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteInventoryItemsRequest> OnEconomyDeleteInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteInventoryItemsResponse> OnEconomyDeleteInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteItemRequest> OnEconomyDeleteItemRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteItemResponse> OnEconomyDeleteItemResultEvent;
|
||||
public event PlayFabRequestEvent<ExecuteInventoryOperationsRequest> OnEconomyExecuteInventoryOperationsRequestEvent;
|
||||
public event PlayFabResultEvent<ExecuteInventoryOperationsResponse> OnEconomyExecuteInventoryOperationsResultEvent;
|
||||
public event PlayFabRequestEvent<ExecuteTransferOperationsRequest> OnEconomyExecuteTransferOperationsRequestEvent;
|
||||
public event PlayFabResultEvent<ExecuteTransferOperationsResponse> OnEconomyExecuteTransferOperationsResultEvent;
|
||||
public event PlayFabRequestEvent<GetCatalogConfigRequest> OnEconomyGetCatalogConfigRequestEvent;
|
||||
public event PlayFabResultEvent<GetCatalogConfigResponse> OnEconomyGetCatalogConfigResultEvent;
|
||||
public event PlayFabRequestEvent<GetDraftItemRequest> OnEconomyGetDraftItemRequestEvent;
|
||||
public event PlayFabResultEvent<GetDraftItemResponse> OnEconomyGetDraftItemResultEvent;
|
||||
public event PlayFabRequestEvent<GetDraftItemsRequest> OnEconomyGetDraftItemsRequestEvent;
|
||||
public event PlayFabResultEvent<GetDraftItemsResponse> OnEconomyGetDraftItemsResultEvent;
|
||||
public event PlayFabRequestEvent<GetEntityDraftItemsRequest> OnEconomyGetEntityDraftItemsRequestEvent;
|
||||
public event PlayFabResultEvent<GetEntityDraftItemsResponse> OnEconomyGetEntityDraftItemsResultEvent;
|
||||
public event PlayFabRequestEvent<GetEntityItemReviewRequest> OnEconomyGetEntityItemReviewRequestEvent;
|
||||
public event PlayFabResultEvent<GetEntityItemReviewResponse> OnEconomyGetEntityItemReviewResultEvent;
|
||||
public event PlayFabRequestEvent<GetInventoryCollectionIdsRequest> OnEconomyGetInventoryCollectionIdsRequestEvent;
|
||||
public event PlayFabResultEvent<GetInventoryCollectionIdsResponse> OnEconomyGetInventoryCollectionIdsResultEvent;
|
||||
public event PlayFabRequestEvent<GetInventoryItemsRequest> OnEconomyGetInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<GetInventoryItemsResponse> OnEconomyGetInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<GetInventoryOperationStatusRequest> OnEconomyGetInventoryOperationStatusRequestEvent;
|
||||
public event PlayFabResultEvent<GetInventoryOperationStatusResponse> OnEconomyGetInventoryOperationStatusResultEvent;
|
||||
public event PlayFabRequestEvent<GetItemRequest> OnEconomyGetItemRequestEvent;
|
||||
public event PlayFabResultEvent<GetItemResponse> OnEconomyGetItemResultEvent;
|
||||
public event PlayFabRequestEvent<GetItemContainersRequest> OnEconomyGetItemContainersRequestEvent;
|
||||
public event PlayFabResultEvent<GetItemContainersResponse> OnEconomyGetItemContainersResultEvent;
|
||||
public event PlayFabRequestEvent<GetItemModerationStateRequest> OnEconomyGetItemModerationStateRequestEvent;
|
||||
public event PlayFabResultEvent<GetItemModerationStateResponse> OnEconomyGetItemModerationStateResultEvent;
|
||||
public event PlayFabRequestEvent<GetItemPublishStatusRequest> OnEconomyGetItemPublishStatusRequestEvent;
|
||||
public event PlayFabResultEvent<GetItemPublishStatusResponse> OnEconomyGetItemPublishStatusResultEvent;
|
||||
public event PlayFabRequestEvent<GetItemReviewsRequest> OnEconomyGetItemReviewsRequestEvent;
|
||||
public event PlayFabResultEvent<GetItemReviewsResponse> OnEconomyGetItemReviewsResultEvent;
|
||||
public event PlayFabRequestEvent<GetItemReviewSummaryRequest> OnEconomyGetItemReviewSummaryRequestEvent;
|
||||
public event PlayFabResultEvent<GetItemReviewSummaryResponse> OnEconomyGetItemReviewSummaryResultEvent;
|
||||
public event PlayFabRequestEvent<GetItemsRequest> OnEconomyGetItemsRequestEvent;
|
||||
public event PlayFabResultEvent<GetItemsResponse> OnEconomyGetItemsResultEvent;
|
||||
public event PlayFabRequestEvent<GetMicrosoftStoreAccessTokensRequest> OnEconomyGetMicrosoftStoreAccessTokensRequestEvent;
|
||||
public event PlayFabResultEvent<GetMicrosoftStoreAccessTokensResponse> OnEconomyGetMicrosoftStoreAccessTokensResultEvent;
|
||||
public event PlayFabRequestEvent<GetTransactionHistoryRequest> OnEconomyGetTransactionHistoryRequestEvent;
|
||||
public event PlayFabResultEvent<GetTransactionHistoryResponse> OnEconomyGetTransactionHistoryResultEvent;
|
||||
public event PlayFabRequestEvent<PublishDraftItemRequest> OnEconomyPublishDraftItemRequestEvent;
|
||||
public event PlayFabResultEvent<PublishDraftItemResponse> OnEconomyPublishDraftItemResultEvent;
|
||||
public event PlayFabRequestEvent<PurchaseInventoryItemsRequest> OnEconomyPurchaseInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<PurchaseInventoryItemsResponse> OnEconomyPurchaseInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<RedeemAppleAppStoreInventoryItemsRequest> OnEconomyRedeemAppleAppStoreInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<RedeemAppleAppStoreInventoryItemsResponse> OnEconomyRedeemAppleAppStoreInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<RedeemGooglePlayInventoryItemsRequest> OnEconomyRedeemGooglePlayInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<RedeemGooglePlayInventoryItemsResponse> OnEconomyRedeemGooglePlayInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<RedeemMicrosoftStoreInventoryItemsRequest> OnEconomyRedeemMicrosoftStoreInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<RedeemMicrosoftStoreInventoryItemsResponse> OnEconomyRedeemMicrosoftStoreInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<RedeemNintendoEShopInventoryItemsRequest> OnEconomyRedeemNintendoEShopInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<RedeemNintendoEShopInventoryItemsResponse> OnEconomyRedeemNintendoEShopInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<RedeemPlayStationStoreInventoryItemsRequest> OnEconomyRedeemPlayStationStoreInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<RedeemPlayStationStoreInventoryItemsResponse> OnEconomyRedeemPlayStationStoreInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<RedeemSteamInventoryItemsRequest> OnEconomyRedeemSteamInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<RedeemSteamInventoryItemsResponse> OnEconomyRedeemSteamInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<ReportItemRequest> OnEconomyReportItemRequestEvent;
|
||||
public event PlayFabResultEvent<ReportItemResponse> OnEconomyReportItemResultEvent;
|
||||
public event PlayFabRequestEvent<ReportItemReviewRequest> OnEconomyReportItemReviewRequestEvent;
|
||||
public event PlayFabResultEvent<ReportItemReviewResponse> OnEconomyReportItemReviewResultEvent;
|
||||
public event PlayFabRequestEvent<ReviewItemRequest> OnEconomyReviewItemRequestEvent;
|
||||
public event PlayFabResultEvent<ReviewItemResponse> OnEconomyReviewItemResultEvent;
|
||||
public event PlayFabRequestEvent<SearchItemsRequest> OnEconomySearchItemsRequestEvent;
|
||||
public event PlayFabResultEvent<SearchItemsResponse> OnEconomySearchItemsResultEvent;
|
||||
public event PlayFabRequestEvent<SetItemModerationStateRequest> OnEconomySetItemModerationStateRequestEvent;
|
||||
public event PlayFabResultEvent<SetItemModerationStateResponse> OnEconomySetItemModerationStateResultEvent;
|
||||
public event PlayFabRequestEvent<SubmitItemReviewVoteRequest> OnEconomySubmitItemReviewVoteRequestEvent;
|
||||
public event PlayFabResultEvent<SubmitItemReviewVoteResponse> OnEconomySubmitItemReviewVoteResultEvent;
|
||||
public event PlayFabRequestEvent<SubtractInventoryItemsRequest> OnEconomySubtractInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<SubtractInventoryItemsResponse> OnEconomySubtractInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<TakedownItemReviewsRequest> OnEconomyTakedownItemReviewsRequestEvent;
|
||||
public event PlayFabResultEvent<TakedownItemReviewsResponse> OnEconomyTakedownItemReviewsResultEvent;
|
||||
public event PlayFabRequestEvent<TransferInventoryItemsRequest> OnEconomyTransferInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<TransferInventoryItemsResponse> OnEconomyTransferInventoryItemsResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateCatalogConfigRequest> OnEconomyUpdateCatalogConfigRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateCatalogConfigResponse> OnEconomyUpdateCatalogConfigResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateDraftItemRequest> OnEconomyUpdateDraftItemRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateDraftItemResponse> OnEconomyUpdateDraftItemResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateInventoryItemsRequest> OnEconomyUpdateInventoryItemsRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateInventoryItemsResponse> OnEconomyUpdateInventoryItemsResultEvent;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2679e440c4893c4f9b6e5d5314c0465
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 760e5091fc644574b9160901cc83b72b
|
||||
folderAsset: yes
|
||||
timeCreated: 1521234904
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,255 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFABCLIENT_API
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace PlayFab.Public
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface which can be used to implement class responsible for gathering and sending information about session.
|
||||
/// </summary>
|
||||
public interface IScreenTimeTracker
|
||||
{
|
||||
// Unity MonoBehaviour callbacks
|
||||
void OnEnable();
|
||||
void OnDisable();
|
||||
void OnDestroy();
|
||||
void OnApplicationQuit();
|
||||
void OnApplicationFocus(bool isFocused);
|
||||
|
||||
// Class specific methods
|
||||
void ClientSessionStart(string entityId, string entityType, string playFabUserId);
|
||||
void Send();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class responsible for gathering and sending information about session, for example: focus duration, device info, etc.
|
||||
/// </summary>
|
||||
public class ScreenTimeTracker : IScreenTimeTracker
|
||||
{
|
||||
private Guid focusId;
|
||||
private Guid gameSessionID = Guid.NewGuid();
|
||||
private bool initialFocus = true;
|
||||
private bool isSending = false;
|
||||
private DateTime focusOffDateTime = DateTime.UtcNow;
|
||||
private DateTime focusOnDateTime = DateTime.UtcNow;
|
||||
|
||||
private Queue<EventsModels.EventContents> eventsRequests = new Queue<EventsModels.EventContents>();
|
||||
|
||||
private EventsModels.EntityKey entityKey = new EventsModels.EntityKey();
|
||||
private const string eventNamespace = "com.playfab.events.sessions";
|
||||
private const int maxBatchSizeInEvents = 10;
|
||||
|
||||
private PlayFabEventsInstanceAPI eventApi;
|
||||
|
||||
public ScreenTimeTracker()
|
||||
{
|
||||
eventApi = new PlayFabEventsInstanceAPI(PlayFabSettings.staticPlayer);
|
||||
}
|
||||
|
||||
private void EnsureSingleGameSessionId()
|
||||
{
|
||||
if (gameSessionID == Guid.Empty)
|
||||
{
|
||||
gameSessionID = Guid.NewGuid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start session, the function responsible for creating SessionID and gathering information about user and device
|
||||
/// </summary>
|
||||
/// <param name="playFabUserId">Result of the user's login, represent user ID</param>
|
||||
public void ClientSessionStart(string entityId, string entityType, string playFabUserId)
|
||||
{
|
||||
EnsureSingleGameSessionId();
|
||||
|
||||
entityKey.Id = entityId;
|
||||
entityKey.Type = entityType;
|
||||
|
||||
EventsModels.EventContents eventInfo = new EventsModels.EventContents();
|
||||
|
||||
eventInfo.Name = "client_session_start";
|
||||
eventInfo.EventNamespace = eventNamespace;
|
||||
eventInfo.Entity = entityKey;
|
||||
eventInfo.OriginalTimestamp = DateTime.UtcNow;
|
||||
|
||||
var payload = new Dictionary<string, object>
|
||||
{
|
||||
{ "UserID", playFabUserId},
|
||||
{ "DeviceType", SystemInfo.deviceType},
|
||||
{ "DeviceModel", SystemInfo.deviceModel},
|
||||
{ "OS", SystemInfo.operatingSystem },
|
||||
{ "ClientSessionID", gameSessionID },
|
||||
};
|
||||
|
||||
eventInfo.Payload = payload;
|
||||
eventsRequests.Enqueue(eventInfo);
|
||||
|
||||
// Fake a focus-on event at the time of the first login:
|
||||
OnApplicationFocus(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gather information about user's focus. Calculates interaction durations.
|
||||
/// Name mimics MonoBehaviour method, for ease of integration.
|
||||
/// </summary>
|
||||
/// <param name="isFocused">State of focus</param>
|
||||
public void OnApplicationFocus(bool isFocused)
|
||||
{
|
||||
EnsureSingleGameSessionId();
|
||||
EventsModels.EventContents eventInfo = new EventsModels.EventContents();
|
||||
DateTime currentUtcDateTime = DateTime.UtcNow;
|
||||
|
||||
eventInfo.Name = "client_focus_change";
|
||||
eventInfo.EventNamespace = eventNamespace;
|
||||
eventInfo.Entity = entityKey;
|
||||
|
||||
double focusStateDuration = 0.0;
|
||||
|
||||
if (initialFocus)
|
||||
{
|
||||
focusId = Guid.NewGuid();
|
||||
}
|
||||
|
||||
if (isFocused)
|
||||
{
|
||||
// start counting focus-on time
|
||||
focusOnDateTime = currentUtcDateTime;
|
||||
|
||||
// new id per focus
|
||||
focusId = Guid.NewGuid();
|
||||
|
||||
if (!initialFocus)
|
||||
{
|
||||
focusStateDuration = (currentUtcDateTime - focusOffDateTime).TotalSeconds;
|
||||
|
||||
// this check safeguards from manual time changes while app is running
|
||||
if (focusStateDuration < 0)
|
||||
{
|
||||
focusStateDuration = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
focusStateDuration = (currentUtcDateTime - focusOnDateTime).TotalSeconds;
|
||||
|
||||
// this check safeguards from manual time changes while app is running
|
||||
if (focusStateDuration < 0)
|
||||
{
|
||||
focusStateDuration = 0;
|
||||
}
|
||||
|
||||
// start counting focus-off time
|
||||
focusOffDateTime = currentUtcDateTime;
|
||||
}
|
||||
|
||||
var payload = new Dictionary<string, object> {
|
||||
{ "FocusID", focusId },
|
||||
{ "FocusState", isFocused },
|
||||
{ "FocusStateDuration", focusStateDuration },
|
||||
{ "EventTimestamp", currentUtcDateTime },
|
||||
{ "ClientSessionID", gameSessionID },
|
||||
};
|
||||
|
||||
eventInfo.OriginalTimestamp = currentUtcDateTime;
|
||||
eventInfo.Payload = payload;
|
||||
eventsRequests.Enqueue(eventInfo);
|
||||
|
||||
initialFocus = false;
|
||||
|
||||
if (!isFocused)
|
||||
{
|
||||
// Force the eventsRequests queue to empty.
|
||||
// If we are losing focus we should make an attempt to push out a focus lost event ASAP
|
||||
Send();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends events to server.
|
||||
/// </summary>
|
||||
public void Send()
|
||||
{
|
||||
if (PlayFabSettings.staticPlayer.IsClientLoggedIn() && (isSending == false))
|
||||
{
|
||||
isSending = true;
|
||||
|
||||
EventsModels.WriteEventsRequest request = new EventsModels.WriteEventsRequest();
|
||||
request.Events = new List<EventsModels.EventContents>();
|
||||
|
||||
while ((eventsRequests.Count > 0) && (request.Events.Count < maxBatchSizeInEvents))
|
||||
{
|
||||
EventsModels.EventContents eventInfo = eventsRequests.Dequeue();
|
||||
request.Events.Add(eventInfo);
|
||||
}
|
||||
|
||||
if (request.Events.Count > 0)
|
||||
{
|
||||
eventApi.WriteEvents(request, EventSentSuccessfulCallback, EventSentErrorCallback);
|
||||
}
|
||||
|
||||
isSending = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback to handle successful server interaction.
|
||||
/// </summary>
|
||||
/// <param name="response">Server response</param>
|
||||
private void EventSentSuccessfulCallback(EventsModels.WriteEventsResponse response)
|
||||
{
|
||||
// add code to work with successful callback
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback to handle unsuccessful server interaction.
|
||||
/// </summary>
|
||||
/// <param name="response">Server response</param>
|
||||
private void EventSentErrorCallback(PlayFabError response)
|
||||
{
|
||||
Debug.LogWarning("Failed to send session data. Error: " + response.GenerateErrorReport());
|
||||
}
|
||||
|
||||
#region Unused MonoBehaviour compatibility methods
|
||||
/// <summary>
|
||||
/// Unused
|
||||
/// Name mimics MonoBehaviour method, for ease of integration.
|
||||
/// </summary>
|
||||
public void OnEnable()
|
||||
{
|
||||
// add code sending events on enable
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unused
|
||||
/// Name mimics MonoBehaviour method, for ease of integration.
|
||||
/// </summary>
|
||||
public void OnDisable()
|
||||
{
|
||||
// add code sending events on disable
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unused
|
||||
/// Name mimics MonoBehaviour method, for ease of integration.
|
||||
/// </summary>
|
||||
public void OnDestroy()
|
||||
{
|
||||
// add code sending events on destroy
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Trying to send event during game exit. Note: works only on certain platforms.
|
||||
/// Name mimics MonoBehaviour method, for ease of integration.
|
||||
/// </summary>
|
||||
public void OnApplicationQuit()
|
||||
{
|
||||
// trying to send events during game exit
|
||||
Send();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb87bdc3f40216e419c8f1b76c4517d6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73a2eea4489bd9447a29c5114a2c0d7c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,24 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using PlayFab.EventsModels;
|
||||
|
||||
namespace PlayFab.Events
|
||||
{
|
||||
public partial class PlayFabEvents
|
||||
{
|
||||
public event PlayFabRequestEvent<CreateTelemetryKeyRequest> OnEventsCreateTelemetryKeyRequestEvent;
|
||||
public event PlayFabResultEvent<CreateTelemetryKeyResponse> OnEventsCreateTelemetryKeyResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteTelemetryKeyRequest> OnEventsDeleteTelemetryKeyRequestEvent;
|
||||
public event PlayFabResultEvent<DeleteTelemetryKeyResponse> OnEventsDeleteTelemetryKeyResultEvent;
|
||||
public event PlayFabRequestEvent<GetTelemetryKeyRequest> OnEventsGetTelemetryKeyRequestEvent;
|
||||
public event PlayFabResultEvent<GetTelemetryKeyResponse> OnEventsGetTelemetryKeyResultEvent;
|
||||
public event PlayFabRequestEvent<ListTelemetryKeysRequest> OnEventsListTelemetryKeysRequestEvent;
|
||||
public event PlayFabResultEvent<ListTelemetryKeysResponse> OnEventsListTelemetryKeysResultEvent;
|
||||
public event PlayFabRequestEvent<SetTelemetryKeyActiveRequest> OnEventsSetTelemetryKeyActiveRequestEvent;
|
||||
public event PlayFabResultEvent<SetTelemetryKeyActiveResponse> OnEventsSetTelemetryKeyActiveResultEvent;
|
||||
public event PlayFabRequestEvent<WriteEventsRequest> OnEventsWriteEventsRequestEvent;
|
||||
public event PlayFabResultEvent<WriteEventsResponse> OnEventsWriteEventsResultEvent;
|
||||
public event PlayFabRequestEvent<WriteEventsRequest> OnEventsWriteTelemetryEventsRequestEvent;
|
||||
public event PlayFabResultEvent<WriteEventsResponse> OnEventsWriteTelemetryEventsResultEvent;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 816bf581b4b09c04bbf42adfea99a423
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,144 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.EventsModels;
|
||||
using PlayFab.Internal;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// Write custom PlayStream and Telemetry events for any PlayFab entity. Telemetry events can be used for analytic,
|
||||
/// reporting, or debugging. PlayStream events can do all of that and also trigger custom actions in near real-time.
|
||||
/// </summary>
|
||||
public static class PlayFabEventsAPI
|
||||
{
|
||||
static PlayFabEventsAPI() {}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public static bool IsEntityLoggedIn()
|
||||
{
|
||||
return PlayFabSettings.staticPlayer.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public static void ForgetAllCredentials()
|
||||
{
|
||||
PlayFabSettings.staticPlayer.ForgetAllCredentials();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new telemetry key for the title.
|
||||
/// </summary>
|
||||
public static void CreateTelemetryKey(CreateTelemetryKeyRequest request, Action<CreateTelemetryKeyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Event/CreateTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a telemetry key configured for the title.
|
||||
/// </summary>
|
||||
public static void DeleteTelemetryKey(DeleteTelemetryKeyRequest request, Action<DeleteTelemetryKeyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Event/DeleteTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information about a telemetry key configured for the title.
|
||||
/// </summary>
|
||||
public static void GetTelemetryKey(GetTelemetryKeyRequest request, Action<GetTelemetryKeyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Event/GetTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all telemetry keys configured for the title.
|
||||
/// </summary>
|
||||
public static void ListTelemetryKeys(ListTelemetryKeysRequest request, Action<ListTelemetryKeysResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Event/ListTelemetryKeys", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a telemetry key to the active or deactivated state.
|
||||
/// </summary>
|
||||
public static void SetTelemetryKeyActive(SetTelemetryKeyActiveRequest request, Action<SetTelemetryKeyActiveResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Event/SetTelemetryKeyActive", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write batches of entity based events to PlayStream. The namespace of the Event must be 'custom' or start with 'custom.'.
|
||||
/// </summary>
|
||||
public static void WriteEvents(WriteEventsRequest request, Action<WriteEventsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Event/WriteEvents", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write batches of entity based events to as Telemetry events (bypass PlayStream). The namespace must be 'custom' or start
|
||||
/// with 'custom.'
|
||||
/// </summary>
|
||||
public static void WriteTelemetryEvents(WriteEventsRequest request, Action<WriteEventsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Event/WriteTelemetryEvents", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write batches of entity based events to as Telemetry events (bypass PlayStream) using a Telemetry Key. The namespace must be 'custom' or start
|
||||
/// with 'custom.'
|
||||
/// </summary>
|
||||
public static void WriteTelemetryEventsWithTelemetryKey(WriteEventsRequest request, Action<WriteEventsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsTelemetryKeyProvided()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must provide a telemetry key to call this method");
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Event/WriteTelemetryEvents", request, AuthType.TelemetryKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6209aee5722aa2c46ba625e1944d6fa8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,148 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.EventsModels;
|
||||
using PlayFab.Internal;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// Write custom PlayStream and Telemetry events for any PlayFab entity. Telemetry events can be used for analytic,
|
||||
/// reporting, or debugging. PlayStream events can do all of that and also trigger custom actions in near real-time.
|
||||
/// </summary>
|
||||
public class PlayFabEventsInstanceAPI : IPlayFabInstanceApi
|
||||
{
|
||||
public readonly PlayFabApiSettings apiSettings = null;
|
||||
public readonly PlayFabAuthenticationContext authenticationContext = null;
|
||||
|
||||
public PlayFabEventsInstanceAPI(PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
public PlayFabEventsInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
apiSettings = settings;
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public bool IsEntityLoggedIn()
|
||||
{
|
||||
return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public void ForgetAllCredentials()
|
||||
{
|
||||
if (authenticationContext != null)
|
||||
{
|
||||
authenticationContext.ForgetAllCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new telemetry key for the title.
|
||||
/// </summary>
|
||||
public void CreateTelemetryKey(CreateTelemetryKeyRequest request, Action<CreateTelemetryKeyResponse> 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("/Event/CreateTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a telemetry key configured for the title.
|
||||
/// </summary>
|
||||
public void DeleteTelemetryKey(DeleteTelemetryKeyRequest request, Action<DeleteTelemetryKeyResponse> 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("/Event/DeleteTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information about a telemetry key configured for the title.
|
||||
/// </summary>
|
||||
public void GetTelemetryKey(GetTelemetryKeyRequest request, Action<GetTelemetryKeyResponse> 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("/Event/GetTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all telemetry keys configured for the title.
|
||||
/// </summary>
|
||||
public void ListTelemetryKeys(ListTelemetryKeysRequest request, Action<ListTelemetryKeysResponse> 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("/Event/ListTelemetryKeys", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a telemetry key to the active or deactivated state.
|
||||
/// </summary>
|
||||
public void SetTelemetryKeyActive(SetTelemetryKeyActiveRequest request, Action<SetTelemetryKeyActiveResponse> 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("/Event/SetTelemetryKeyActive", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write batches of entity based events to PlayStream. The namespace of the Event must be 'custom' or start with 'custom.'.
|
||||
/// </summary>
|
||||
public void WriteEvents(WriteEventsRequest request, Action<WriteEventsResponse> 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("/Event/WriteEvents", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write batches of entity based events to as Telemetry events (bypass PlayStream). The namespace must be 'custom' or start
|
||||
/// with 'custom.'
|
||||
/// </summary>
|
||||
public void WriteTelemetryEvents(WriteEventsRequest request, Action<WriteEventsResponse> 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("/Event/WriteTelemetryEvents", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
/// <summary>
|
||||
/// Write batches of entity based events to as Telemetry events (bypass PlayStream) using a Telemetry Key. The namespace must be 'custom' or start
|
||||
/// with 'custom.'
|
||||
/// </summary>
|
||||
public void WriteTelemetryEventsWithTelemetryKey(WriteEventsRequest request, Action<WriteEventsResponse> 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.IsTelemetryKeyProvided()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must provide a telemetry key to call this method");
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Event/WriteTelemetryEvents", request, AuthType.TelemetryKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efc8181560ecd0748a12a6df7137998e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,248 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab.EventsModels
|
||||
{
|
||||
[Serializable]
|
||||
public class CreateTelemetryKeyRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The name of the new key. Telemetry key names must be unique within the scope of the title.
|
||||
/// </summary>
|
||||
public string KeyName;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateTelemetryKeyResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Details about the newly created telemetry key.
|
||||
/// </summary>
|
||||
public TelemetryKeyDetails NewKeyDetails;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteTelemetryKeyRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The name of the key to delete.
|
||||
/// </summary>
|
||||
public string KeyName;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DeleteTelemetryKeyResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates whether or not the key was deleted. If false, no key with that name existed.
|
||||
/// </summary>
|
||||
public bool WasKeyDeleted;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Combined entity type and ID structure which uniquely identifies a single entity.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class EntityKey : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique ID of the entity.
|
||||
/// </summary>
|
||||
public string Id;
|
||||
/// <summary>
|
||||
/// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
|
||||
/// </summary>
|
||||
public string Type;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EventContents : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the event (e.g. build number, external trace identifiers, etc.). Before an
|
||||
/// event is written, this collection and the base request custom tags will be merged, but not overriden. This enables the
|
||||
/// caller to specify static tags and per event tags.
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// Entity associated with the event. If null, the event will apply to the calling entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The namespace in which the event is defined. Allowed namespaces can vary by API.
|
||||
/// </summary>
|
||||
public string EventNamespace;
|
||||
/// <summary>
|
||||
/// The name of this event.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
/// <summary>
|
||||
/// The original unique identifier associated with this event before it was posted to PlayFab. The value might differ from
|
||||
/// the EventId value, which is assigned when the event is received by the server.
|
||||
/// </summary>
|
||||
public string OriginalId;
|
||||
/// <summary>
|
||||
/// The time (in UTC) associated with this event when it occurred. If specified, this value is stored in the
|
||||
/// OriginalTimestamp property of the PlayStream event.
|
||||
/// </summary>
|
||||
public DateTime? OriginalTimestamp;
|
||||
/// <summary>
|
||||
/// Arbitrary data associated with the event. Only one of Payload or PayloadJSON is allowed.
|
||||
/// </summary>
|
||||
public object Payload;
|
||||
/// <summary>
|
||||
/// Arbitrary data associated with the event, represented as a JSON serialized string. Only one of Payload or PayloadJSON is
|
||||
/// allowed.
|
||||
/// </summary>
|
||||
public string PayloadJSON;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetTelemetryKeyRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The name of the key to retrieve.
|
||||
/// </summary>
|
||||
public string KeyName;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetTelemetryKeyResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Details about the requested telemetry key.
|
||||
/// </summary>
|
||||
public TelemetryKeyDetails KeyDetails;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ListTelemetryKeysRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ListTelemetryKeysResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The telemetry keys configured for the title.
|
||||
/// </summary>
|
||||
public List<TelemetryKeyDetails> KeyDetails;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class SetTelemetryKeyActiveRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether to set the key to active (true) or deactivated (false).
|
||||
/// </summary>
|
||||
public bool Active;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The name of the key to update.
|
||||
/// </summary>
|
||||
public string KeyName;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class SetTelemetryKeyActiveResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The most current details about the telemetry key that was to be updated.
|
||||
/// </summary>
|
||||
public TelemetryKeyDetails KeyDetails;
|
||||
/// <summary>
|
||||
/// Indicates whether or not the key was updated. If false, the key was already in the desired state.
|
||||
/// </summary>
|
||||
public bool WasKeyUpdated;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class TelemetryKeyDetails : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// When the key was created.
|
||||
/// </summary>
|
||||
public DateTime CreateTime;
|
||||
/// <summary>
|
||||
/// Whether or not the key is currently active. Deactivated keys cannot be used for telemetry ingestion.
|
||||
/// </summary>
|
||||
public bool IsActive;
|
||||
/// <summary>
|
||||
/// The key that can be distributed to clients for use during telemetry ingestion.
|
||||
/// </summary>
|
||||
public string KeyValue;
|
||||
/// <summary>
|
||||
/// When the key was last updated.
|
||||
/// </summary>
|
||||
public DateTime LastUpdateTime;
|
||||
/// <summary>
|
||||
/// The name of the key. Telemetry key names are unique within the scope of the title.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class WriteEventsRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The collection of events to write. Up to 200 events can be written per request.
|
||||
/// </summary>
|
||||
public List<EventContents> Events;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class WriteEventsResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The unique identifiers assigned by the server to the events, in the same order as the events in the request. Only
|
||||
/// returned if FlushToPlayStream option is true.
|
||||
/// </summary>
|
||||
public List<string> AssignedEventIds;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ee524faa41ee444ca207259e58e70a1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f95f1281203327240a7f9f479dd781d9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,36 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using PlayFab.ExperimentationModels;
|
||||
|
||||
namespace PlayFab.Events
|
||||
{
|
||||
public partial class PlayFabEvents
|
||||
{
|
||||
public event PlayFabRequestEvent<CreateExclusionGroupRequest> OnExperimentationCreateExclusionGroupRequestEvent;
|
||||
public event PlayFabResultEvent<CreateExclusionGroupResult> OnExperimentationCreateExclusionGroupResultEvent;
|
||||
public event PlayFabRequestEvent<CreateExperimentRequest> OnExperimentationCreateExperimentRequestEvent;
|
||||
public event PlayFabResultEvent<CreateExperimentResult> OnExperimentationCreateExperimentResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteExclusionGroupRequest> OnExperimentationDeleteExclusionGroupRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnExperimentationDeleteExclusionGroupResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteExperimentRequest> OnExperimentationDeleteExperimentRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnExperimentationDeleteExperimentResultEvent;
|
||||
public event PlayFabRequestEvent<GetExclusionGroupsRequest> OnExperimentationGetExclusionGroupsRequestEvent;
|
||||
public event PlayFabResultEvent<GetExclusionGroupsResult> OnExperimentationGetExclusionGroupsResultEvent;
|
||||
public event PlayFabRequestEvent<GetExclusionGroupTrafficRequest> OnExperimentationGetExclusionGroupTrafficRequestEvent;
|
||||
public event PlayFabResultEvent<GetExclusionGroupTrafficResult> OnExperimentationGetExclusionGroupTrafficResultEvent;
|
||||
public event PlayFabRequestEvent<GetExperimentsRequest> OnExperimentationGetExperimentsRequestEvent;
|
||||
public event PlayFabResultEvent<GetExperimentsResult> OnExperimentationGetExperimentsResultEvent;
|
||||
public event PlayFabRequestEvent<GetLatestScorecardRequest> OnExperimentationGetLatestScorecardRequestEvent;
|
||||
public event PlayFabResultEvent<GetLatestScorecardResult> OnExperimentationGetLatestScorecardResultEvent;
|
||||
public event PlayFabRequestEvent<GetTreatmentAssignmentRequest> OnExperimentationGetTreatmentAssignmentRequestEvent;
|
||||
public event PlayFabResultEvent<GetTreatmentAssignmentResult> OnExperimentationGetTreatmentAssignmentResultEvent;
|
||||
public event PlayFabRequestEvent<StartExperimentRequest> OnExperimentationStartExperimentRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnExperimentationStartExperimentResultEvent;
|
||||
public event PlayFabRequestEvent<StopExperimentRequest> OnExperimentationStopExperimentRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnExperimentationStopExperimentResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateExclusionGroupRequest> OnExperimentationUpdateExclusionGroupRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnExperimentationUpdateExclusionGroupResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateExperimentRequest> OnExperimentationUpdateExperimentRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnExperimentationUpdateExperimentResultEvent;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad18b9280bb1a7f4c926eba4c1086b6e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,208 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.ExperimentationModels;
|
||||
using PlayFab.Internal;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// APIs for managing experiments.
|
||||
/// </summary>
|
||||
public static class PlayFabExperimentationAPI
|
||||
{
|
||||
static PlayFabExperimentationAPI() {}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public static bool IsEntityLoggedIn()
|
||||
{
|
||||
return PlayFabSettings.staticPlayer.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public static void ForgetAllCredentials()
|
||||
{
|
||||
PlayFabSettings.staticPlayer.ForgetAllCredentials();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new experiment exclusion group for a title.
|
||||
/// </summary>
|
||||
public static void CreateExclusionGroup(CreateExclusionGroupRequest request, Action<CreateExclusionGroupResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/CreateExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new experiment for a title.
|
||||
/// </summary>
|
||||
public static void CreateExperiment(CreateExperimentRequest request, Action<CreateExperimentResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/CreateExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes an existing exclusion group for a title.
|
||||
/// </summary>
|
||||
public static void DeleteExclusionGroup(DeleteExclusionGroupRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/DeleteExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes an existing experiment for a title.
|
||||
/// </summary>
|
||||
public static void DeleteExperiment(DeleteExperimentRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/DeleteExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the details of all exclusion groups for a title.
|
||||
/// </summary>
|
||||
public static void GetExclusionGroups(GetExclusionGroupsRequest request, Action<GetExclusionGroupsResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/GetExclusionGroups", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the details of all exclusion groups for a title.
|
||||
/// </summary>
|
||||
public static void GetExclusionGroupTraffic(GetExclusionGroupTrafficRequest request, Action<GetExclusionGroupTrafficResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/GetExclusionGroupTraffic", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the details of all experiments for a title.
|
||||
/// </summary>
|
||||
public static void GetExperiments(GetExperimentsRequest request, Action<GetExperimentsResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/GetExperiments", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the latest scorecard of the experiment for the title.
|
||||
/// </summary>
|
||||
public static void GetLatestScorecard(GetLatestScorecardRequest request, Action<GetLatestScorecardResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/GetLatestScorecard", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the treatment assignments for a player for every running experiment in the title.
|
||||
/// </summary>
|
||||
public static void GetTreatmentAssignment(GetTreatmentAssignmentRequest request, Action<GetTreatmentAssignmentResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/GetTreatmentAssignment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts an existing experiment for a title.
|
||||
/// </summary>
|
||||
public static void StartExperiment(StartExperimentRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/StartExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops an existing experiment for a title.
|
||||
/// </summary>
|
||||
public static void StopExperiment(StopExperimentRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/StopExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates an existing exclusion group for a title.
|
||||
/// </summary>
|
||||
public static void UpdateExclusionGroup(UpdateExclusionGroupRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/UpdateExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates an existing experiment for a title.
|
||||
/// </summary>
|
||||
public static void UpdateExperiment(UpdateExperimentRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Experimentation/UpdateExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9dbcafaa60e9f2a41930b9907fb0c133
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,200 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.ExperimentationModels;
|
||||
using PlayFab.Internal;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// APIs for managing experiments.
|
||||
/// </summary>
|
||||
public class PlayFabExperimentationInstanceAPI : IPlayFabInstanceApi
|
||||
{
|
||||
public readonly PlayFabApiSettings apiSettings = null;
|
||||
public readonly PlayFabAuthenticationContext authenticationContext = null;
|
||||
|
||||
public PlayFabExperimentationInstanceAPI(PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
public PlayFabExperimentationInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
apiSettings = settings;
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public bool IsEntityLoggedIn()
|
||||
{
|
||||
return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public void ForgetAllCredentials()
|
||||
{
|
||||
if (authenticationContext != null)
|
||||
{
|
||||
authenticationContext.ForgetAllCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new experiment exclusion group for a title.
|
||||
/// </summary>
|
||||
public void CreateExclusionGroup(CreateExclusionGroupRequest request, Action<CreateExclusionGroupResult> 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("/Experimentation/CreateExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new experiment for a title.
|
||||
/// </summary>
|
||||
public void CreateExperiment(CreateExperimentRequest request, Action<CreateExperimentResult> 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("/Experimentation/CreateExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes an existing exclusion group for a title.
|
||||
/// </summary>
|
||||
public void DeleteExclusionGroup(DeleteExclusionGroupRequest request, Action<EmptyResponse> 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("/Experimentation/DeleteExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes an existing experiment for a title.
|
||||
/// </summary>
|
||||
public void DeleteExperiment(DeleteExperimentRequest request, Action<EmptyResponse> 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("/Experimentation/DeleteExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the details of all exclusion groups for a title.
|
||||
/// </summary>
|
||||
public void GetExclusionGroups(GetExclusionGroupsRequest request, Action<GetExclusionGroupsResult> 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("/Experimentation/GetExclusionGroups", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the details of all exclusion groups for a title.
|
||||
/// </summary>
|
||||
public void GetExclusionGroupTraffic(GetExclusionGroupTrafficRequest request, Action<GetExclusionGroupTrafficResult> 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("/Experimentation/GetExclusionGroupTraffic", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the details of all experiments for a title.
|
||||
/// </summary>
|
||||
public void GetExperiments(GetExperimentsRequest request, Action<GetExperimentsResult> 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("/Experimentation/GetExperiments", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the latest scorecard of the experiment for the title.
|
||||
/// </summary>
|
||||
public void GetLatestScorecard(GetLatestScorecardRequest request, Action<GetLatestScorecardResult> 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("/Experimentation/GetLatestScorecard", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the treatment assignments for a player for every running experiment in the title.
|
||||
/// </summary>
|
||||
public void GetTreatmentAssignment(GetTreatmentAssignmentRequest request, Action<GetTreatmentAssignmentResult> 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("/Experimentation/GetTreatmentAssignment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts an existing experiment for a title.
|
||||
/// </summary>
|
||||
public void StartExperiment(StartExperimentRequest request, Action<EmptyResponse> 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("/Experimentation/StartExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops an existing experiment for a title.
|
||||
/// </summary>
|
||||
public void StopExperiment(StopExperimentRequest request, Action<EmptyResponse> 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("/Experimentation/StopExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates an existing exclusion group for a title.
|
||||
/// </summary>
|
||||
public void UpdateExclusionGroup(UpdateExclusionGroupRequest request, Action<EmptyResponse> 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("/Experimentation/UpdateExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates an existing experiment for a title.
|
||||
/// </summary>
|
||||
public void UpdateExperiment(UpdateExperimentRequest request, Action<EmptyResponse> 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("/Experimentation/UpdateExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ecc5b8d11fae41b4daaaf638349fdc78
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,670 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab.ExperimentationModels
|
||||
{
|
||||
public enum AnalysisTaskState
|
||||
{
|
||||
Waiting,
|
||||
ReadyForSubmission,
|
||||
SubmittingToPipeline,
|
||||
Running,
|
||||
Completed,
|
||||
Failed,
|
||||
Canceled
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a title entity token and exclusion group details, will create a new exclusion group for the title.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CreateExclusionGroupRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// Description of the exclusion group.
|
||||
/// </summary>
|
||||
public string Description;
|
||||
/// <summary>
|
||||
/// Friendly name of the exclusion group.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateExclusionGroupResult : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifier of the exclusion group.
|
||||
/// </summary>
|
||||
public string ExclusionGroupId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a title entity token and experiment details, will create a new experiment for the title.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CreateExperimentRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// Description of the experiment.
|
||||
/// </summary>
|
||||
public string Description;
|
||||
/// <summary>
|
||||
/// When experiment should end.
|
||||
/// </summary>
|
||||
public DateTime? EndDate;
|
||||
/// <summary>
|
||||
/// Id of the exclusion group.
|
||||
/// </summary>
|
||||
public string ExclusionGroupId;
|
||||
/// <summary>
|
||||
/// Percentage of exclusion group traffic that will see this experiment.
|
||||
/// </summary>
|
||||
public uint? ExclusionGroupTrafficAllocation;
|
||||
/// <summary>
|
||||
/// Type of experiment.
|
||||
/// </summary>
|
||||
public ExperimentType? ExperimentType;
|
||||
/// <summary>
|
||||
/// Friendly name of the experiment.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
/// <summary>
|
||||
/// Id of the segment to which this experiment applies. Defaults to the 'All Players' segment.
|
||||
/// </summary>
|
||||
public string SegmentId;
|
||||
/// <summary>
|
||||
/// When experiment should start.
|
||||
/// </summary>
|
||||
public DateTime StartDate;
|
||||
/// <summary>
|
||||
/// List of title player account IDs that automatically receive treatments in the experiment, but are not included when
|
||||
/// calculating experiment metrics.
|
||||
/// </summary>
|
||||
public List<string> TitlePlayerAccountTestIds;
|
||||
/// <summary>
|
||||
/// List of variants for the experiment.
|
||||
/// </summary>
|
||||
public List<Variant> Variants;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateExperimentResult : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID of the new experiment.
|
||||
/// </summary>
|
||||
public string ExperimentId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given an entity token and an exclusion group ID this API deletes the exclusion group.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DeleteExclusionGroupRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The ID of the exclusion group to delete.
|
||||
/// </summary>
|
||||
public string ExclusionGroupId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given an entity token and an experiment ID this API deletes the experiment. A running experiment must be stopped before
|
||||
/// it can be deleted.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DeleteExperimentRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The ID of the experiment to delete.
|
||||
/// </summary>
|
||||
public string ExperimentId;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EmptyResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Combined entity type and ID structure which uniquely identifies a single entity.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class EntityKey : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique ID of the entity.
|
||||
/// </summary>
|
||||
public string Id;
|
||||
/// <summary>
|
||||
/// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
|
||||
/// </summary>
|
||||
public string Type;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ExclusionGroupTrafficAllocation : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of the experiment.
|
||||
/// </summary>
|
||||
public string ExperimentId;
|
||||
/// <summary>
|
||||
/// Percentage of exclusion group traffic that will see this experiment.
|
||||
/// </summary>
|
||||
public uint TrafficAllocation;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Experiment : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Description of the experiment.
|
||||
/// </summary>
|
||||
public string Description;
|
||||
/// <summary>
|
||||
/// When experiment should end/was ended.
|
||||
/// </summary>
|
||||
public DateTime? EndDate;
|
||||
/// <summary>
|
||||
/// Id of the exclusion group for this experiment.
|
||||
/// </summary>
|
||||
public string ExclusionGroupId;
|
||||
/// <summary>
|
||||
/// Percentage of exclusion group traffic that will see this experiment.
|
||||
/// </summary>
|
||||
public uint? ExclusionGroupTrafficAllocation;
|
||||
/// <summary>
|
||||
/// Type of experiment.
|
||||
/// </summary>
|
||||
public ExperimentType? ExperimentType;
|
||||
/// <summary>
|
||||
/// Id of the experiment.
|
||||
/// </summary>
|
||||
public string Id;
|
||||
/// <summary>
|
||||
/// Friendly name of the experiment.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
/// <summary>
|
||||
/// Id of the segment to which this experiment applies. Defaults to the 'All Players' segment.
|
||||
/// </summary>
|
||||
public string SegmentId;
|
||||
/// <summary>
|
||||
/// When experiment should start/was started.
|
||||
/// </summary>
|
||||
public DateTime StartDate;
|
||||
/// <summary>
|
||||
/// State experiment is currently in.
|
||||
/// </summary>
|
||||
public ExperimentState? State;
|
||||
/// <summary>
|
||||
/// List of title player account IDs that automatically receive treatments in the experiment, but are not included when
|
||||
/// calculating experiment metrics.
|
||||
/// </summary>
|
||||
public List<string> TitlePlayerAccountTestIds;
|
||||
/// <summary>
|
||||
/// List of variants for the experiment.
|
||||
/// </summary>
|
||||
public List<Variant> Variants;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ExperimentExclusionGroup : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Description of the exclusion group.
|
||||
/// </summary>
|
||||
public string Description;
|
||||
/// <summary>
|
||||
/// Id of the exclusion group.
|
||||
/// </summary>
|
||||
public string ExclusionGroupId;
|
||||
/// <summary>
|
||||
/// Friendly name of the exclusion group.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
}
|
||||
|
||||
public enum ExperimentState
|
||||
{
|
||||
New,
|
||||
Started,
|
||||
Stopped,
|
||||
Deleted
|
||||
}
|
||||
|
||||
public enum ExperimentType
|
||||
{
|
||||
Active,
|
||||
Snapshot
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a title entity token will return the list of all exclusion groups for a title.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GetExclusionGroupsRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetExclusionGroupsResult : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// List of exclusion groups for the title.
|
||||
/// </summary>
|
||||
public List<ExperimentExclusionGroup> ExclusionGroups;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a title entity token and an exclusion group ID, will return the list of traffic allocations for the exclusion
|
||||
/// group.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GetExclusionGroupTrafficRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The ID of the exclusion group.
|
||||
/// </summary>
|
||||
public string ExclusionGroupId;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetExclusionGroupTrafficResult : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// List of traffic allocations for the exclusion group.
|
||||
/// </summary>
|
||||
public List<ExclusionGroupTrafficAllocation> TrafficAllocations;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a title entity token will return the list of all experiments for a title, including scheduled, started, stopped or
|
||||
/// completed experiments.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GetExperimentsRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetExperimentsResult : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// List of experiments for the title.
|
||||
/// </summary>
|
||||
public List<Experiment> Experiments;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a title entity token and experiment details, will return the latest available scorecard.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GetLatestScorecardRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The ID of the experiment.
|
||||
/// </summary>
|
||||
public string ExperimentId;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetLatestScorecardResult : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Scorecard for the experiment of the title.
|
||||
/// </summary>
|
||||
public Scorecard Scorecard;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a title player or a title entity token, returns the treatment variants and variables assigned to the entity across
|
||||
/// all running experiments
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GetTreatmentAssignmentRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetTreatmentAssignmentResult : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Treatment assignment for the entity.
|
||||
/// </summary>
|
||||
public TreatmentAssignment TreatmentAssignment;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class MetricData : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The upper bound of the confidence interval for the relative delta (Delta.RelativeValue).
|
||||
/// </summary>
|
||||
public double ConfidenceIntervalEnd;
|
||||
/// <summary>
|
||||
/// The lower bound of the confidence interval for the relative delta (Delta.RelativeValue).
|
||||
/// </summary>
|
||||
public double ConfidenceIntervalStart;
|
||||
/// <summary>
|
||||
/// The absolute delta between TreatmentStats.Average and ControlStats.Average.
|
||||
/// </summary>
|
||||
public float DeltaAbsoluteChange;
|
||||
/// <summary>
|
||||
/// The relative delta ratio between TreatmentStats.Average and ControlStats.Average.
|
||||
/// </summary>
|
||||
public float DeltaRelativeChange;
|
||||
/// <summary>
|
||||
/// The machine name of the metric.
|
||||
/// </summary>
|
||||
public string InternalName;
|
||||
/// <summary>
|
||||
/// Indicates if a movement was detected on that metric.
|
||||
/// </summary>
|
||||
public string Movement;
|
||||
/// <summary>
|
||||
/// The readable name of the metric.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
/// <summary>
|
||||
/// The expectation that a movement is real
|
||||
/// </summary>
|
||||
public float PMove;
|
||||
/// <summary>
|
||||
/// The p-value resulting from the statistical test run for this metric
|
||||
/// </summary>
|
||||
public float PValue;
|
||||
/// <summary>
|
||||
/// The threshold for observing sample ratio mismatch.
|
||||
/// </summary>
|
||||
public float PValueThreshold;
|
||||
/// <summary>
|
||||
/// Indicates if the movement is statistically significant.
|
||||
/// </summary>
|
||||
public string StatSigLevel;
|
||||
/// <summary>
|
||||
/// Observed standard deviation value of the metric.
|
||||
/// </summary>
|
||||
public float StdDev;
|
||||
/// <summary>
|
||||
/// Observed average value of the metric.
|
||||
/// </summary>
|
||||
public float Value;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Scorecard : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the date the scorecard was generated.
|
||||
/// </summary>
|
||||
public string DateGenerated;
|
||||
/// <summary>
|
||||
/// Represents the duration of scorecard analysis.
|
||||
/// </summary>
|
||||
public string Duration;
|
||||
/// <summary>
|
||||
/// Represents the number of events processed for the generation of this scorecard
|
||||
/// </summary>
|
||||
public double EventsProcessed;
|
||||
/// <summary>
|
||||
/// Id of the experiment.
|
||||
/// </summary>
|
||||
public string ExperimentId;
|
||||
/// <summary>
|
||||
/// Friendly name of the experiment.
|
||||
/// </summary>
|
||||
public string ExperimentName;
|
||||
/// <summary>
|
||||
/// Represents the latest compute job status.
|
||||
/// </summary>
|
||||
public AnalysisTaskState? LatestJobStatus;
|
||||
/// <summary>
|
||||
/// Represents the presence of a sample ratio mismatch in the scorecard data.
|
||||
/// </summary>
|
||||
public bool SampleRatioMismatch;
|
||||
/// <summary>
|
||||
/// Scorecard containing list of analysis.
|
||||
/// </summary>
|
||||
public List<ScorecardDataRow> ScorecardDataRows;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ScorecardDataRow : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents whether the variant is control or not.
|
||||
/// </summary>
|
||||
public bool IsControl;
|
||||
/// <summary>
|
||||
/// Data of the analysis with the internal name of the metric as the key and an object of metric data as value.
|
||||
/// </summary>
|
||||
public Dictionary<string,MetricData> MetricDataRows;
|
||||
/// <summary>
|
||||
/// Represents the player count in the variant.
|
||||
/// </summary>
|
||||
public uint PlayerCount;
|
||||
/// <summary>
|
||||
/// Name of the variant of analysis.
|
||||
/// </summary>
|
||||
public string VariantName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a title entity token and an experiment ID, this API starts the experiment.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class StartExperimentRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The ID of the experiment to start.
|
||||
/// </summary>
|
||||
public string ExperimentId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a title entity token and an experiment ID, this API stops the experiment if it is running.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class StopExperimentRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The ID of the experiment to stop.
|
||||
/// </summary>
|
||||
public string ExperimentId;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class TreatmentAssignment : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// List of the experiment variables.
|
||||
/// </summary>
|
||||
public List<Variable> Variables;
|
||||
/// <summary>
|
||||
/// List of the experiment variants.
|
||||
/// </summary>
|
||||
public List<string> Variants;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given an entity token and exclusion group details this API updates the exclusion group.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UpdateExclusionGroupRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// Description of the exclusion group.
|
||||
/// </summary>
|
||||
public string Description;
|
||||
/// <summary>
|
||||
/// The ID of the exclusion group to update.
|
||||
/// </summary>
|
||||
public string ExclusionGroupId;
|
||||
/// <summary>
|
||||
/// Friendly name of the exclusion group.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a title entity token and experiment details, this API updates the experiment. If an experiment is already running,
|
||||
/// only the description and duration properties can be updated.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UpdateExperimentRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// Description of the experiment.
|
||||
/// </summary>
|
||||
public string Description;
|
||||
/// <summary>
|
||||
/// When experiment should end.
|
||||
/// </summary>
|
||||
public DateTime? EndDate;
|
||||
/// <summary>
|
||||
/// Id of the exclusion group.
|
||||
/// </summary>
|
||||
public string ExclusionGroupId;
|
||||
/// <summary>
|
||||
/// Percentage of exclusion group traffic that will see this experiment.
|
||||
/// </summary>
|
||||
public uint? ExclusionGroupTrafficAllocation;
|
||||
/// <summary>
|
||||
/// Type of experiment.
|
||||
/// </summary>
|
||||
public ExperimentType? ExperimentType;
|
||||
/// <summary>
|
||||
/// Id of the experiment.
|
||||
/// </summary>
|
||||
public string Id;
|
||||
/// <summary>
|
||||
/// Friendly name of the experiment.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
/// <summary>
|
||||
/// Id of the segment to which this experiment applies. Defaults to the 'All Players' segment.
|
||||
/// </summary>
|
||||
public string SegmentId;
|
||||
/// <summary>
|
||||
/// When experiment should start.
|
||||
/// </summary>
|
||||
public DateTime StartDate;
|
||||
/// <summary>
|
||||
/// List of title player account IDs that automatically receive treatments in the experiment, but are not included when
|
||||
/// calculating experiment metrics.
|
||||
/// </summary>
|
||||
public List<string> TitlePlayerAccountTestIds;
|
||||
/// <summary>
|
||||
/// List of variants for the experiment.
|
||||
/// </summary>
|
||||
public List<Variant> Variants;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Variable : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the variable.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
/// <summary>
|
||||
/// Value of the variable.
|
||||
/// </summary>
|
||||
public string Value;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Variant : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Description of the variant.
|
||||
/// </summary>
|
||||
public string Description;
|
||||
/// <summary>
|
||||
/// Id of the variant.
|
||||
/// </summary>
|
||||
public string Id;
|
||||
/// <summary>
|
||||
/// Specifies if variant is control for experiment.
|
||||
/// </summary>
|
||||
public bool IsControl;
|
||||
/// <summary>
|
||||
/// Name of the variant.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
/// <summary>
|
||||
/// Id of the TitleDataOverride to use with this variant.
|
||||
/// </summary>
|
||||
public string TitleDataOverrideLabel;
|
||||
/// <summary>
|
||||
/// Percentage of target audience traffic that will see this variant.
|
||||
/// </summary>
|
||||
public uint TrafficPercentage;
|
||||
/// <summary>
|
||||
/// Variables returned by this variant.
|
||||
/// </summary>
|
||||
public List<Variable> Variables;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0804132d8066c1440a5cfdd0e56bf63c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 362835eaf7c8a5e47baa567500fe68b1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,60 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using PlayFab.GroupsModels;
|
||||
|
||||
namespace PlayFab.Events
|
||||
{
|
||||
public partial class PlayFabEvents
|
||||
{
|
||||
public event PlayFabRequestEvent<AcceptGroupApplicationRequest> OnGroupsAcceptGroupApplicationRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnGroupsAcceptGroupApplicationResultEvent;
|
||||
public event PlayFabRequestEvent<AcceptGroupInvitationRequest> OnGroupsAcceptGroupInvitationRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnGroupsAcceptGroupInvitationResultEvent;
|
||||
public event PlayFabRequestEvent<AddMembersRequest> OnGroupsAddMembersRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnGroupsAddMembersResultEvent;
|
||||
public event PlayFabRequestEvent<ApplyToGroupRequest> OnGroupsApplyToGroupRequestEvent;
|
||||
public event PlayFabResultEvent<ApplyToGroupResponse> OnGroupsApplyToGroupResultEvent;
|
||||
public event PlayFabRequestEvent<BlockEntityRequest> OnGroupsBlockEntityRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnGroupsBlockEntityResultEvent;
|
||||
public event PlayFabRequestEvent<ChangeMemberRoleRequest> OnGroupsChangeMemberRoleRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnGroupsChangeMemberRoleResultEvent;
|
||||
public event PlayFabRequestEvent<CreateGroupRequest> OnGroupsCreateGroupRequestEvent;
|
||||
public event PlayFabResultEvent<CreateGroupResponse> OnGroupsCreateGroupResultEvent;
|
||||
public event PlayFabRequestEvent<CreateGroupRoleRequest> OnGroupsCreateRoleRequestEvent;
|
||||
public event PlayFabResultEvent<CreateGroupRoleResponse> OnGroupsCreateRoleResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteGroupRequest> OnGroupsDeleteGroupRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnGroupsDeleteGroupResultEvent;
|
||||
public event PlayFabRequestEvent<DeleteRoleRequest> OnGroupsDeleteRoleRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnGroupsDeleteRoleResultEvent;
|
||||
public event PlayFabRequestEvent<GetGroupRequest> OnGroupsGetGroupRequestEvent;
|
||||
public event PlayFabResultEvent<GetGroupResponse> OnGroupsGetGroupResultEvent;
|
||||
public event PlayFabRequestEvent<InviteToGroupRequest> OnGroupsInviteToGroupRequestEvent;
|
||||
public event PlayFabResultEvent<InviteToGroupResponse> OnGroupsInviteToGroupResultEvent;
|
||||
public event PlayFabRequestEvent<IsMemberRequest> OnGroupsIsMemberRequestEvent;
|
||||
public event PlayFabResultEvent<IsMemberResponse> OnGroupsIsMemberResultEvent;
|
||||
public event PlayFabRequestEvent<ListGroupApplicationsRequest> OnGroupsListGroupApplicationsRequestEvent;
|
||||
public event PlayFabResultEvent<ListGroupApplicationsResponse> OnGroupsListGroupApplicationsResultEvent;
|
||||
public event PlayFabRequestEvent<ListGroupBlocksRequest> OnGroupsListGroupBlocksRequestEvent;
|
||||
public event PlayFabResultEvent<ListGroupBlocksResponse> OnGroupsListGroupBlocksResultEvent;
|
||||
public event PlayFabRequestEvent<ListGroupInvitationsRequest> OnGroupsListGroupInvitationsRequestEvent;
|
||||
public event PlayFabResultEvent<ListGroupInvitationsResponse> OnGroupsListGroupInvitationsResultEvent;
|
||||
public event PlayFabRequestEvent<ListGroupMembersRequest> OnGroupsListGroupMembersRequestEvent;
|
||||
public event PlayFabResultEvent<ListGroupMembersResponse> OnGroupsListGroupMembersResultEvent;
|
||||
public event PlayFabRequestEvent<ListMembershipRequest> OnGroupsListMembershipRequestEvent;
|
||||
public event PlayFabResultEvent<ListMembershipResponse> OnGroupsListMembershipResultEvent;
|
||||
public event PlayFabRequestEvent<ListMembershipOpportunitiesRequest> OnGroupsListMembershipOpportunitiesRequestEvent;
|
||||
public event PlayFabResultEvent<ListMembershipOpportunitiesResponse> OnGroupsListMembershipOpportunitiesResultEvent;
|
||||
public event PlayFabRequestEvent<RemoveGroupApplicationRequest> OnGroupsRemoveGroupApplicationRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnGroupsRemoveGroupApplicationResultEvent;
|
||||
public event PlayFabRequestEvent<RemoveGroupInvitationRequest> OnGroupsRemoveGroupInvitationRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnGroupsRemoveGroupInvitationResultEvent;
|
||||
public event PlayFabRequestEvent<RemoveMembersRequest> OnGroupsRemoveMembersRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnGroupsRemoveMembersResultEvent;
|
||||
public event PlayFabRequestEvent<UnblockEntityRequest> OnGroupsUnblockEntityRequestEvent;
|
||||
public event PlayFabResultEvent<EmptyResponse> OnGroupsUnblockEntityResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateGroupRequest> OnGroupsUpdateGroupRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateGroupResponse> OnGroupsUpdateGroupResultEvent;
|
||||
public event PlayFabRequestEvent<UpdateGroupRoleRequest> OnGroupsUpdateRoleRequestEvent;
|
||||
public event PlayFabResultEvent<UpdateGroupRoleResponse> OnGroupsUpdateRoleResultEvent;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89aad6173ff54ed4092f14bd118f0652
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,366 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.GroupsModels;
|
||||
using PlayFab.Internal;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// The Groups API is designed for any permanent or semi-permanent collections of Entities (players, or non-players). If you
|
||||
/// want to make Guilds/Clans/Corporations/etc., then you should use groups. Groups can also be used to make chatrooms,
|
||||
/// parties, or any other persistent collection of entities.
|
||||
/// </summary>
|
||||
public static class PlayFabGroupsAPI
|
||||
{
|
||||
static PlayFabGroupsAPI() {}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public static bool IsEntityLoggedIn()
|
||||
{
|
||||
return PlayFabSettings.staticPlayer.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public static void ForgetAllCredentials()
|
||||
{
|
||||
PlayFabSettings.staticPlayer.ForgetAllCredentials();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Accepts an outstanding invitation to to join a group
|
||||
/// </summary>
|
||||
public static void AcceptGroupApplication(AcceptGroupApplicationRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/AcceptGroupApplication", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Accepts an invitation to join a group
|
||||
/// </summary>
|
||||
public static void AcceptGroupInvitation(AcceptGroupInvitationRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/AcceptGroupInvitation", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds members to a group or role.
|
||||
/// </summary>
|
||||
public static void AddMembers(AddMembersRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/AddMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies to join a group
|
||||
/// </summary>
|
||||
public static void ApplyToGroup(ApplyToGroupRequest request, Action<ApplyToGroupResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/ApplyToGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Blocks a list of entities from joining a group.
|
||||
/// </summary>
|
||||
public static void BlockEntity(BlockEntityRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/BlockEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the role membership of a list of entities from one role to another.
|
||||
/// </summary>
|
||||
public static void ChangeMemberRole(ChangeMemberRoleRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/ChangeMemberRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new group.
|
||||
/// </summary>
|
||||
public static void CreateGroup(CreateGroupRequest request, Action<CreateGroupResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/CreateGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new group role.
|
||||
/// </summary>
|
||||
public static void CreateRole(CreateGroupRoleRequest request, Action<CreateGroupRoleResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/CreateRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a group and all roles, invitations, join requests, and blocks associated with it.
|
||||
/// </summary>
|
||||
public static void DeleteGroup(DeleteGroupRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/DeleteGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes an existing role in a group.
|
||||
/// </summary>
|
||||
public static void DeleteRole(DeleteRoleRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/DeleteRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information about a group and its roles
|
||||
/// </summary>
|
||||
public static void GetGroup(GetGroupRequest request, Action<GetGroupResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/GetGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invites a player to join a group
|
||||
/// </summary>
|
||||
public static void InviteToGroup(InviteToGroupRequest request, Action<InviteToGroupResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/InviteToGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if an entity is a member of a group or role within the group
|
||||
/// </summary>
|
||||
public static void IsMember(IsMemberRequest request, Action<IsMemberResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/IsMember", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all outstanding requests to join a group
|
||||
/// </summary>
|
||||
public static void ListGroupApplications(ListGroupApplicationsRequest request, Action<ListGroupApplicationsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/ListGroupApplications", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all entities blocked from joining a group
|
||||
/// </summary>
|
||||
public static void ListGroupBlocks(ListGroupBlocksRequest request, Action<ListGroupBlocksResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/ListGroupBlocks", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all outstanding invitations for a group
|
||||
/// </summary>
|
||||
public static void ListGroupInvitations(ListGroupInvitationsRequest request, Action<ListGroupInvitationsResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/ListGroupInvitations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all members for a group
|
||||
/// </summary>
|
||||
public static void ListGroupMembers(ListGroupMembersRequest request, Action<ListGroupMembersResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/ListGroupMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all groups and roles for an entity
|
||||
/// </summary>
|
||||
public static void ListMembership(ListMembershipRequest request, Action<ListMembershipResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/ListMembership", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an application to join a group
|
||||
/// </summary>
|
||||
public static void RemoveGroupApplication(RemoveGroupApplicationRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/RemoveGroupApplication", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an invitation join a group
|
||||
/// </summary>
|
||||
public static void RemoveGroupInvitation(RemoveGroupInvitationRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/RemoveGroupInvitation", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes members from a group.
|
||||
/// </summary>
|
||||
public static void RemoveMembers(RemoveMembersRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/RemoveMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unblocks a list of entities from joining a group
|
||||
/// </summary>
|
||||
public static void UnblockEntity(UnblockEntityRequest request, Action<EmptyResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/UnblockEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates non-membership data about a group.
|
||||
/// </summary>
|
||||
public static void UpdateGroup(UpdateGroupRequest request, Action<UpdateGroupResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/UpdateGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates metadata about a role.
|
||||
/// </summary>
|
||||
public static void UpdateRole(UpdateGroupRoleRequest request, Action<UpdateGroupRoleResponse> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
|
||||
{
|
||||
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
|
||||
var callSettings = PlayFabSettings.staticSettings;
|
||||
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
|
||||
|
||||
|
||||
PlayFabHttp.MakeApiCall("/Group/UpdateRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42170e999ab34f549ac03af203959176
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,334 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.GroupsModels;
|
||||
using PlayFab.Internal;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab
|
||||
{
|
||||
/// <summary>
|
||||
/// The Groups API is designed for any permanent or semi-permanent collections of Entities (players, or non-players). If you
|
||||
/// want to make Guilds/Clans/Corporations/etc., then you should use groups. Groups can also be used to make chatrooms,
|
||||
/// parties, or any other persistent collection of entities.
|
||||
/// </summary>
|
||||
public class PlayFabGroupsInstanceAPI : IPlayFabInstanceApi
|
||||
{
|
||||
public readonly PlayFabApiSettings apiSettings = null;
|
||||
public readonly PlayFabAuthenticationContext authenticationContext = null;
|
||||
|
||||
public PlayFabGroupsInstanceAPI(PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
public PlayFabGroupsInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context)
|
||||
{
|
||||
if (context == null)
|
||||
throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call <PlayFabClientInstanceAPI>.GetAuthenticationContext()");
|
||||
apiSettings = settings;
|
||||
authenticationContext = context;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify entity login.
|
||||
/// </summary>
|
||||
public bool IsEntityLoggedIn()
|
||||
{
|
||||
return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear the Client SessionToken which allows this Client to call API calls requiring login.
|
||||
/// A new/fresh login will be required after calling this.
|
||||
/// </summary>
|
||||
public void ForgetAllCredentials()
|
||||
{
|
||||
if (authenticationContext != null)
|
||||
{
|
||||
authenticationContext.ForgetAllCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Accepts an outstanding invitation to to join a group
|
||||
/// </summary>
|
||||
public void AcceptGroupApplication(AcceptGroupApplicationRequest request, Action<EmptyResponse> 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/AcceptGroupApplication", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Accepts an invitation to join a group
|
||||
/// </summary>
|
||||
public void AcceptGroupInvitation(AcceptGroupInvitationRequest request, Action<EmptyResponse> 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/AcceptGroupInvitation", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds members to a group or role.
|
||||
/// </summary>
|
||||
public void AddMembers(AddMembersRequest request, Action<EmptyResponse> 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/AddMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies to join a group
|
||||
/// </summary>
|
||||
public void ApplyToGroup(ApplyToGroupRequest request, Action<ApplyToGroupResponse> 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/ApplyToGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Blocks a list of entities from joining a group.
|
||||
/// </summary>
|
||||
public void BlockEntity(BlockEntityRequest request, Action<EmptyResponse> 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/BlockEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the role membership of a list of entities from one role to another.
|
||||
/// </summary>
|
||||
public void ChangeMemberRole(ChangeMemberRoleRequest request, Action<EmptyResponse> 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/ChangeMemberRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new group.
|
||||
/// </summary>
|
||||
public void CreateGroup(CreateGroupRequest request, Action<CreateGroupResponse> 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/CreateGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new group role.
|
||||
/// </summary>
|
||||
public void CreateRole(CreateGroupRoleRequest request, Action<CreateGroupRoleResponse> 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/CreateRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a group and all roles, invitations, join requests, and blocks associated with it.
|
||||
/// </summary>
|
||||
public void DeleteGroup(DeleteGroupRequest request, Action<EmptyResponse> 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/DeleteGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes an existing role in a group.
|
||||
/// </summary>
|
||||
public void DeleteRole(DeleteRoleRequest request, Action<EmptyResponse> 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/DeleteRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information about a group and its roles
|
||||
/// </summary>
|
||||
public void GetGroup(GetGroupRequest request, Action<GetGroupResponse> 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/GetGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invites a player to join a group
|
||||
/// </summary>
|
||||
public void InviteToGroup(InviteToGroupRequest request, Action<InviteToGroupResponse> 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/InviteToGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if an entity is a member of a group or role within the group
|
||||
/// </summary>
|
||||
public void IsMember(IsMemberRequest request, Action<IsMemberResponse> 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/IsMember", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all outstanding requests to join a group
|
||||
/// </summary>
|
||||
public void ListGroupApplications(ListGroupApplicationsRequest request, Action<ListGroupApplicationsResponse> 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/ListGroupApplications", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all entities blocked from joining a group
|
||||
/// </summary>
|
||||
public void ListGroupBlocks(ListGroupBlocksRequest request, Action<ListGroupBlocksResponse> 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/ListGroupBlocks", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all outstanding invitations for a group
|
||||
/// </summary>
|
||||
public void ListGroupInvitations(ListGroupInvitationsRequest request, Action<ListGroupInvitationsResponse> 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/ListGroupInvitations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all members for a group
|
||||
/// </summary>
|
||||
public void ListGroupMembers(ListGroupMembersRequest request, Action<ListGroupMembersResponse> 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/ListGroupMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all groups and roles for an entity
|
||||
/// </summary>
|
||||
public void ListMembership(ListMembershipRequest request, Action<ListMembershipResponse> 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/ListMembership", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <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>
|
||||
/// Removes an application to join a group
|
||||
/// </summary>
|
||||
public void RemoveGroupApplication(RemoveGroupApplicationRequest request, Action<EmptyResponse> 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/RemoveGroupApplication", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an invitation join a group
|
||||
/// </summary>
|
||||
public void RemoveGroupInvitation(RemoveGroupInvitationRequest request, Action<EmptyResponse> 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/RemoveGroupInvitation", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes members from a group.
|
||||
/// </summary>
|
||||
public void RemoveMembers(RemoveMembersRequest request, Action<EmptyResponse> 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/RemoveMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unblocks a list of entities from joining a group
|
||||
/// </summary>
|
||||
public void UnblockEntity(UnblockEntityRequest request, Action<EmptyResponse> 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/UnblockEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates non-membership data about a group.
|
||||
/// </summary>
|
||||
public void UpdateGroup(UpdateGroupRequest request, Action<UpdateGroupResponse> 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/UpdateGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates metadata about a role.
|
||||
/// </summary>
|
||||
public void UpdateRole(UpdateGroupRoleRequest request, Action<UpdateGroupRoleResponse> 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/UpdateRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e14b336d534f60f4e911c8db52e74a86
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,985 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayFab.SharedModels;
|
||||
|
||||
namespace PlayFab.GroupsModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Accepts an outstanding invitation to to join a group if the invited entity is not blocked by the group. Nothing is
|
||||
/// returned in the case of success.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AcceptGroupApplicationRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// Type of the entity to accept as. Must be the same entity as the claimant or an entity that is a child of the claimant
|
||||
/// entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Accepts an outstanding invitation to join the group if the invited entity is not blocked by the group. Only the invited
|
||||
/// entity or a parent in its chain (e.g. title) may accept the invitation on the invited entity's behalf. Nothing is
|
||||
/// returned in the case of success.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AcceptGroupInvitationRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds members to a group or role. Existing members of the group will added to roles within the group, but if the user is
|
||||
/// not already a member of the group, only title claimants may add them to the group, and others must use the group
|
||||
/// application or invite system to add new members to a group. Returns nothing if successful.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AddMembersRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// List of entities to add to the group. Only entities of type title_player_account and character may be added to groups.
|
||||
/// </summary>
|
||||
public List<EntityKey> Members;
|
||||
/// <summary>
|
||||
/// Optional: The ID of the existing role to add the entities to. If this is not specified, the default member role for the
|
||||
/// group will be used. Role IDs must be between 1 and 64 characters long.
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an application to join a group. Calling this while a group application already exists will return the same
|
||||
/// application instead of an error and will not refresh the time before the application expires. By default, if the entity
|
||||
/// has an invitation to join the group outstanding, this will accept the invitation to join the group instead and return an
|
||||
/// error indicating such, rather than creating a duplicate application to join that will need to be cleaned up later.
|
||||
/// Returns information about the application or an error indicating an invitation was accepted instead.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ApplyToGroupRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Optional, default true. Automatically accept an outstanding invitation if one exists instead of creating an application
|
||||
/// </summary>
|
||||
public bool? AutoAcceptOutstandingInvite;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes an application to join a group
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ApplyToGroupResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Type of entity that requested membership
|
||||
/// </summary>
|
||||
public EntityWithLineage Entity;
|
||||
/// <summary>
|
||||
/// When the application to join will expire and be deleted
|
||||
/// </summary>
|
||||
public DateTime Expires;
|
||||
/// <summary>
|
||||
/// ID of the group that the entity requesting membership to
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Blocks a list of entities from joining a group. Blocked entities may not create new applications to join, be invited to
|
||||
/// join, accept an invitation, or have an application accepted. Failure due to being blocked does not clean up existing
|
||||
/// applications or invitations to the group. No data is returned in the case of success.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class BlockEntityRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the role membership of a list of entities from one role to another in in a single operation. The destination
|
||||
/// role must already exist. This is equivalent to adding the entities to the destination role and removing from the origin
|
||||
/// role. Returns nothing if successful.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ChangeMemberRoleRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The ID of the role that the entities will become a member of. This must be an existing role. Role IDs must be between 1
|
||||
/// and 64 characters long.
|
||||
/// </summary>
|
||||
public string DestinationRoleId;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// List of entities to move between roles in the group. All entities in this list must be members of the group and origin
|
||||
/// role.
|
||||
/// </summary>
|
||||
public List<EntityKey> Members;
|
||||
/// <summary>
|
||||
/// The ID of the role that the entities currently are a member of. Role IDs must be between 1 and 64 characters long.
|
||||
/// </summary>
|
||||
public string OriginRoleId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new group, as well as administration and member roles, based off of a title's group template. Returns
|
||||
/// information about the group that was created.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CreateGroupRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The name of the group. This is unique at the title level by default.
|
||||
/// </summary>
|
||||
public string GroupName;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateGroupResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID of the administrator role for the group.
|
||||
/// </summary>
|
||||
public string AdminRoleId;
|
||||
/// <summary>
|
||||
/// The server date and time the group was created.
|
||||
/// </summary>
|
||||
public DateTime Created;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// The name of the group.
|
||||
/// </summary>
|
||||
public string GroupName;
|
||||
/// <summary>
|
||||
/// The ID of the default member role for the group.
|
||||
/// </summary>
|
||||
public string MemberRoleId;
|
||||
/// <summary>
|
||||
/// The current version of the profile, can be used for concurrency control during updates.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
/// <summary>
|
||||
/// The list of roles and names that belong to the group.
|
||||
/// </summary>
|
||||
public Dictionary<string,string> Roles;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new role within an existing group, with no members. Both the role ID and role name must be unique within the
|
||||
/// group, but the name can be the same as the ID. The role ID is set at creation and cannot be changed. Returns information
|
||||
/// about the role that was created.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CreateGroupRoleRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// The ID of the role. This must be unique within the group and cannot be changed. Role IDs must be between 1 and 64
|
||||
/// characters long and are restricted to a-Z, A-Z, 0-9, '(', ')', '_', '-' and '.'.
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
/// <summary>
|
||||
/// The name of the role. This must be unique within the group and can be changed later. Role names must be between 1 and
|
||||
/// 100 characters long
|
||||
/// </summary>
|
||||
public string RoleName;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CreateGroupRoleResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The current version of the group profile, can be used for concurrency control during updates.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
/// <summary>
|
||||
/// ID for the role
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
/// <summary>
|
||||
/// The name of the role
|
||||
/// </summary>
|
||||
public string RoleName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a group and all roles, invitations, join requests, and blocks associated with it. Permission to delete is only
|
||||
/// required the group itself to execute this action. The group and data cannot be cannot be recovered once removed, but any
|
||||
/// abuse reports about the group will remain. No data is returned in the case of success.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DeleteGroupRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// ID of the group or role to remove
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns information about the role
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DeleteRoleRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// The ID of the role to delete. Role IDs must be between 1 and 64 characters long.
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EmptyResponse : PlayFabResultCommon
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Combined entity type and ID structure which uniquely identifies a single entity.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class EntityKey : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique ID of the entity.
|
||||
/// </summary>
|
||||
public string Id;
|
||||
/// <summary>
|
||||
/// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
|
||||
/// </summary>
|
||||
public string Type;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EntityMemberRole : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The list of members in the role
|
||||
/// </summary>
|
||||
public List<EntityWithLineage> Members;
|
||||
/// <summary>
|
||||
/// The ID of the role.
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
/// <summary>
|
||||
/// The name of the role
|
||||
/// </summary>
|
||||
public string RoleName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Entity wrapper class that contains the entity key and the entities that make up the lineage of the entity.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class EntityWithLineage : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity key for the specified entity
|
||||
/// </summary>
|
||||
public EntityKey Key;
|
||||
/// <summary>
|
||||
/// Dictionary of entity keys for related entities. Dictionary key is entity type.
|
||||
/// </summary>
|
||||
public Dictionary<string,EntityKey> Lineage;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the ID, name, role list and other non-membership related information about a group.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GetGroupRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// The full name of the group
|
||||
/// </summary>
|
||||
public string GroupName;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GetGroupResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID of the administrator role for the group.
|
||||
/// </summary>
|
||||
public string AdminRoleId;
|
||||
/// <summary>
|
||||
/// The server date and time the group was created.
|
||||
/// </summary>
|
||||
public DateTime Created;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// The name of the group.
|
||||
/// </summary>
|
||||
public string GroupName;
|
||||
/// <summary>
|
||||
/// The ID of the default member role for the group.
|
||||
/// </summary>
|
||||
public string MemberRoleId;
|
||||
/// <summary>
|
||||
/// The current version of the profile, can be used for concurrency control during updates.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
/// <summary>
|
||||
/// The list of roles and names that belong to the group.
|
||||
/// </summary>
|
||||
public Dictionary<string,string> Roles;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes an application to join a group
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GroupApplication : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Type of entity that requested membership
|
||||
/// </summary>
|
||||
public EntityWithLineage Entity;
|
||||
/// <summary>
|
||||
/// When the application to join will expire and be deleted
|
||||
/// </summary>
|
||||
public DateTime Expires;
|
||||
/// <summary>
|
||||
/// ID of the group that the entity requesting membership to
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes an entity that is blocked from joining a group.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GroupBlock : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity that is blocked
|
||||
/// </summary>
|
||||
public EntityWithLineage Entity;
|
||||
/// <summary>
|
||||
/// ID of the group that the entity is blocked from
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes an invitation to a group.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GroupInvitation : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// When the invitation will expire and be deleted
|
||||
/// </summary>
|
||||
public DateTime Expires;
|
||||
/// <summary>
|
||||
/// The group that the entity invited to
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// The entity that created the invitation
|
||||
/// </summary>
|
||||
public EntityWithLineage InvitedByEntity;
|
||||
/// <summary>
|
||||
/// The entity that is invited
|
||||
/// </summary>
|
||||
public EntityWithLineage InvitedEntity;
|
||||
/// <summary>
|
||||
/// ID of the role in the group to assign the user to.
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a group role
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GroupRole : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// ID for the role
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
/// <summary>
|
||||
/// The name of the role
|
||||
/// </summary>
|
||||
public string RoleName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a group and the roles that it contains
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GroupWithRoles : PlayFabBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// ID for the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// The name of the group
|
||||
/// </summary>
|
||||
public string GroupName;
|
||||
/// <summary>
|
||||
/// The current version of the profile, can be used for concurrency control during updates.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
/// <summary>
|
||||
/// The list of roles within the group
|
||||
/// </summary>
|
||||
public List<GroupRole> Roles;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invites a player to join a group, if they are not blocked by the group. An optional role can be provided to
|
||||
/// automatically assign the player to the role if they accept the invitation. By default, if the entity has an application
|
||||
/// to the group outstanding, this will accept the application instead and return an error indicating such, rather than
|
||||
/// creating a duplicate invitation to join that will need to be cleaned up later. Returns information about the new
|
||||
/// invitation or an error indicating an existing application to join was accepted.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class InviteToGroupRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Optional, default true. Automatically accept an application if one exists instead of creating an invitation
|
||||
/// </summary>
|
||||
public bool? AutoAcceptOutstandingApplication;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// Optional. ID of an existing a role in the group to assign the user to. The group's default member role is used if this
|
||||
/// is not specified. Role IDs must be between 1 and 64 characters long.
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes an invitation to a group.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class InviteToGroupResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// When the invitation will expire and be deleted
|
||||
/// </summary>
|
||||
public DateTime Expires;
|
||||
/// <summary>
|
||||
/// The group that the entity invited to
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// The entity that created the invitation
|
||||
/// </summary>
|
||||
public EntityWithLineage InvitedByEntity;
|
||||
/// <summary>
|
||||
/// The entity that is invited
|
||||
/// </summary>
|
||||
public EntityWithLineage InvitedEntity;
|
||||
/// <summary>
|
||||
/// ID of the role in the group to assign the user to.
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if an entity is a member of a group or role within the group. A result indicating if the entity is a
|
||||
/// member of the group is returned, or a permission error if the caller does not have permission to read the group's member
|
||||
/// list.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class IsMemberRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// Optional: ID of the role to check membership of. Defaults to any role (that is, check to see if the entity is a member
|
||||
/// of the group in any capacity) if not specified.
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class IsMemberResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// A value indicating whether or not the entity is a member.
|
||||
/// </summary>
|
||||
public bool IsMember;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all outstanding requests to join a group. Returns a list of all requests to join, as well as when the request will
|
||||
/// expire. To get the group applications for a specific entity, use ListMembershipOpportunities.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ListGroupApplicationsRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ListGroupApplicationsResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The requested list of applications to the group.
|
||||
/// </summary>
|
||||
public List<GroupApplication> Applications;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all entities blocked from joining a group. A list of blocked entities is returned
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ListGroupBlocksRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ListGroupBlocksResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The requested list blocked entities.
|
||||
/// </summary>
|
||||
public List<GroupBlock> BlockedEntities;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all outstanding invitations for a group. Returns a list of entities that have been invited, as well as when the
|
||||
/// invitation will expire. To get the group invitations for a specific entity, use ListMembershipOpportunities.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ListGroupInvitationsRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ListGroupInvitationsResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The requested list of group invitations.
|
||||
/// </summary>
|
||||
public List<GroupInvitation> Invitations;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of members and the roles they belong to within the group. If the caller does not have permission to view the
|
||||
/// role, and the member is in no other role, the member is not displayed. Returns a list of entities that are members of
|
||||
/// the group.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ListGroupMembersRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// ID of the group to list the members and roles for
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ListGroupMembersResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The requested list of roles and member entity IDs.
|
||||
/// </summary>
|
||||
public List<EntityMemberRole> Members;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists all outstanding group applications and invitations for an entity. Anyone may call this for any entity, but data
|
||||
/// will only be returned for the entity or a parent of that entity. To list invitations or applications for a group to
|
||||
/// check if a player is trying to join, use ListGroupInvitations and ListGroupApplications.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ListMembershipOpportunitiesRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ListMembershipOpportunitiesResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The requested list of group applications.
|
||||
/// </summary>
|
||||
public List<GroupApplication> Applications;
|
||||
/// <summary>
|
||||
/// The requested list of group invitations.
|
||||
/// </summary>
|
||||
public List<GroupInvitation> Invitations;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists the groups and roles that an entity is a part of, checking to see if group and role metadata and memberships
|
||||
/// should be visible to the caller. If the entity is not in any roles that are visible to the caller, the group is not
|
||||
/// returned in the results, even if the caller otherwise has permission to see that the entity is a member of that group.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ListMembershipRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The optional entity to perform this action on. Defaults to the currently logged in entity.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ListMembershipResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The list of groups
|
||||
/// </summary>
|
||||
public List<GroupWithRoles> Groups;
|
||||
}
|
||||
|
||||
public enum OperationTypes
|
||||
{
|
||||
Created,
|
||||
Updated,
|
||||
Deleted,
|
||||
None
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an existing application to join the group. This is used for both rejection of an application as well as
|
||||
/// withdrawing an application. The applying entity or a parent in its chain (e.g. title) may withdraw the application, and
|
||||
/// any caller with appropriate access in the group may reject an application. No data is returned in the case of success.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class RemoveGroupApplicationRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an existing invitation to join the group. This is used for both rejection of an invitation as well as rescinding
|
||||
/// an invitation. The invited entity or a parent in its chain (e.g. title) may reject the invitation by calling this
|
||||
/// method, and any caller with appropriate access in the group may rescind an invitation. No data is returned in the case
|
||||
/// of success.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class RemoveGroupInvitationRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes members from a group. A member can always remove themselves from a group, regardless of permissions. Returns
|
||||
/// nothing if successful.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class RemoveMembersRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// List of entities to remove
|
||||
/// </summary>
|
||||
public List<EntityKey> Members;
|
||||
/// <summary>
|
||||
/// The ID of the role to remove the entities from.
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unblocks a list of entities from joining a group. No data is returned in the case of success.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UnblockEntityRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// The entity to perform this action on.
|
||||
/// </summary>
|
||||
public EntityKey Entity;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates data about a group, such as the name or default member role. Returns information about whether the update was
|
||||
/// successful. Only title claimants may modify the administration role for a group.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UpdateGroupRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Optional: the ID of an existing role to set as the new administrator role for the group
|
||||
/// </summary>
|
||||
public string AdminRoleId;
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// Optional field used for concurrency control. By specifying the previously returned value of ProfileVersion from the
|
||||
/// GetGroup API, you can ensure that the group data update will only be performed if the group has not been updated by any
|
||||
/// other clients since the version you last loaded.
|
||||
/// </summary>
|
||||
public int? ExpectedProfileVersion;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// Optional: the new name of the group
|
||||
/// </summary>
|
||||
public string GroupName;
|
||||
/// <summary>
|
||||
/// Optional: the ID of an existing role to set as the new member role for the group
|
||||
/// </summary>
|
||||
public string MemberRoleId;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class UpdateGroupResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Optional reason to explain why the operation was the result that it was.
|
||||
/// </summary>
|
||||
public string OperationReason;
|
||||
/// <summary>
|
||||
/// New version of the group data.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
/// <summary>
|
||||
/// Indicates which operation was completed, either Created, Updated, Deleted or None.
|
||||
/// </summary>
|
||||
public OperationTypes? SetResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the role name. Returns information about whether the update was successful.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UpdateGroupRoleRequest : PlayFabRequestCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||
/// </summary>
|
||||
public Dictionary<string,string> CustomTags;
|
||||
/// <summary>
|
||||
/// Optional field used for concurrency control. By specifying the previously returned value of ProfileVersion from the
|
||||
/// GetGroup API, you can ensure that the group data update will only be performed if the group has not been updated by any
|
||||
/// other clients since the version you last loaded.
|
||||
/// </summary>
|
||||
public int? ExpectedProfileVersion;
|
||||
/// <summary>
|
||||
/// The identifier of the group
|
||||
/// </summary>
|
||||
public EntityKey Group;
|
||||
/// <summary>
|
||||
/// ID of the role to update. Role IDs must be between 1 and 64 characters long.
|
||||
/// </summary>
|
||||
public string RoleId;
|
||||
/// <summary>
|
||||
/// The new name of the role
|
||||
/// </summary>
|
||||
public string RoleName;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class UpdateGroupRoleResponse : PlayFabResultCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Optional reason to explain why the operation was the result that it was.
|
||||
/// </summary>
|
||||
public string OperationReason;
|
||||
/// <summary>
|
||||
/// New version of the role data.
|
||||
/// </summary>
|
||||
public int ProfileVersion;
|
||||
/// <summary>
|
||||
/// Indicates which operation was completed, either Created, Updated, Deleted or None.
|
||||
/// </summary>
|
||||
public OperationTypes? SetResult;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d73f86b427d81044bb2417ea3b5b03ac
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e9ed76149c97e14c85789225c8c3971
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,22 @@
|
||||
#if !DISABLE_PLAYFABENTITY_API
|
||||
using PlayFab.InsightsModels;
|
||||
|
||||
namespace PlayFab.Events
|
||||
{
|
||||
public partial class PlayFabEvents
|
||||
{
|
||||
public event PlayFabRequestEvent<InsightsEmptyRequest> OnInsightsGetDetailsRequestEvent;
|
||||
public event PlayFabResultEvent<InsightsGetDetailsResponse> OnInsightsGetDetailsResultEvent;
|
||||
public event PlayFabRequestEvent<InsightsEmptyRequest> OnInsightsGetLimitsRequestEvent;
|
||||
public event PlayFabResultEvent<InsightsGetLimitsResponse> OnInsightsGetLimitsResultEvent;
|
||||
public event PlayFabRequestEvent<InsightsGetOperationStatusRequest> OnInsightsGetOperationStatusRequestEvent;
|
||||
public event PlayFabResultEvent<InsightsGetOperationStatusResponse> OnInsightsGetOperationStatusResultEvent;
|
||||
public event PlayFabRequestEvent<InsightsGetPendingOperationsRequest> OnInsightsGetPendingOperationsRequestEvent;
|
||||
public event PlayFabResultEvent<InsightsGetPendingOperationsResponse> OnInsightsGetPendingOperationsResultEvent;
|
||||
public event PlayFabRequestEvent<InsightsSetPerformanceRequest> OnInsightsSetPerformanceRequestEvent;
|
||||
public event PlayFabResultEvent<InsightsOperationResponse> OnInsightsSetPerformanceResultEvent;
|
||||
public event PlayFabRequestEvent<InsightsSetStorageRetentionRequest> OnInsightsSetStorageRetentionRequestEvent;
|
||||
public event PlayFabResultEvent<InsightsOperationResponse> OnInsightsSetStorageRetentionResultEvent;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f37defb20913be94a8d7b0e4ed5b97cf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue