LootLocker Unreal SDK 11.1.0
Game backend SDK for Unreal Engine
Loading...
Searching...
No Matches
LootLockerPlaytestsRequestHandler.h
Go to the documentation of this file.
1// Copyright (c) 2021 LootLocker
2
3#pragma once
4
5
6#include "CoreMinimal.h"
10#include "LootLockerPlaytestsRequestHandler.generated.h"
11
12//==================================================
13// Request Definitions
14//==================================================
17
21USTRUCT(BlueprintType, Category = "LootLocker")
23{
24 GENERATED_BODY()
28 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
29 TArray<FString> statement_ids;
30};
31
32
33//==================================================
34// Data Type Definitions
35//==================================================
38
41USTRUCT(BlueprintType, Category = "LootLocker")
43{
44 GENERATED_BODY()
48 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
49 FString document_id = "";
54 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
55 FString content_hash = "";
59 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
60 TArray<FString> statement_ids;
64 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
65 FDateTime acknowledged_at = FDateTime(0);
66};
67
71USTRUCT(BlueprintType, Category = "LootLocker")
73{
74 GENERATED_BODY()
78 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
79 FString key = "";
83 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
84 FString value = "";
85};
86
87
88//==================================================
89// Request Definitions
90//==================================================
91
100USTRUCT(BlueprintType, Category = "LootLocker")
102{
103 GENERATED_BODY()
107 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
108 FString Metadata_key = "";
117 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
118 FString Value = "";
124 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
126
128 static LOOTLOCKERSDK_API FLootLockerPlaytestAnswerSubmission FromText(const FString& MetadataKey, const FString& Value);
129
131 static LOOTLOCKERSDK_API FLootLockerPlaytestAnswerSubmission FromNumber(const FString& MetadataKey, double Value);
132
134 static LOOTLOCKERSDK_API FLootLockerPlaytestAnswerSubmission FromBool(const FString& MetadataKey, bool Value);
135
137 static LOOTLOCKERSDK_API FLootLockerPlaytestAnswerSubmission FromMultiSelect(const FString& MetadataKey, const TArray<FString>& SelectedValues);
138};
139
140
141//==================================================
142// Response Definitions
143//==================================================
144
148USTRUCT(BlueprintType, Category = "LootLocker")
150{
151 GENERATED_BODY()
155 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
156 bool completed = false;
161 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
162 FDateTime completed_at = FDateTime(0);
166 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
171 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
173};
174
178USTRUCT(BlueprintType, Category = "LootLocker")
180{
181 GENERATED_BODY()
186 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
187 bool complete = false;
191 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
192 FDateTime completed_at = FDateTime(0);
196 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
197 FString playtest_id = "";
198};
199
203USTRUCT(BlueprintType, Category = "LootLocker")
205{
206 GENERATED_BODY()
210 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
211 FString document_id = "";
215 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
216 FString content_hash = "";
217};
218
219//==================================================
220// Delegate Definitions
221//==================================================
224
236
237//==================================================
238// API Class Definition
239//==================================================
240
242UCLASS()
243class LOOTLOCKERSDK_API ULootLockerPlaytestsRequestHandler : public UObject
244{
245 GENERATED_BODY()
246public:
248
249 static FString GetOnboardingStatus(const FLootLockerPlayerData& PlayerData, const FString& Subdomain, const FLootLockerPlaytestOnboardingStatusResponseDelegate& OnComplete);
250 static FString CompleteOnboarding(const FLootLockerPlayerData& PlayerData, const FString& Subdomain, const FLootLockerCompletePlaytestOnboardingResponseDelegate& OnComplete);
251 static FString AcknowledgeDocument(const FLootLockerPlayerData& PlayerData, const FString& Subdomain, const FString& DocumentId, const FLootLockerAcknowledgePlaytestDocumentRequest& Request, const FLootLockerAcknowledgePlaytestDocumentResponseDelegate& OnComplete);
252
259 static FString SubmitAnswers(const FLootLockerPlayerData& PlayerData, const TArray<FLootLockerPlaytestAnswerSubmission>& Answers, const FLootLockerSetMetadataResponseDelegate& OnComplete);
260};
static FString CompleteOnboarding(const FLootLockerPlayerData &PlayerData, const FString &Subdomain, const FLootLockerCompletePlaytestOnboardingResponseDelegate &OnComplete)
static FString AcknowledgeDocument(const FLootLockerPlayerData &PlayerData, const FString &Subdomain, const FString &DocumentId, const FLootLockerAcknowledgePlaytestDocumentRequest &Request, const FLootLockerAcknowledgePlaytestDocumentResponseDelegate &OnComplete)
static FString SubmitAnswers(const FLootLockerPlayerData &PlayerData, const TArray< FLootLockerPlaytestAnswerSubmission > &Answers, const FLootLockerSetMetadataResponseDelegate &OnComplete)
Submit answers to a playtest for the current player.
static FString GetOnboardingStatus(const FLootLockerPlayerData &PlayerData, const FString &Subdomain, const FLootLockerPlaytestOnboardingStatusResponseDelegate &OnComplete)
ULootLockerPlaytestsRequestHandler()
Definition LootLockerPlaytestsRequestHandler.h:247
ELootLockerMetadataTypes
Possible metadata types.
Definition LootLockerMetadataRequestHandler.h:45
void(* FLootLockerSetMetadataResponseDelegate)(FLootLockerSetMetadataResponse)
Blueprint response delegate for setting metadata.
Definition LootLockerMetadataRequestHandler.h:501
@ String
Definition LootLockerMetadataRequestHandler.h:46
void(* FLootLockerPlaytestOnboardingStatusResponseDelegate)(FLootLockerPlaytestOnboardingStatusResponse)
C++ response delegate for getting a playtest's onboarding status.
Definition LootLockerPlaytestsRequestHandler.h:227
void(* FLootLockerCompletePlaytestOnboardingResponseDelegate)(FLootLockerCompletePlaytestOnboardingResponse)
C++ response delegate for completing playtest onboarding.
Definition LootLockerPlaytestsRequestHandler.h:231
void(* FLootLockerAcknowledgePlaytestDocumentResponseDelegate)(FLootLockerAcknowledgePlaytestDocumentResponse)
C++ response delegate for acknowledging a playtest document.
Definition LootLockerPlaytestsRequestHandler.h:235
Request to acknowledge a playtest document.
Definition LootLockerPlaytestsRequestHandler.h:23
TArray< FString > statement_ids
Every statement id in the document.
Definition LootLockerPlaytestsRequestHandler.h:29
Response returned after acknowledging a playtest document.
Definition LootLockerPlaytestsRequestHandler.h:205
FString document_id
The ULID of the acknowledged document.
Definition LootLockerPlaytestsRequestHandler.h:211
FString content_hash
The content hash of the document that was acknowledged.
Definition LootLockerPlaytestsRequestHandler.h:216
Response returned after completing playtest onboarding for the calling player.
Definition LootLockerPlaytestsRequestHandler.h:180
FString playtest_id
The ULID of the playtest that was completed.
Definition LootLockerPlaytestsRequestHandler.h:197
bool complete
Whether onboarding is now complete.
Definition LootLockerPlaytestsRequestHandler.h:187
FDateTime completed_at
When onboarding was completed.
Definition LootLockerPlaytestsRequestHandler.h:192
Definition LootLockerPlayerData.h:12
A document the calling player has acknowledged in a playtest.
Definition LootLockerPlaytestsRequestHandler.h:43
TArray< FString > statement_ids
The statement ids that were acknowledged.
Definition LootLockerPlaytestsRequestHandler.h:60
FString document_id
The ULID of the document.
Definition LootLockerPlaytestsRequestHandler.h:49
FDateTime acknowledged_at
When the document was acknowledged.
Definition LootLockerPlaytestsRequestHandler.h:65
FString content_hash
The content hash of the document at the time it was acknowledged.
Definition LootLockerPlaytestsRequestHandler.h:55
A single answer to a playtest question, submitted through SubmitPlaytestAnswers.
Definition LootLockerPlaytestsRequestHandler.h:102
FString Metadata_key
The metadata_key of the question this answers.
Definition LootLockerPlaytestsRequestHandler.h:108
static FLootLockerPlaytestAnswerSubmission FromText(const FString &MetadataKey, const FString &Value)
Build a String answer, for short_text, long_text, date and select questions.
static FLootLockerPlaytestAnswerSubmission FromMultiSelect(const FString &MetadataKey, const TArray< FString > &SelectedValues)
Build a Json answer, for multiselect questions.
ELootLockerMetadataTypes Type
The metadata type of the value.
Definition LootLockerPlaytestsRequestHandler.h:125
FString Value
The answer value.
Definition LootLockerPlaytestsRequestHandler.h:118
static FLootLockerPlaytestAnswerSubmission FromNumber(const FString &MetadataKey, double Value)
Build a Number answer, for number questions.
static FLootLockerPlaytestAnswerSubmission FromBool(const FString &MetadataKey, bool Value)
Build a Bool answer, for checkbox questions.
An answer the calling player has stored for a playtest question.
Definition LootLockerPlaytestsRequestHandler.h:73
FString value
The serialized metadata entry.
Definition LootLockerPlaytestsRequestHandler.h:84
FString key
The player metadata key the answer is stored under.
Definition LootLockerPlaytestsRequestHandler.h:79
Response containing the calling player's onboarding progress for a playtest.
Definition LootLockerPlaytestsRequestHandler.h:150
FDateTime completed_at
When the player completed onboarding.
Definition LootLockerPlaytestsRequestHandler.h:162
TArray< FLootLockerPlaytestAnswer > answers
The answers the player has stored for this playtest's questions.
Definition LootLockerPlaytestsRequestHandler.h:172
bool completed
Whether the player has completed onboarding for this playtest.
Definition LootLockerPlaytestsRequestHandler.h:156
TArray< FLootLockerPlaytestAcknowledgedDocument > documents
The documents the player has acknowledged.
Definition LootLockerPlaytestsRequestHandler.h:167
Base response struct — every SDK callback receives a struct that derives from this.
Definition LootLockerResponse.h:19