Skip to content

Commit f4e293e

Browse files
Updated from pipeline, Version : 16.0.1
1 parent a9de75e commit f4e293e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1838
-540
lines changed

.variables

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export LEVEL=CRITICAL
22
export REPO_NAME=justice-unreal-sdk-plugin
3-
export WORKDIR=/tmp/pipelines/2900215199/616560929/
4-
export COMMIT_HASH=45f67adc2b91f38d463f1ae4713786ad932f4311
5-
export GIT_HASH=45f67adc2b91f38d463f1ae4713786ad932f4311
6-
export VERSION=15.1.3
7-
export REVISION_ID=15.1.3
3+
export WORKDIR=/tmp/pipelines/2900296126/616576178/
4+
export COMMIT_HASH=39bbcae742e64c02f3a4dcb246581edad561a75e
5+
export GIT_HASH=39bbcae742e64c02f3a4dcb246581edad561a75e
6+
export VERSION=16.0.1
7+
export REVISION_ID=16.0.1
88
9-
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDE1LjEuMyAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='
9+
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDE2LjAuMSAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='

CHANGELOG.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,50 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5-
### [15.1.3](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/15.1.3%0D15.1.2) (2022-08-18)
5+
### [16.0.1](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/16.0.1%0D16.0.0) (2022-08-18)
66

77

8+
### Bug Fixes
9+
10+
* **settings:** URL didn't change when switching environment ([f767246](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/f7672467afe2f1af8fb77dd14c45f069281a4e88))
11+
12+
## [16.0.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/16.0.0%0D15.1.2) (2022-08-15)
13+
14+
15+
### ⚠ BREAKING CHANGES
16+
17+
* group API models change affect function signature
18+
819
### Features
920

10-
* **qos:** get ping timeout from GConfig ([d00b6eb](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/d00b6ebf8bd360a69d7d9bd749b739dd6b06e649))
21+
* adjust code to following new method ([a4cdf85](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/a4cdf8545f9664631c1e95b54a79acd81a669871))
22+
* adjust the code and bring back the code that made some test error ([b71ca6f](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/b71ca6fd6aa0834170cbb3d8dc27582b1edf2cbe))
23+
* **blueprints:** add utilities class ([2104ba6](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/2104ba611be1a08be68c26b32896fe78280be4d6))
24+
* **blueprints:** add utilities to get and modify fjsonobjectwrapper ([24ff88e](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/24ff88e4590ec9605bd937b14ada944809e02d75))
25+
* changed a value on struct related statistic end point to floating number type ([0497802](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/04978025862f9eae474726eb082047e41bca9091))
26+
* expose statistic v2 endpoints ([0a70ae7](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/0a70ae7dd27a87904ee54f2d4f6dcf7d16a8f269))
27+
* expose store Id and list public store ([5e18dce](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/5e18dce082e0317f3d424a6934e52d35e9a0631f))
28+
* fixed typo and comments, wrong param and some struct ([c897cc1](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/c897cc1ddfc5897dc881d0516e61dd43604e1bb0))
29+
* **iam:** EA Origin Authentication Integration ([63e92f6](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/63e92f6a06da7e412b56c384aacd588763ccb501))
30+
* **item:** get Item Dynamic Data ([ae7ad68](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/ae7ad6855c221c1e0e801e01030d0d44f1d3c9dd))
31+
* New item type for get items like method, option box config. New API call method, get entitlement ownership by item ids. OPTIONBOX ItemType. ([42873cc](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/42873ccfb0f0633bb8b9c7b99ad07c280fbb015b))
32+
* **party:** add party connect, and disconnect notification ([a6200a2](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/a6200a200d999ee1ad113147269e16a81c7d3e2b))
33+
* Purchasing Requirements ([649841b](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/649841b955028592a4ffa71002fbc3b70fb94530))
34+
* **qos:** get ping timeout from GConfig ([fc8c79f](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/fc8c79f79a6c5769d612af9286e7c641751388b5))
35+
* **qos:** reduce udpecho timeout from 10s to 0.6s ([d549bfa](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/d549bfad3e3c5bbac8aacb30622668ba4234b5b4))
36+
* SDK Implementation for UGC service - "like' a content ([8b5c6c1](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/8b5c6c100933472e9cde20fe8ed284a74bf9552b))
37+
* **sessionbrowser:** add get game sessions by user ids ([6a21472](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/6a2147283a97e206dd97474d6896695e2f130f38))
38+
* support searching entitlement by feature ([d66fc9e](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/d66fc9ec6d333403a2e3d65ff86a53d94865f0dc))
1139

1240

1341
### Bug Fixes
1442

15-
* **settings:** URL didn't change when switching environment ([3801b40](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/3801b40345c19282dfe827dd3257f13d108f66a5))
43+
* Group blueprint function, JSON request creation, Group Member Roles model ([5aea352](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/5aea3523de59a4f4c3245bd7825af45e16c9b2a3))
44+
* **party:** change all all function, delegate or variable by using PartyMember. Also adding some description on the function. ([856337b](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/856337bc3e2fdf50d5afd7ec81ed7481ad1b7b33))
45+
* **party:** fix typo on partyMemberLeaveNotice and FPartyMemberDisconnectNotif ([01c3a2b](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/01c3a2b808a4bc4ddde5d461ab3db0eefbf6b1c1))
46+
* **party:** Set Deprecation Variable, Function, and Delegate for PartyLeaveNotif. ([72283eb](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/72283eb57dac1ac7c0904080689f6953bfbe436a))
47+
* SortBy in GetItemByCriteria and UrlEncoded in Query Param Array ([3a15458](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/3a1545846e21f7badd09434a024681cb38116021))
48+
* **statistic:** wrong query params in GetUserStatItems ([b5a1395](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/b5a139579e9e6a0abacda2f16b5f095539676758))
1649

1750
### [15.1.2](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/15.1.2%0D15.1.1) (2022-08-05)
1851

Source/AccelByteUe4Sdk/Private/Api/AccelByteEntitlementApi.cpp

Lines changed: 79 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -27,89 +27,42 @@ Entitlement::Entitlement(Credentials const& InCredentialsRef
2727

2828
Entitlement::~Entitlement(){}
2929

30-
void Entitlement::QueryUserEntitlements(FString const& EntitlementName, FString const& ItemId, int32 const& Offset, int32 const& Limit, THandler<FAccelByteModelsEntitlementPagingSlicedResult> const& OnSuccess, FErrorHandler const& OnError, EAccelByteEntitlementClass EntitlementClass = EAccelByteEntitlementClass::NONE, EAccelByteAppType AppType = EAccelByteAppType::NONE )
30+
void Entitlement::QueryUserEntitlements(FString const& EntitlementName, FString const& ItemId, int32 const& Offset, int32 const& Limit, THandler<FAccelByteModelsEntitlementPagingSlicedResult> const& OnSuccess, FErrorHandler const& OnError, EAccelByteEntitlementClass EntitlementClass = EAccelByteEntitlementClass::NONE, EAccelByteAppType AppType = EAccelByteAppType::NONE, TArray<FString> const& Features)
3131
{
3232
FReport::Log(FString(__FUNCTION__));
3333

34-
FString Url = FString::Printf(TEXT("%s/public/namespaces/%s/users/%s/entitlements"), *SettingsRef.PlatformServerUrl, *CredentialsRef.GetNamespace(), *CredentialsRef.GetUserId());
34+
TArray<FString> ItemIdsArray = { ItemId };
35+
QueryUserEntitlements(EntitlementName, ItemIdsArray, Offset, Limit, OnSuccess, OnError, EntitlementClass, AppType, Features);
3536

36-
TMap<FString, FString> QueryParams;
37-
if (!EntitlementName.IsEmpty())
38-
{
39-
QueryParams.Add("entitlementName", *EntitlementName);
40-
}
41-
if (!ItemId.IsEmpty())
42-
{
43-
QueryParams.Add("itemId", *ItemId);
44-
}
45-
if (Offset>=0)
46-
{
47-
QueryParams.Add("offset", FString::FromInt(Offset));
48-
}
49-
if (Limit>=0)
50-
{
51-
QueryParams.Add("limit", FString::FromInt(Limit));
52-
}
53-
if (EntitlementClass != EAccelByteEntitlementClass::NONE)
54-
{
55-
QueryParams.Add("entitlementClazz", *FindObject<UEnum>(ANY_PACKAGE, TEXT("EAccelByteEntitlementClass"), true)->GetNameStringByValue((int32)EntitlementClass));
56-
}
57-
if (AppType != EAccelByteAppType::NONE)
58-
{
59-
QueryParams.Add("appType", *FindObject<UEnum>(ANY_PACKAGE, TEXT("EAccelByteAppType"), true)->GetNameStringByValue((int32)AppType));
60-
}
61-
62-
HttpClient.ApiRequest("GET", Url, QueryParams, FString(), OnSuccess, OnError);
6337
}
6438

65-
void Entitlement::QueryUserEntitlements(
39+
void Entitlement::QueryUserEntitlements(
6640
FString const& EntitlementName,
6741
TArray<FString> const& ItemIds,
6842
int32 const& Offset,
6943
int32 const& Limit,
7044
THandler<FAccelByteModelsEntitlementPagingSlicedResult> const& OnSuccess,
71-
FErrorHandler const& OnError, EAccelByteEntitlementClass EntitlementClass, EAccelByteAppType AppType)
72-
{
45+
FErrorHandler const& OnError, EAccelByteEntitlementClass EntitlementClass, EAccelByteAppType AppType,
46+
TArray<FString> const& Features)
47+
{
48+
7349
FReport::Log(FString(__FUNCTION__));
7450

75-
FString Url = FString::Printf(TEXT("%s/public/namespaces/%s/users/%s/entitlements"), *SettingsRef.PlatformServerUrl, *CredentialsRef.GetNamespace(), *CredentialsRef.GetUserId());
76-
FString Query = TEXT("");
77-
if (!EntitlementName.IsEmpty())
78-
{
79-
Query.Append(Query.IsEmpty() ? TEXT("") : TEXT("&"));
80-
Query.Append(FString::Printf(TEXT("entitlementName=%s"), *EntitlementName));
81-
}
82-
for (FString const& ItemId : ItemIds)
83-
{
84-
if (!ItemId.IsEmpty())
85-
{
86-
Query.Append(Query.IsEmpty() ? TEXT("") : TEXT("&"));
87-
Query.Append(FString::Printf(TEXT("itemId=%s"), *ItemId));
88-
}
89-
}
90-
if (Offset>=0)
91-
{
92-
Query.Append(Query.IsEmpty() ? TEXT("") : TEXT("&"));
93-
Query.Append(FString::Printf(TEXT("offset=%d"), Offset));
94-
}
95-
if (Limit>=0)
96-
{
97-
Query.Append(Query.IsEmpty() ? TEXT("") : TEXT("&"));
98-
Query.Append(FString::Printf(TEXT("limit=%d"), Limit));
99-
}
100-
if (EntitlementClass != EAccelByteEntitlementClass::NONE)
101-
{
102-
Query.Append(Query.IsEmpty() ? TEXT("") : TEXT("&"));
103-
Query.Append(FString::Printf(TEXT("entitlementClazz=%s"), *FindObject<UEnum>(ANY_PACKAGE, TEXT("EAccelByteEntitlementClass"), true)->GetNameStringByValue((int32)EntitlementClass)));
104-
}
105-
if (AppType != EAccelByteAppType::NONE)
106-
{
107-
Query.Append(Query.IsEmpty() ? TEXT("") : TEXT("&"));
108-
Query.Append(FString::Printf(TEXT("appType=%s"), *FindObject<UEnum>(ANY_PACKAGE, TEXT("EAccelByteAppType"), true)->GetNameStringByValue((int32)AppType)));
109-
}
51+
FString Url = FString::Printf(TEXT("%s/public/namespaces/%s/users/%s/entitlements"), *SettingsRef.PlatformServerUrl, *CredentialsRef.GetNamespace(), *CredentialsRef.GetUserId());
52+
53+
FString QueryParams = FAccelByteUtilities::CreateQueryParams({
54+
{ TEXT("entitlementName"), EntitlementName },
55+
{ "itemId", FString::Join(ItemIds, TEXT("&itemId=")) },
56+
{ "features", FString::Join(Features, TEXT("&features=")) },
57+
{ TEXT("offset"), Offset >= 0 ? FString::FromInt(Offset) : TEXT("") },
58+
{ TEXT("limit"), Limit >= 0 ? FString::FromInt(Limit) : TEXT("") },
59+
{ TEXT("entitlementClazz"), EntitlementClass != EAccelByteEntitlementClass::NONE ?
60+
*FindObject<UEnum>(ANY_PACKAGE, TEXT("EAccelByteEntitlementClass"), true)->GetNameStringByValue((int32)EntitlementClass) : TEXT("")},
61+
{ TEXT("appType"), AppType != EAccelByteAppType::NONE ?
62+
*FindObject<UEnum>(ANY_PACKAGE, TEXT("EAccelByteAppType"), true)->GetNameStringByValue((int32)AppType) : TEXT("")},
63+
});
64+
Url.Append(QueryParams);
11065

111-
Url.Append(Query.IsEmpty() ? TEXT("") : FString::Printf(TEXT("?%s"),*Query));
112-
11366
HttpClient.ApiRequest("GET", Url, {}, FString(), OnSuccess, OnError);
11467
}
11568

@@ -283,12 +236,14 @@ void Entitlement::GetUserEntitlementOwnershipTokenOnly(const TArray<FString>& It
283236
}
284237
}
285238

286-
void Entitlement::ConsumeUserEntitlement(FString const& EntitlementId, int32 const& UseCount, THandler<FAccelByteModelsEntitlementInfo> const& OnSuccess, FErrorHandler const& OnError)
239+
void Entitlement::ConsumeUserEntitlement(FString const& EntitlementId, int32 const& UseCount, THandler<FAccelByteModelsEntitlementInfo> const& OnSuccess, FErrorHandler const& OnError,
240+
TArray<FString> Options)
287241
{
288242
FReport::Log(FString(__FUNCTION__));
289243

290244
FAccelByteModelsConsumeUserEntitlementRequest ConsumeUserEntitlementRequest;
291245
ConsumeUserEntitlementRequest.UseCount = UseCount;
246+
ConsumeUserEntitlementRequest.Options = Options;
292247

293248
FString Url = FString::Printf(TEXT("%s/public/namespaces/%s/users/%s/entitlements/%s/decrement"), *SettingsRef.PlatformServerUrl, *CredentialsRef.GetNamespace(), *CredentialsRef.GetUserId(), *EntitlementId);
294249

@@ -513,5 +468,59 @@ void Entitlement::SyncEpicGameDurableItems(FString const& EpicGamesJwtToken, FVo
513468
HttpClient.ApiRequest("PUT", Url, {}, Content, OnSuccess, OnError);
514469
}
515470

471+
void Entitlement::ValidateUserItemPurchaseCondition(TArray<FString> const& Items, THandler<TArray<FAccelByteModelsPlatformValidateUserItemPurchaseResponse>> const& OnSuccess, FErrorHandler const& OnError)
472+
{
473+
FReport::Log(FString(__FUNCTION__));
474+
475+
// Url
476+
FString Url = FString::Printf(TEXT("%s/public/namespaces/%s/items/purchase/conditions/validate"), *SettingsRef.PlatformServerUrl, *CredentialsRef.GetNamespace());
477+
478+
// Content Body
479+
FString Content = TEXT("");
480+
FJsonObject DataJson;
481+
TArray<TSharedPtr<FJsonValue>> ItemArray{};
482+
for (FString Item : Items)
483+
{
484+
ItemArray.Add(MakeShareable(new FJsonValueString(Item)));
485+
}
486+
DataJson.SetArrayField("itemIds", ItemArray);
487+
TSharedPtr<FJsonObject> JsonObject = MakeShared<FJsonObject>(DataJson);
488+
TSharedRef<TJsonWriter<>> Writer = TJsonWriterFactory<>::Create(&Content);
489+
FJsonSerializer::Serialize(JsonObject.ToSharedRef(), Writer);
490+
491+
// Api Request
492+
HttpClient.ApiRequest("POST", Url, {}, Content, OnSuccess, OnError);
493+
}
494+
495+
void Entitlement::GetUserEntitlementOwnershipByItemIds(TArray<FString> const& Ids, THandler<TArray<FAccelByteModelsEntitlementOwnershipItemIds>> const& OnSuccess, FErrorHandler const& OnError)
496+
{
497+
FReport::Log(FString(__FUNCTION__));
498+
499+
// Url
500+
FString Url = FString::Printf(TEXT("%s/public/namespaces/%s/users/%s/entitlements/ownership/byItemIds"), *SettingsRef.PlatformServerUrl, *CredentialsRef.GetNamespace(), *CredentialsRef.GetUserId());
501+
502+
// Params
503+
FString IdsQueryParamString = TEXT("");
504+
505+
for (FString const& Id : Ids)
506+
{
507+
if (!Id.IsEmpty())
508+
{
509+
IdsQueryParamString.Append(IdsQueryParamString.IsEmpty() ? TEXT("?") : TEXT("&"));
510+
IdsQueryParamString.Append(FString::Printf(TEXT("ids=%s"), *Id));
511+
}
512+
}
513+
514+
// Here we use append string to Url; we couldn't use TMap for ids, since the key should be unique
515+
516+
Url.Append(IdsQueryParamString);
517+
518+
// Content
519+
FString Content = TEXT("");
520+
521+
// Api Request
522+
HttpClient.ApiRequest("GET", Url, {}, Content, OnSuccess, OnError);
523+
}
524+
516525
} // Namespace Api
517526
}

Source/AccelByteUe4Sdk/Private/Api/AccelByteGroupApi.cpp

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,6 @@ Group::~Group()
2525
{}
2626

2727
#pragma region Utils
28-
FString Group::ConvertGroupSortByToString(const EAccelByteGroupListSortBy& SortBy)
29-
{
30-
switch (SortBy)
31-
{
32-
case EAccelByteGroupListSortBy::LISTORDER:
33-
return TEXT("listOrder");
34-
case EAccelByteGroupListSortBy::LISTORDER_ASC:
35-
return TEXT("listOrder%3Aasc");
36-
case EAccelByteGroupListSortBy::LISTORDER_DESC:
37-
return TEXT("listOrder%3Adesc");
38-
case EAccelByteGroupListSortBy::CREATED_AT:
39-
return TEXT("createdAt");
40-
case EAccelByteGroupListSortBy::CREATED_AT_ASC:
41-
return TEXT("createdAt%3Aasc");
42-
case EAccelByteGroupListSortBy::CREATED_AT_DESC:
43-
return TEXT("createdAt%3Adesc");
44-
case EAccelByteGroupListSortBy::UPDATED_AT:
45-
return TEXT("updatedAt");
46-
case EAccelByteGroupListSortBy::UPDATED_AT_ASC:
47-
return TEXT("updatedAt%3Aasc");
48-
case EAccelByteGroupListSortBy::UPDATED_AT_DESC:
49-
return TEXT("updatedAt%3Adesc");
50-
51-
default:
52-
return TEXT("");
53-
}
54-
}
5528
FString Group::ConvertGroupAllowedActionToString(const EAccelByteAllowedAction& AllowedAction)
5629
{
5730
switch (AllowedAction)
@@ -341,7 +314,7 @@ void Group::AssignMemberRole(
341314
void Group::DeleteMemberRole(
342315
const FString& MemberRoleId,
343316
const FAccelByteModelsUserIdWrapper& RequestContent,
344-
const THandler<FAccelByteModelsGetUserGroupInfoResponse>& OnSuccess,
317+
const FVoidHandler& OnSuccess,
345318
const FErrorHandler& OnError)
346319
{
347320
FReport::Log(FString(__FUNCTION__));
@@ -452,7 +425,7 @@ void Group::CancelJoinGroupRequest(
452425
void Group::GetGroupMembersListByGroupId(
453426
const FString& GroupId,
454427
const FAccelByteModelsGetGroupMembersListByGroupIdRequest& RequestContent,
455-
const THandler<FAccelByteModelsMemberRequestGroupResponse>& OnSuccess,
428+
const THandler<FAccelByteModelsGetGroupMemberListResponse>& OnSuccess,
456429
const FErrorHandler& OnError)
457430
{
458431
FReport::Log(FString(__FUNCTION__));
@@ -461,11 +434,12 @@ void Group::GetGroupMembersListByGroupId(
461434
*SettingsRef.GroupServerUrl,
462435
*GroupId);
463436

437+
FString Order = (RequestContent.SortBy == EAccelByteGroupListSortBy::DESCENDING) ? TEXT("desc") : TEXT("asc");
464438
const TMap<FString, FString> QueryParams
465439
{
466440
{ "limit", FString::FromInt(RequestContent.Limit) },
467441
{ "offset", FString::FromInt(RequestContent.Offset) },
468-
{ "order", RequestContent.Order },
442+
{ "order", Order}
469443
};
470444

471445
HttpClient.ApiRequest("GET", Url, QueryParams, FString(), OnSuccess, OnError);

0 commit comments

Comments
 (0)