Add PlayFab Client endpoints
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public class FEntityKey
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique ID of the entity.
|
||||
/// </summary>
|
||||
[JsonPropertyName("Id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
|
||||
/// </summary>
|
||||
[JsonPropertyName("Type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
// Not in PlayFab SDK
|
||||
[JsonPropertyName("TypeString")]
|
||||
public string TypeString { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public class FEntityTokenResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// [optional] The entity id and type.
|
||||
/// </summary>
|
||||
[JsonPropertyName("Entity")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public FEntityKey Entity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] The token used to set X-EntityToken for all entity based API calls.
|
||||
/// </summary>
|
||||
[JsonPropertyName("EntityToken")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string EntityToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] The time the token will expire, if it is an expiring token, in UTC.
|
||||
/// </summary>
|
||||
[JsonPropertyName("TokenExpiration")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public DateTime? TokenExpiration { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public class FGenericServiceId
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the service for which the player has a unique identifier.
|
||||
/// </summary>
|
||||
[JsonPropertyName("ServiceName")]
|
||||
public string ServiceName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unique identifier of the player in that service.
|
||||
/// </summary>
|
||||
[JsonPropertyName("UserId")]
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public class FGetPlayerCombinedInfoResultPayload
|
||||
{
|
||||
// TSharedPtr<FUserAccountInfo> AccountInfo;
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Inventories for each character for the user.
|
||||
/// </summary>
|
||||
[JsonPropertyName("CharacterInventories")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public List<object> CharacterInventories { get; set; }
|
||||
|
||||
// TArray<FCharacterResult> CharacterList;
|
||||
|
||||
/// <summary>
|
||||
/// [optional] The profile of the players. This profile is not guaranteed to be up-to-date. For a new player, this profile will not
|
||||
/// exist.
|
||||
/// </summary>
|
||||
[JsonPropertyName("PlayerProfile")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public FPlayerProfileModel PlayerProfile { get; set; }
|
||||
|
||||
// TArray<FStatisticValue> PlayerStatistics;
|
||||
|
||||
// TMap<FString, FString> TitleData;
|
||||
|
||||
// TMap<FString, FUserDataRecord> UserData;
|
||||
|
||||
/// <summary>
|
||||
/// The version of the UserData that was returned.
|
||||
/// </summary>
|
||||
[JsonPropertyName("UserDataVersion")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public uint? UserDataVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Array of inventory items in the user's current inventory.
|
||||
/// </summary>
|
||||
[JsonPropertyName("UserInventory")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public List<object> UserInventory { get; set; }
|
||||
|
||||
// TMap<FString, FUserDataRecord> UserReadOnlyData;
|
||||
|
||||
/// <summary>
|
||||
/// The version of the Read-Only UserData that was returned.
|
||||
/// </summary>
|
||||
[JsonPropertyName("UserReadOnlyDataVersion")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public uint? UserReadOnlyDataVersion { get; set; }
|
||||
|
||||
// TMap<FString, int32> UserVirtualCurrency;
|
||||
|
||||
// TMap<FString, FVirtualCurrencyRechargeTime> UserVirtualCurrencyRechargeTimes;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public class FItemInstance
|
||||
{
|
||||
/// <summary>
|
||||
/// [optional] Game specific comment associated with this instance when it was added to the user inventory.
|
||||
/// </summary>
|
||||
[JsonPropertyName("Annotation")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string Annotation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Array of unique items that were awarded when this catalog item was purchased.
|
||||
/// </summary>
|
||||
[JsonPropertyName("BundleContents")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public List<string> BundleContents { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Unique identifier for the parent inventory item, as defined in the catalog, for object which were added from a bundle or
|
||||
/// container.
|
||||
/// </summary>
|
||||
[JsonPropertyName("BundleParent")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string BundleParent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Catalog version for the inventory item, when this instance was created.
|
||||
/// </summary>
|
||||
[JsonPropertyName("CatalogVersion")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string CatalogVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] A set of custom key-value pairs on the instance of the inventory item, which is not to be confused with the catalog
|
||||
/// item's custom data.
|
||||
/// </summary>
|
||||
[JsonPropertyName("CustomData")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public Dictionary<string, string> CustomData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] CatalogItem.DisplayName at the time this item was purchased.
|
||||
/// </summary>
|
||||
[JsonPropertyName("DisplayName")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Timestamp for when this instance will expire.
|
||||
/// </summary>
|
||||
[JsonPropertyName("Expiration")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public DateTime? Expiration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Class name for the inventory item, as defined in the catalog.
|
||||
/// </summary>
|
||||
[JsonPropertyName("ItemClass")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string ItemClass { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Unique identifier for the inventory item, as defined in the catalog.
|
||||
/// </summary>
|
||||
[JsonPropertyName("ItemId")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string ItemId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Unique item identifier for this specific instance of the item.
|
||||
/// </summary>
|
||||
[JsonPropertyName("ItemInstanceId")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string ItemInstanceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Timestamp for when this instance was purchased.
|
||||
/// </summary>
|
||||
[JsonPropertyName("PurchaseDate")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public DateTime? PurchaseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Total number of remaining uses, if this is a consumable item.
|
||||
/// </summary>
|
||||
[JsonPropertyName("RemainingUses")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public int? RemainingUses { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Currency type for the cost of the catalog item. Not available when granting items.
|
||||
/// </summary>
|
||||
[JsonPropertyName("UnitCurrency")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string UnitCurrency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Cost of the catalog item in the given currency. Not available when granting items.
|
||||
/// </summary>
|
||||
[JsonPropertyName("UnitPrice")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public uint? UnitPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] The number of uses that were added or removed to this item in this call.
|
||||
/// </summary>
|
||||
[JsonPropertyName("UsesIncrementedBy")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public int? UsesIncrementedBy { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public class FPlayerProfileModel
|
||||
{
|
||||
/// <summary>
|
||||
/// [optional] Player display name
|
||||
/// </summary>
|
||||
[JsonPropertyName("DisplayName")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] PlayFab player account unique identifier
|
||||
/// </summary>
|
||||
[JsonPropertyName("PlayerId")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string PlayerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Publisher this player belongs to
|
||||
/// </summary>
|
||||
[JsonPropertyName("PublisherId")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string PublisherId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Title ID this player profile applies to
|
||||
/// </summary>
|
||||
[JsonPropertyName("TitleId")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string TitleId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public class FTreatmentAssignment
|
||||
{
|
||||
/// <summary>
|
||||
/// [optional] List of the experiment variables.
|
||||
/// </summary>
|
||||
[JsonPropertyName("Variables")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public List<FVariable> Variables { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] List of the experiment variants.
|
||||
/// </summary>
|
||||
[JsonPropertyName("Variants")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public List<string> Variants { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public class FUserDataRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// Timestamp for when this data was last updated.
|
||||
/// </summary>
|
||||
[JsonPropertyName("LastUpdated")]
|
||||
public DateTime LastUpdated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Indicates whether this data can be read by all users (public) or only the user (private). This is used for GetUserData
|
||||
/// requests being made by one player about another player.
|
||||
/// </summary>
|
||||
[JsonPropertyName("Permission")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public UserDataPermission Permission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Data stored for the specified user data key.
|
||||
/// </summary>
|
||||
[JsonPropertyName("Value")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public class FUserSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Boolean for whether this player is eligible for gathering device info.
|
||||
/// </summary>
|
||||
[JsonPropertyName("GatherDeviceInfo")]
|
||||
public bool GatherDeviceInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Boolean for whether this player should report OnFocus play-time tracking.
|
||||
/// </summary>
|
||||
[JsonPropertyName("GatherFocusInfo")]
|
||||
public bool GatherFocusInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Boolean for whether this player is eligible for ad tracking.
|
||||
/// </summary>
|
||||
[JsonPropertyName("NeedsAttribution")]
|
||||
public bool NeedsAttribution { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public class FVariable
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the variable.
|
||||
/// </summary>
|
||||
[JsonPropertyName("Name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Value of the variable.
|
||||
/// </summary>
|
||||
[JsonPropertyName("Value")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public class FVirtualCurrencyRechargeTime
|
||||
{
|
||||
/// <summary>
|
||||
/// Maximum value to which the regenerating currency will automatically increment. Note that it can exceed this value
|
||||
/// through use of the AddUserVirtualCurrency API call. However, it will not regenerate automatically until it has fallen
|
||||
/// below this value.
|
||||
/// </summary>
|
||||
[JsonPropertyName("RechargeMax")]
|
||||
public int RechargeMax { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Server timestamp in UTC indicating the next time the virtual currency will be incremented.
|
||||
/// </summary>
|
||||
[JsonPropertyName("RechargeTime")]
|
||||
public DateTime RechargeTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Time remaining (in seconds) before the next recharge increment of the virtual currency.
|
||||
/// </summary>
|
||||
[JsonPropertyName("SecondsToRecharge")]
|
||||
public int SecondsToRecharge { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Prospect.Server.Api.Models.Client.Data
|
||||
{
|
||||
public enum UserDataPermission
|
||||
{
|
||||
Public,
|
||||
Private
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user