source: binary-improvements2/WebServer/src/WebAPI/APIs/GetPlayerInventories.cs@ 430

Last change on this file since 430 was 402, checked in by alloc, 22 months ago
  • Major refactoring
  • Using Utf8Json for (de)serialization
  • Moving APIs to REST
  • Removing dependencies from WebServer and MapRenderer to ServerFixes
File size: 859 bytes
RevLine 
[402]1// using AllocsFixes.PersistentData;
2// using JetBrains.Annotations;
3//
4// namespace Webserver.WebAPI.APIs {
5// [UsedImplicitly]
6// public class GetPlayerInventories : AbsWebAPI {
7// public override void HandleRequest (RequestContext _context) {
8// GetPlayerInventory.GetInventoryArguments (_context.Request, out bool showIconColor, out bool showIconName);
9//
10// JsonArray allInventoriesResult = new JsonArray ();
11//
12// foreach ((PlatformUserIdentifierAbs userId, Player player) in PersistentContainer.Instance.Players.Dict) {
13// if (player == null) {
14// continue;
15// }
16//
17// if (player.IsOnline) {
18// allInventoriesResult.Add (GetPlayerInventory.DoPlayer (userId.CombinedString, player, showIconColor, showIconName));
19// }
20// }
21//
22// WebUtils.WriteJson (_context.Response, allInventoriesResult);
23// }
24// }
25// }
Note: See TracBrowser for help on using the repository browser.