private void GetByPlatformAccountId(HydraRequest request) { IHydraItem item = HydraItemDeserializer.Deserialize(request.PostData); HydraHashMap map = item as HydraHashMap; HydraUtf8String platformAccountIdString = map.Items["value"] as HydraUtf8String; ulong platformAccountId = ulong.Parse(platformAccountIdString.Value); HydraHashMap result = new HydraHashMap(new Dictionary <string, IHydraItem>() { { "getUsersByProperty", new HydraHashMap(new Dictionary <string, IHydraItem>() { { "result", new HydraHashMap(new Dictionary <string, IHydraItem>() { { "items", new HydraHashMap(new Dictionary <string, IHydraItem>() { { "item", new HydraUtf8String("1") } }) } }) } }) } }); HydraResponse response = new HydraResponse(Connection, result); response.Send(); }
private void GetByName(HydraRequest request) { IHydraItem item = HydraItemDeserializer.Deserialize(request.PostData); HydraHashMap map = item as HydraHashMap; HydraUtf8String username = map.Items["username"] as HydraUtf8String; int userId = 1; HydraInt32 result = new HydraInt32(userId); HydraResponse response = new HydraResponse(Connection, result); response.Send(); }