LootLocker Unreal Server SDK 6.5.0
Server-side backend SDK for Unreal Engine
Loading...
Searching...
No Matches
LootLockerServerResponse.h
Go to the documentation of this file.
1// Copyright (c) 2021 LootLocker
2
3#pragma once
4#include "LootLockerServerResponse.generated.h"
5
9USTRUCT(BlueprintType)
11{
12 GENERATED_BODY()
13};
14
15USTRUCT(BlueprintType)
17{
18 GENERATED_BODY()
20 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
21 FString Code;
23 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
24 FString Doc_url;
26 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
27 FString Request_id;
29 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
30 FString Trace_id;
34 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
35 int Retry_after_seconds = -1;
37 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
38 FString Message;
39};
40
41USTRUCT(BlueprintType)
43{
44 GENERATED_BODY()
46 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
47 FString RequestTime = "";
49 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
50 FString RequestId = "";
52 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
53 FString RequestURL = "";
55 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
56 FString RequestMethod = "";
58 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
59 FString RequestParametersJsonString = "";
60};
61
65USTRUCT(BlueprintType)
67{
68 GENERATED_BODY()
69
70
71 UPROPERTY(BlueprintReadWrite, Category = "LootLockerServer")
72 bool Success = false;
74 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
75 int StatusCode = 0;
77 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
78 FString FullTextFromServer;
80 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
83 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
85};
86
87//==================================================
88// C++ Delegate Definitions
89//==================================================
90
91/*
92 C++ response delegate for a generic LootLocker Response
93 */
95
96//==================================================
97// Definition of pagination data structures
98//==================================================
99
104USTRUCT(BlueprintType)
106{
107 GENERATED_BODY()
111 UPROPERTY(BlueprintReadWrite, EditAnywhere, BlueprintReadWrite, Category = "LootLockerServer")
112 int Total = 0;
116 UPROPERTY(BlueprintReadWrite, EditAnywhere, BlueprintReadWrite, Category = "LootLockerServer")
117 FString Next_Cursor = "";
121 UPROPERTY(BlueprintReadWrite, EditAnywhere, BlueprintReadWrite, Category = "LootLockerServer")
122 FString Previous_Cursor = "";
123};
124
129USTRUCT(BlueprintType)
131{
132 GENERATED_BODY()
136 UPROPERTY(BlueprintReadWrite, EditAnywhere, BlueprintReadWrite, Category = "LootLockerServer")
137 int32 Total = 0;
141 UPROPERTY(BlueprintReadWrite, EditAnywhere, BlueprintReadWrite, Category = "LootLockerServer")
142 int32 Next_Cursor = 0;
146 UPROPERTY(BlueprintReadWrite, EditAnywhere, BlueprintReadWrite, Category = "LootLockerServer")
147 int32 Previous_Cursor = 0;
148};
149
150USTRUCT(BlueprintType)
152{
153 GENERATED_BODY()
157 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
158 FString Field;
162 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
163 FString Message;
164};
165
166USTRUCT(BlueprintType)
168{
169 GENERATED_BODY()
173 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
174 int32 Total = 0;
178 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
179 int32 Offset = 0;
183 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
184 int32 Per_page = 0;
188 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
189 int32 Last_page = 0;
193 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
194 int32 Current_page = 0;
198 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
199 FString Next_page;
203 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
204 FString Prev_page;
208 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
210};
211
216{
217 static const int LL_ERROR_UNDOCUMENTED = 0;
218 static const int LL_ERROR_INVALID_HTTP = -1;
219 static const int LL_ERROR_INVALID_INPUT = -2;
220 static const int LL_ERROR_PARSE_ERROR = -3;
221};
222
224{
225public:
226 // Construct a standardized error response
227 template<typename T>
228 static T Error(FString ErrorMessage, int StatusCode = 0, const FString& RequestId = "")
229 {
231 ErrorResponse.Success = false;
232 ErrorResponse.StatusCode = StatusCode;
233 ErrorResponse.FullTextFromServer = "{ \"message\": \"" + ErrorMessage + "\"}";
234 ErrorResponse.ErrorData.Message = ErrorMessage;
235 ErrorResponse.RequestContext.RequestId = RequestId;
236 return ErrorResponse;
237 }
238};
void(* FLootLockerServerResponseCallback)(FLootLockerServerResponse)
Definition LootLockerServerResponse.h:94
Definition LootLockerServerResponse.h:224
static T Error(FString ErrorMessage, int StatusCode=0, const FString &RequestId="")
Definition LootLockerServerResponse.h:228
An empty type to use as empty request bodies.
Definition LootLockerServerResponse.h:11
Definition LootLockerServerResponse.h:17
Definition LootLockerServerResponse.h:168
Definition LootLockerServerResponse.h:152
Pagination data for index based pagination This is used for methods that have a "count" and an "after...
Definition LootLockerServerResponse.h:131
Pagination data for key based pagination This is used for methods that have a "count" and an "after" ...
Definition LootLockerServerResponse.h:106
Definition LootLockerServerResponse.h:43
The base response for all LootLocker Server responses.
Definition LootLockerServerResponse.h:67
Static defines of the different predefined error status codes that can occur in responses.
Definition LootLockerServerResponse.h:216