Skip to content

Commit

Permalink
Updated from pipeline, Version : 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AccelByte-Build committed Aug 30, 2021
1 parent d6ddd7f commit a2e157f
Show file tree
Hide file tree
Showing 60 changed files with 1,971 additions and 1,184 deletions.
9 changes: 9 additions & 0 deletions .variables
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export LEVEL=CRITICAL
export REPO_NAME=justice-unreal-sdk-plugin
export WORKDIR=/tmp/pipelines/1545275190/361676634/
export COMMIT_HASH=7df4d5bb03525ac3cb7c5af948d80bfe68cd8d89
export GIT_HASH=7df4d5bb03525ac3cb7c5af948d80bfe68cd8d89
export VERSION=5.0.0
export REVISION_ID=5.0.0
export [email protected]
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDUuMC4wIC0gY29tbWl0ZWQgYW5kIHRhZ2dlZCBieSBKZW5raW5zCg=='
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@

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.

## [5.0.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/5.0.0%0D4.0.1) (2021-08-30)


### ⚠ BREAKING CHANGES

* **Achievement:** Change the type of GoalValue of FAccelByteModelsPublicAchievement and FAccelByteModelsMultiLanguageAchievement and model from int32 into float.

### Features

* **Error:** parse oauth error response ([c795d02](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/c795d02849124226195caa971a965d6ae51af73e))
* **Error:** parse oauth error response ([3e2da7f](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/3e2da7f53f7a64a8a68751de2f1a93b641154516))
* **FApiClient:** add GetApi method template to support API extension ([6e6c247](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/6e6c247dd7329ad4f4ec98ed52d44b81613a2b72))
* **FHttpClient:** implement http client to make api request easier ([4eb0821](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/4eb08212cd861602504efc022ecabf36108fbd74))
* **User:** Add Logout api ([572758c](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/572758cabadae8f90a14f49af5d44b503779b593))


### Bug Fixes

* **Achievement:** Fix the Achievement Api's Public Achievement and Multi Language Achievement model difference with the Backend response. Fix the Test Helper's Achievement Request and Achievement Response model difference with the Backend response. ([c701114](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/c70111429e118870b94c7c7ac161423d669a0c4b))
* **Subscription:** Fix subscription integration test. ([b9bb250](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/b9bb250dd966209156881ea49fe5c49bf191e0a0))


### Refactors

* **FApiClient and FRegistry:** Each API receive FHttpRetryScheduler reference from constructur instead of directly referring the singleton ([7d39e38](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/7d39e38d6db25e09c1df17e35fb4023a9c911945))


### Tests

* **agreement:** make more resistant to dirty data ([ab9fa83](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/ab9fa83ecd54abe58f3350d818f25fb5f1484f7f))
* **FHttpClient:** add core test for FHttpClient ([116e456](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/116e456178aa1b184ce8d3d62981e09ca346c4cc))
* **lobby:** fix LobbyTestStartMatchmakingTempPartyOfTwo_ReturnOk ([cc50770](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/cc50770684608dd41c8b518dff87e7b735e8844b))

### [4.0.1](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/4.0.1%0D4.0.0) (2021-08-16)

## [4.0.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/4.0.0%0D3.2.0) (2021-08-02)
Expand Down
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

33 changes: 13 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,7 @@ This documentation assumes that you are already familiar with modern C++, Unreal

## Dependencies

AccelByte SDK v4.0.1 is compatible with these AccelByte Services version 3.3.1:

| Service | Version |
|-----------------------------------------------------|----------------|
| justice-iam-service | 4.3.0 |
| justice-legal-service | 1.12.1 |
| justice-basic-service | 1.21.1 |
| justice-platform-service | 3.32.0 |
| justice-social-service | 1.17.1 |
| justice-leaderboard-service | 2.8.0 |
| justice-achievement-service | 2.5.4 |
| justice-cloudsave-service | 1.6.4 |
| justice-ugc-service | 1.4.0 |
| justice-lobby-server | 1.34.0 |
| justice-group-service | 2.7.3 |
| Justice QoS Manager Service | 1.7.6 |
| justice-dedicated-server-manager-controller-service | 2.4.1 |
| amalgam_game_telemetry | 1.1.2-392420e1 |

AccelByte SDK is compatible with these AccelByte Services version 3.2.0

## Features

Expand All @@ -51,10 +33,21 @@ The classes are categorized as follow:
- The `Blueprint` classes are simple _glue code_ to provide interface to Unreal Engine Blueprint.
- The `Core` classes are for core functionalities (error handler, settings, credential store, and HTTP retry system).

## Packaging

- `/Plugins` The actual plugin is located in `/Plugins/AccelByteUe4Sdk`.
- `/Content` This contains example widget blueprints and other asset.
- `/Source` This contains C++ source code for the examples.
- `/Documentation` This contains Doxyfile and this documentation.

## Terminology

> There are only two hard things in Computer Science: cache invalidation and naming things. ―Phil Karlton
### `Namespace` vs `GameId` vs `PublisherId`

The backend call it `namespace`, but since namespace can be many things, in here it's called `GameId` and `PublisherId`. They are like AppId in Steam, ProductId in GOG, GameId in GameSparks, TitleId in PlayFab.

### `UserId` vs `LoginId` vs `Username`

The backend call it `LoginId`, but in here it's called username. It can be email address or phone number. `UserId` is the user unique ID.
Expand Down Expand Up @@ -91,7 +84,7 @@ Here's how to get it up and running quickly.

4. Create or open existing Unreal Engine project.

5. Copy the the top folder to your game's plugins folder as `AccelbyteUe4Sdk` folder.
5. Copy the plugin folder `Plugins/AccelByteUe4Sdk` to your game's plugins folder.

6. Add the plugin to your `/MyAwesomeGame.uproject` file,
```java
Expand Down
34 changes: 21 additions & 13 deletions Source/AccelByteUe4Sdk/Private/Api/AccelByteAchievementApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ namespace AccelByte
{
namespace Api
{
Achievement::Achievement(const AccelByte::Credentials& Credentials, const AccelByte::Settings& Setting) : Credentials(Credentials), Settings(Setting){}

Achievement::Achievement(
Credentials const& CredentialsRef,
Settings const& SettingsRef,
FHttpRetryScheduler& HttpRef)
:
HttpRef{HttpRef},
CredentialsRef{CredentialsRef},
SettingsRef{SettingsRef} {}

Achievement::~Achievement(){}

Expand Down Expand Up @@ -49,8 +57,8 @@ void Achievement::QueryAchievements(const FString& Language, const EAccelByteAch
{
FReport::Log(FString(__FUNCTION__));

FString Authorization = FString::Printf(TEXT("Bearer %s"), *Credentials.GetAccessToken());
FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/achievements"), *Settings.AchievementServerUrl, *Credentials.GetNamespace());
FString Authorization = FString::Printf(TEXT("Bearer %s"), *CredentialsRef.GetAccessToken());
FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/achievements"), *SettingsRef.AchievementServerUrl, *CredentialsRef.GetNamespace());
FString Verb = TEXT("GET");
FString ContentType = TEXT("application/json");
FString Accept = TEXT("application/json");
Expand Down Expand Up @@ -85,7 +93,7 @@ void Achievement::QueryAchievements(const FString& Language, const EAccelByteAch
Request->SetHeader(TEXT("Content-Type"), ContentType);
Request->SetHeader(TEXT("Accept"), Accept);

FRegistry::HttpRetryScheduler.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
HttpRef.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
}

void Achievement::GetAchievement(const FString& AchievementCode, const THandler<FAccelByteModelsMultiLanguageAchievement>& OnSuccess, const FErrorHandler& OnError)
Expand All @@ -98,8 +106,8 @@ void Achievement::GetAchievement(const FString& AchievementCode, const THandler<
return;
}

FString Authorization = FString::Printf(TEXT("Bearer %s"), *Credentials.GetAccessToken());
FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/achievements/%s"), *Settings.AchievementServerUrl, *Credentials.GetNamespace(), *AchievementCode);
FString Authorization = FString::Printf(TEXT("Bearer %s"), *CredentialsRef.GetAccessToken());
FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/achievements/%s"), *SettingsRef.AchievementServerUrl, *CredentialsRef.GetNamespace(), *AchievementCode);
FString Verb = TEXT("GET");
FString ContentType = TEXT("application/json");
FString Accept = TEXT("application/json");
Expand All @@ -111,16 +119,16 @@ void Achievement::GetAchievement(const FString& AchievementCode, const THandler<
Request->SetHeader(TEXT("Content-Type"), ContentType);
Request->SetHeader(TEXT("Accept"), Accept);

FRegistry::HttpRetryScheduler.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
HttpRef.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
}

void Achievement::QueryUserAchievements(const EAccelByteAchievementListSortBy& SortBy, const THandler<FAccelByteModelsPaginatedUserAchievement>& OnSuccess, const FErrorHandler& OnError,
const int32& Offset, const int32& Limit, bool PreferUnlocked)
{
FReport::Log(FString(__FUNCTION__));

FString Authorization = FString::Printf(TEXT("Bearer %s"), *Credentials.GetAccessToken());
FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/%s/achievements"), *Settings.AchievementServerUrl, *Credentials.GetNamespace(), *Credentials.GetUserId());
FString Authorization = FString::Printf(TEXT("Bearer %s"), *CredentialsRef.GetAccessToken());
FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/%s/achievements"), *SettingsRef.AchievementServerUrl, *CredentialsRef.GetNamespace(), *CredentialsRef.GetUserId());
FString Verb = TEXT("GET");
FString ContentType = TEXT("application/json");
FString Accept = TEXT("application/json");
Expand Down Expand Up @@ -154,7 +162,7 @@ void Achievement::QueryUserAchievements(const EAccelByteAchievementListSortBy& S
Request->SetHeader(TEXT("Content-Type"), ContentType);
Request->SetHeader(TEXT("Accept"), Accept);

FRegistry::HttpRetryScheduler.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
HttpRef.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
}

void Achievement::UnlockAchievement(const FString& AchievementCode, const FVoidHandler OnSuccess, const FErrorHandler& OnError)
Expand All @@ -167,8 +175,8 @@ void Achievement::UnlockAchievement(const FString& AchievementCode, const FVoidH
return;
}

FString Authorization = FString::Printf(TEXT("Bearer %s"), *Credentials.GetAccessToken());
FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/%s/achievements/%s/unlock"), *Settings.AchievementServerUrl, *Credentials.GetNamespace(), *Credentials.GetUserId(), *AchievementCode);
FString Authorization = FString::Printf(TEXT("Bearer %s"), *CredentialsRef.GetAccessToken());
FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/%s/achievements/%s/unlock"), *SettingsRef.AchievementServerUrl, *CredentialsRef.GetNamespace(), *CredentialsRef.GetUserId(), *AchievementCode);
FString Verb = TEXT("PUT");
FString ContentType = TEXT("application/json");
FString Accept = TEXT("application/json");
Expand All @@ -180,7 +188,7 @@ void Achievement::UnlockAchievement(const FString& AchievementCode, const FVoidH
Request->SetHeader(TEXT("Content-Type"), ContentType);
Request->SetHeader(TEXT("Accept"), Accept);

FRegistry::HttpRetryScheduler.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
HttpRef.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
}

} // Namespace Api
Expand Down
Loading

0 comments on commit a2e157f

Please sign in to comment.