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); }
public string FunctionHandler(MobKillsLog input, ILambdaContext context) { //var randomMob = new RandomizeMobs().GetRandomMobs(); return(input != null ? new KilledMob().AddKilledMob(input).HttpStatusCode.ToString() : "input is null"); }
public PutItemResponse AddKilledMob(MobKillsLog mobKill) { return(new MobRepository().AddKills(mobKill)); }