public Metric (KnetikClient client, Game game, string name) : base(client) { ID = -1; Game = game; Name = name; }
public UserOption (KnetikClient client, Game game) : base(client, game) { }
private KnetikResult<Game> OnLoadWithGame(KnetikApiResponse res) { var result = new KnetikResult<Game> { Response = res }; if (!res.IsSuccess) { return result; } Response = res; if (res.Body["result"]["product_item"].AsObject == null) { result.Response.Status = KnetikApiResponse.StatusType.Error; result.Response.ErrorMessage = "Item not found"; return result; } Game game = new Game(Client); result.Value = game; this.Deserialize(res.Body["result"]); game.Deserialize(res.Body["result"]["product_item"]); return result; }
public Option (KnetikClient client, Game game) : base(client) { Game = game; ID = -1; }
public ValueMetric (KnetikClient client, Game game, string name) : base(client, game, name) { }
public static Item Parse(KnetikClient client, KnetikJSONNode json) { string typeHint = json["type_hint"]; Item item; switch (typeHint) { case "game": item = new Game(client); break; case "physical_item": item = new PhysicalItem(client); break; case "virtual_item": item = new VirtualItem(client); break; case "entitlement": item = new Entitlement(client); break; case "subscription": item = new Subscription(client); break; case "achievement_item": item = new Achievement(client); break; case "leaderboard": item = new Leaderboard(client); break; default: item = new Item(client); break; } item.Deserialize(json); return item; }
public ObjectMetric(KnetikClient client, Game game, string name) : base(client, game, name) { }