Example #1
0
        // TODO: Should we not call if it is already completed, or allow calling it anyway?
        public void Execute(ChampionID champ, bool completed = true)
        {
            dynamic json = new JObject();

            json.championId = champ;
            json.completed  = completed;
            QsoApi.Call("/lol-champ-select/v1/session/actions/{0}", new HttpMethod("PATCH"), json.ToString(), ID);
        }
Example #2
0
        public void AddBot(ChampionID champion, TeamID team, string difficulty)
        {
            dynamic json = new JObject();

            json.championId    = champion;
            json.teamId        = Convert.ToString((int)team); // bullshit. the API expects a string, but can't use ToString cause enums are stupid, so I'm forced to cast it to an int to make it a string.
            json.botDifficulty = difficulty;
            QsoApi.Call("/lol-lobby/v1/lobby/custom/bots", HttpMethod.Post, json.ToString());
        }
Example #3
0
 public void RemoveBot(ChampionID champ, TeamID team)
 {
     QsoApi.Call("/lol-lobby/v1/lobby/custom/bots/{0}", HttpMethod.Delete, null, $"bot_{Enum.GetName( typeof( ChampionID ), champ )}_{team}");
 }
Example #4
0
 public ChatUserLoLBuilder WithChampion(ChampionID champ)
 {
     _user.LoL.ChampionID = ((int)champ).ToString();
     return(this);
 }