@@ -5352,6 +5352,11 @@ public static void GetRemovedUGCForPlayer(GetRemovedUGCForPlayerInput input, Act
5352
5352
5353
5353
#region Feedback
5354
5354
5355
+ /// <summary>
5356
+ /// Returns a list of categories to be used for giving feedback.
5357
+ /// </summary>
5358
+ /// <param name="type">Type of feedback (player, game, ugc)</param>
5359
+ /// <param name="onComplete">onComplete Action for handling the response of type ListLootLockerFeedbackCategoryResponse</param>
5355
5360
public static void ListFeedbackCategories ( LootLockerFeedbackTypes type , Action < ListLootLockerFeedbackCategoryResponse > onComplete )
5356
5361
{
5357
5362
if ( ! CheckInitialized ( ) )
@@ -5364,11 +5369,45 @@ public static void ListFeedbackCategories(LootLockerFeedbackTypes type, Action<L
5364
5369
5365
5370
var formattedEndPoint = string . Format ( endPoint . endPoint , type . ToString ( ) ) ;
5366
5371
5367
-
5368
5372
LootLockerServerRequest . CallAPI ( formattedEndPoint , endPoint . httpMethod , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
5373
+ }
5374
+
5369
5375
5376
+ /// <summary>
5377
+ /// Returns a list of categories to be used for giving feedback about a certain player.
5378
+ /// </summary>
5379
+ /// <param name="onComplete">onComplete Action for handling the response of type ListLootLockerFeedbackCategoryResponse</param>
5380
+ public static void ListPlayerFeedbackCategories ( Action < ListLootLockerFeedbackCategoryResponse > onComplete )
5381
+ {
5382
+ ListFeedbackCategories ( LootLockerFeedbackTypes . player , onComplete ) ;
5383
+ }
5384
+
5385
+ /// <summary>
5386
+ /// Returns a list of categories to be used for giving feedback about the game.
5387
+ /// </summary>
5388
+ /// <param name="onComplete">onComplete Action for handling the response of type ListLootLockerFeedbackCategoryResponse</param>
5389
+ public static void ListGameFeedbackCategories ( Action < ListLootLockerFeedbackCategoryResponse > onComplete )
5390
+ {
5391
+ ListFeedbackCategories ( LootLockerFeedbackTypes . game , onComplete ) ;
5392
+ }
5393
+
5394
+ /// <summary>
5395
+ /// Returns a list of categories to be used for giving feedback about a certain ugc asset.
5396
+ /// </summary>
5397
+ /// <param name="onComplete">onComplete Action for handling the response of type ListLootLockerFeedbackCategoryResponse</param>
5398
+ public static void ListUgcFeedbackCategories ( Action < ListLootLockerFeedbackCategoryResponse > onComplete )
5399
+ {
5400
+ ListFeedbackCategories ( LootLockerFeedbackTypes . ugc , onComplete ) ;
5370
5401
}
5371
5402
5403
+ /// <summary>
5404
+ /// Sends a feedback with the given data, will return 204 upon successful request.
5405
+ /// </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>
5408
+ /// <param name="description">Reason behind the report</param>
5409
+ /// <param name="category_id">A unique identifier of what catagory the report should belong under</param>
5410
+ /// <param name="onComplete">onComplete Action for handling the response of type LootLockerResponse</param>
5372
5411
public static void SendFeedback ( LootLockerFeedbackTypes type , string ulid , string description , string category_id , Action < LootLockerResponse > onComplete )
5373
5412
{
5374
5413
if ( ! CheckInitialized ( ) )
@@ -5391,30 +5430,25 @@ public static void SendFeedback(LootLockerFeedbackTypes type, string ulid, strin
5391
5430
LootLockerServerRequest . CallAPI ( endPoint . endPoint , endPoint . httpMethod , json , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
5392
5431
}
5393
5432
5394
-
5433
+ /// <summary>
5434
+ /// Sends a feedback with the given data, will return 204 upon successful request.
5435
+ /// </summary>
5436
+ /// <param name="ulid">Ulid of who you're giving feedback about</param>
5437
+ /// <param name="description">Reason behind the report</param>
5438
+ /// <param name="category_id">A unique identifier of what catagory the report should belong under</param>
5439
+ /// <param name="onComplete">onComplete Action for handling the response of type LootLockerResponse</param>
5395
5440
public static void SendPlayerFeedback ( string ulid , string description , string category_id , Action < LootLockerResponse > onComplete )
5396
5441
{
5397
- if ( ! CheckInitialized ( ) )
5398
- {
5399
- onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerResponse > ( ) ) ;
5400
- return ;
5401
- }
5402
- EndPointClass endPoint = LootLockerEndPoints . createFeedbackEntry ;
5403
-
5404
- var request = new LootLockerFeedbackRequest
5405
- {
5406
- entity = LootLockerFeedbackTypes . player . ToString ( ) ,
5407
- entity_id = ulid ,
5408
- description = description ,
5409
- category_id = category_id
5410
- } ;
5411
-
5412
- string json = LootLockerJson . SerializeObject ( request ) ;
5413
-
5414
- LootLockerServerRequest . CallAPI ( endPoint . endPoint , endPoint . httpMethod , json , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
5442
+ SendFeedback ( LootLockerFeedbackTypes . player , ulid , description , category_id , onComplete ) ;
5415
5443
}
5416
5444
5417
- public static void SendGameFeedback ( string ulid , string description , string category_id , Action < LootLockerResponse > onComplete )
5445
+ /// <summary>
5446
+ /// Sends a feedback with the given data, will return 204 upon successful request.
5447
+ /// </summary>
5448
+ /// <param name="description">Reason behind the report</param>
5449
+ /// <param name="category_id">A unique identifier of what catagory the report should belong under</param>
5450
+ /// <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 )
5418
5452
{
5419
5453
if ( ! CheckInitialized ( ) )
5420
5454
{
@@ -5426,7 +5460,6 @@ public static void SendGameFeedback(string ulid, string description, string cate
5426
5460
var request = new LootLockerFeedbackRequest
5427
5461
{
5428
5462
entity = LootLockerFeedbackTypes . game . ToString ( ) ,
5429
- entity_id = ulid ,
5430
5463
description = description ,
5431
5464
category_id = category_id
5432
5465
} ;
@@ -5435,26 +5468,18 @@ public static void SendGameFeedback(string ulid, string description, string cate
5435
5468
5436
5469
LootLockerServerRequest . CallAPI ( endPoint . endPoint , endPoint . httpMethod , json , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
5437
5470
}
5471
+ }
5472
+
5473
+ /// <summary>
5474
+ /// Sends a feedback with the given data, will return 204 upon successful request.
5475
+ /// </summary>
5476
+ /// <param name="ulid">Ulid of which asset you're giving feedback about</param>
5477
+ /// <param name="description">Reason behind the report</param>
5478
+ /// <param name="category_id">A unique identifier of what catagory the report should belong under</param>
5479
+ /// <param name="onComplete">onComplete Action for handling the response of type LootLockerResponse</param>
5438
5480
public static void SendUGCFeedback ( string ulid , string description , string category_id , Action < LootLockerResponse > onComplete )
5439
5481
{
5440
- if ( ! CheckInitialized ( ) )
5441
- {
5442
- onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerResponse > ( ) ) ;
5443
- return ;
5444
- }
5445
- EndPointClass endPoint = LootLockerEndPoints . createFeedbackEntry ;
5446
-
5447
- var request = new LootLockerFeedbackRequest
5448
- {
5449
- entity = LootLockerFeedbackTypes . ugc . ToString ( ) ,
5450
- entity_id = ulid ,
5451
- description = description ,
5452
- category_id = category_id
5453
- } ;
5454
-
5455
- string json = LootLockerJson . SerializeObject ( request ) ;
5456
-
5457
- LootLockerServerRequest . CallAPI ( endPoint . endPoint , endPoint . httpMethod , json , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
5482
+ SendFeedback ( LootLockerFeedbackTypes . ugc , ulid , description , category_id , onComplete ) ;
5458
5483
}
5459
5484
5460
5485
#endregion
0 commit comments