@@ -15,18 +15,16 @@ namespace AccelByte
1515{
1616namespace Api
1717{
18- CloudSave::CloudSave (
19- AccelByte::Credentials const & Credentials,
20- AccelByte::Settings const & Setting,
21- FHttpRetryScheduler& HttpRef)
22- :
23- HttpRef{HttpRef},
24- Credentials{Credentials},
25- Settings{Setting}
26- {
27- }
18+ CloudSave::CloudSave (Credentials const & InCredentialsRef
19+ , Settings const & InSettingsRef
20+ , FHttpRetryScheduler& InHttpRef)
21+ : HttpRef{InHttpRef}
22+ , CredentialsRef{InCredentialsRef}
23+ , SettingsRef{InSettingsRef}
24+ {}
2825
29- CloudSave::~CloudSave (){}
26+ CloudSave::~CloudSave ()
27+ {}
3028
3129void CloudSave::SaveUserRecord (const FString& Key, bool bSetPublic, const FJsonObject& RecordRequest, const FVoidHandler& OnSuccess, const FErrorHandler& OnError)
3230{
@@ -40,8 +38,8 @@ void CloudSave::SaveUserRecord(FString const& Key, FJsonObject RecordRequest, bo
4038{
4139 FReport::Log (FString (__FUNCTION__));
4240
43- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
44- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/records/%s%s" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *Credentials .GetUserId (), *Key, (IsPublic ? TEXT (" /public" ) : TEXT (" " )));
41+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
42+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/records/%s%s" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *CredentialsRef .GetUserId (), *Key, (IsPublic ? TEXT (" /public" ) : TEXT (" " )));
4543 FString Verb = TEXT (" POST" );
4644 FString ContentType = TEXT (" application/json" );
4745 FString Accept = TEXT (" application/json" );
@@ -65,8 +63,8 @@ void CloudSave::GetUserRecord(FString const& Key, THandler<FAccelByteModelsUserR
6563{
6664 FReport::Log (FString (__FUNCTION__));
6765
68- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
69- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/records/%s" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *Credentials .GetUserId (), *Key);
66+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
67+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/records/%s" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *CredentialsRef .GetUserId (), *Key);
7068 FString Verb = TEXT (" GET" );
7169 FString ContentType = TEXT (" application/json" );
7270 FString Accept = TEXT (" application/json" );
@@ -114,8 +112,8 @@ void CloudSave::GetPublicUserRecord(FString const& Key, FString const& UserId, T
114112{
115113 FReport::Log (FString (__FUNCTION__));
116114
117- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
118- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/records/%s/public" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *UserId, *Key);
115+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
116+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/records/%s/public" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *UserId, *Key);
119117 FString Verb = TEXT (" GET" );
120118 FString ContentType = TEXT (" application/json" );
121119 FString Accept = TEXT (" application/json" );
@@ -176,8 +174,8 @@ void CloudSave::BulkGetPublicUserRecord(FString const& Key, const TArray<FString
176174
177175 const FListBulkUserInfoRequest UserList{ UserIds };
178176
179- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
180- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/bulk/records/%s/public" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *Key);
177+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
178+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/bulk/records/%s/public" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *Key);
181179 FString Verb = TEXT (" POST" );
182180 FString ContentType = TEXT (" application/json" );
183181 FString Accept = TEXT (" application/json" );
@@ -240,8 +238,8 @@ void CloudSave::ReplaceUserRecord(FString const& Key, FJsonObject RecordRequest,
240238{
241239 FReport::Log (FString (__FUNCTION__));
242240
243- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
244- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/records/%s%s" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *Credentials .GetUserId (), *Key, (IsPublic ? TEXT (" /public" ) : TEXT (" " )));
241+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
242+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/records/%s%s" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *CredentialsRef .GetUserId (), *Key, (IsPublic ? TEXT (" /public" ) : TEXT (" " )));
245243 FString Verb = TEXT (" PUT" );
246244 FString ContentType = TEXT (" application/json" );
247245 FString Accept = TEXT (" application/json" );
@@ -265,8 +263,8 @@ void CloudSave::ReplaceUserRecord(int TryAttempt, FString const& Key, FAccelByte
265263{
266264 FReport::Log (FString (__FUNCTION__));
267265
268- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
269- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/concurrent/records/%s/public" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *Credentials .GetUserId (), *Key);
266+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
267+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/concurrent/records/%s/public" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *CredentialsRef .GetUserId (), *Key);
270268 FString Verb = TEXT (" PUT" );
271269 FString ContentType = TEXT (" application/json" );
272270 FString Accept = TEXT (" application/json" );
@@ -391,8 +389,8 @@ void CloudSave::DeleteUserRecord(FString const& Key, FVoidHandler const& OnSucce
391389{
392390 FReport::Log (FString (__FUNCTION__));
393391
394- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
395- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/records/%s" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *Credentials .GetUserId (), *Key);
392+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
393+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/users/%s/records/%s" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *CredentialsRef .GetUserId (), *Key);
396394 FString Verb = TEXT (" DELETE" );
397395 FString ContentType = TEXT (" application/json" );
398396 FString Accept = TEXT (" application/json" );
@@ -413,8 +411,8 @@ void CloudSave::SaveGameRecord(FString const& Key, FJsonObject RecordRequest, FV
413411{
414412 FReport::Log (FString (__FUNCTION__));
415413
416- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
417- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/records/%s" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *Key);
414+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
415+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/records/%s" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *Key);
418416 FString Verb = TEXT (" POST" );
419417 FString ContentType = TEXT (" application/json" );
420418 FString Accept = TEXT (" application/json" );
@@ -438,8 +436,8 @@ void CloudSave::GetGameRecord(FString const& Key, THandler<FAccelByteModelsGameR
438436{
439437 FReport::Log (FString (__FUNCTION__));
440438
441- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
442- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/records/%s" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *Key);
439+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
440+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/records/%s" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *Key);
443441 FString Verb = TEXT (" GET" );
444442 FString ContentType = TEXT (" application/json" );
445443 FString Accept = TEXT (" application/json" );
@@ -481,8 +479,8 @@ void CloudSave::ReplaceGameRecord(FString const& Key, FJsonObject RecordRequest,
481479{
482480 FReport::Log (FString (__FUNCTION__));
483481
484- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
485- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/records/%s" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *Key);
482+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
483+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/records/%s" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *Key);
486484 FString Verb = TEXT (" PUT" );
487485 FString ContentType = TEXT (" application/json" );
488486 FString Accept = TEXT (" application/json" );
@@ -506,8 +504,8 @@ void CloudSave::ReplaceGameRecord(int TryAttempt, FString const& Key, FAccelByte
506504{
507505 FReport::Log (FString (__FUNCTION__));
508506
509- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
510- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/concurrent/records/%s" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *Key);
507+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
508+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/concurrent/records/%s" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *Key);
511509 FString Verb = TEXT (" PUT" );
512510 FString ContentType = TEXT (" application/json" );
513511 FString Accept = TEXT (" application/json" );
@@ -631,8 +629,8 @@ void CloudSave::DeleteGameRecord(FString const& Key, FVoidHandler const& OnSucce
631629{
632630 FReport::Log (FString (__FUNCTION__));
633631
634- FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *Credentials .GetAccessToken ());
635- FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/records/%s" ), *Settings .CloudSaveServerUrl , *Credentials .GetNamespace (), *Key);
632+ FString Authorization = FString::Printf (TEXT (" Bearer %s" ), *CredentialsRef .GetAccessToken ());
633+ FString Url = FString::Printf (TEXT (" %s/v1/namespaces/%s/records/%s" ), *SettingsRef .CloudSaveServerUrl , *CredentialsRef .GetNamespace (), *Key);
636634 FString Verb = TEXT (" DELETE" );
637635 FString ContentType = TEXT (" application/json" );
638636 FString Accept = TEXT (" application/json" );
0 commit comments