Пример #1
0
        public PutItemResponse AddKills(MobKillsLog killsLog)
        {
            var tableName = "MobKillsLog";

            var request = new PutItemRequest
            {
                TableName = tableName,
                Item      = new Dictionary <string, AttributeValue>
                {
                    { "id", new AttributeValue {
                          S = killsLog.Id
                      } },
                    { "mobid", new AttributeValue {
                          S = killsLog.MobId
                      } },
                    { "playerid", new AttributeValue {
                          S = killsLog.PlayerId
                      } },
                    { "timestamp", new AttributeValue {
                          S = killsLog.TimeStamp
                      } }
                }
            };

            return(_client.PutItemAsync(request).Result);
        }
Пример #2
0
 public string FunctionHandler(MobKillsLog input, ILambdaContext context)
 {
     //var randomMob =  new RandomizeMobs().GetRandomMobs();
     return(input != null ? new KilledMob().AddKilledMob(input).HttpStatusCode.ToString() : "input is null");
 }
Пример #3
0
 public PutItemResponse AddKilledMob(MobKillsLog mobKill)
 {
     return(new MobRepository().AddKills(mobKill));
 }