Skip to content

Commit 410a07b

Browse files
AlmightyMikkelkirre-bylund
authored andcommitted
made SendFeedback private
1 parent b527756 commit 410a07b

File tree

1 file changed

+14
-38
lines changed

1 file changed

+14
-38
lines changed

Runtime/Game/LootLockerSDKManager.cs

Lines changed: 14 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5403,52 +5403,39 @@ public static void ListUgcFeedbackCategories(Action<ListLootLockerFeedbackCatego
54035403
/// <summary>
54045404
/// Sends a feedback with the given data, will return 204 upon successful request.
54055405
/// </summary>
5406-
/// <param name="type">Type of feedback (player, game, ugc)</param>
5407-
/// <param name="ulid">Ulid of what you're giving feedback about</param>
5406+
/// <param name="ulid">Ulid of who you're giving feedback about</param>
54085407
/// <param name="description">Reason behind the report</param>
54095408
/// <param name="category_id">A unique identifier of what catagory the report should belong under</param>
54105409
/// <param name="onComplete">onComplete Action for handling the response of type LootLockerResponse</param>
5411-
public static void SendFeedback(LootLockerFeedbackTypes type, string ulid, string description, string category_id, Action<LootLockerResponse> onComplete)
5410+
public static void SendPlayerFeedback(string ulid, string description, string category_id, Action<LootLockerResponse> onComplete)
54125411
{
5413-
if (!CheckInitialized())
5414-
{
5415-
onComplete?.Invoke(LootLockerResponseFactory.SDKNotInitializedError<LootLockerResponse>());
5416-
return;
5417-
}
5418-
EndPointClass endPoint = LootLockerEndPoints.createFeedbackEntry;
5419-
5420-
var request = new LootLockerFeedbackRequest
5421-
{
5422-
entity = type.ToString(),
5423-
entity_id = ulid,
5424-
description = description,
5425-
category_id = category_id
5426-
};
5427-
5428-
string json = LootLockerJson.SerializeObject(request);
5429-
5430-
LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, json, onComplete: (serverResponse) => { LootLockerResponse.Deserialize(onComplete, serverResponse); });
5412+
SendFeedback(LootLockerFeedbackTypes.player, ulid, description, category_id, onComplete);
54315413
}
54325414

54335415
/// <summary>
54345416
/// Sends a feedback with the given data, will return 204 upon successful request.
54355417
/// </summary>
5436-
/// <param name="ulid">Ulid of who you're giving feedback about</param>
54375418
/// <param name="description">Reason behind the report</param>
54385419
/// <param name="category_id">A unique identifier of what catagory the report should belong under</param>
54395420
/// <param name="onComplete">onComplete Action for handling the response of type LootLockerResponse</param>
5440-
public static void SendPlayerFeedback(string ulid, string description, string category_id, Action<LootLockerResponse> onComplete)
5421+
public static void SendGameFeedback(string description, string category_id, Action<LootLockerResponse> onComplete)
54415422
{
5442-
SendFeedback(LootLockerFeedbackTypes.player, ulid, description, category_id, onComplete);
5423+
SendFeedback(LootLockerFeedbackTypes.game, "", description, category_id, onComplete);
54435424
}
54445425

54455426
/// <summary>
54465427
/// Sends a feedback with the given data, will return 204 upon successful request.
54475428
/// </summary>
5429+
/// <param name="ulid">Ulid of which asset you're giving feedback about</param>
54485430
/// <param name="description">Reason behind the report</param>
54495431
/// <param name="category_id">A unique identifier of what catagory the report should belong under</param>
54505432
/// <param name="onComplete">onComplete Action for handling the response of type LootLockerResponse</param>
5451-
public static void SendGameFeedback(string description, string category_id, Action<LootLockerResponse> onComplete)
5433+
public static void SendUGCFeedback(string ulid, string description, string category_id, Action<LootLockerResponse> onComplete)
5434+
{
5435+
SendFeedback(LootLockerFeedbackTypes.ugc, ulid, description, category_id, onComplete);
5436+
}
5437+
5438+
private static void SendFeedback(LootLockerFeedbackTypes type, string ulid, string description, string category_id, Action<LootLockerResponse> onComplete)
54525439
{
54535440
if (!CheckInitialized())
54545441
{
@@ -5459,7 +5446,8 @@ public static void SendGameFeedback(string description, string category_id, Acti
54595446

54605447
var request = new LootLockerFeedbackRequest
54615448
{
5462-
entity = LootLockerFeedbackTypes.game.ToString(),
5449+
entity = type.ToString(),
5450+
entity_id = ulid,
54635451
description = description,
54645452
category_id = category_id
54655453
};
@@ -5469,18 +5457,6 @@ public static void SendGameFeedback(string description, string category_id, Acti
54695457
LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, json, onComplete: (serverResponse) => { LootLockerResponse.Deserialize(onComplete, serverResponse); });
54705458
}
54715459

5472-
/// <summary>
5473-
/// Sends a feedback with the given data, will return 204 upon successful request.
5474-
/// </summary>
5475-
/// <param name="ulid">Ulid of which asset you're giving feedback about</param>
5476-
/// <param name="description">Reason behind the report</param>
5477-
/// <param name="category_id">A unique identifier of what catagory the report should belong under</param>
5478-
/// <param name="onComplete">onComplete Action for handling the response of type LootLockerResponse</param>
5479-
public static void SendUGCFeedback(string ulid, string description, string category_id, Action<LootLockerResponse> onComplete)
5480-
{
5481-
SendFeedback(LootLockerFeedbackTypes.ugc, ulid, description, category_id, onComplete);
5482-
}
5483-
54845460
#endregion
54855461

54865462
#region Currency

0 commit comments

Comments
 (0)