Beispiel #1
0
        public async Task <EventInfo> Create(CreatingEventInfo ev)
        {
            var args = new ArgsBuilder()
                       .Add(nameof(ev.Name), ev.Name)
                       .Add(nameof(ev.DataTime), ev.DataTime.ToString())
                       .Add(nameof(ev.Teams), _serializer.Serialize(ev.Teams))
                       .Build();

            var result = await _webApi.Query <EventInfo>(Defines.EventServices.CreateEvent, args);

            return(result.Responce);
        }
Beispiel #2
0
        public async Task <RegistratedUser> SignUp(RegisterInfoUser user)
        {
            var args = new ArgsBuilder()
                       .Add(nameof(user.Login), user.Login)
                       .Add(nameof(user.Password), user.Login)
                       .Add(nameof(user.Name), user.Login)
                       .Add(nameof(user.Age), user.Age.ToString())
                       .Add(nameof(user.Score), user.Age.ToString())
                       .Build();

            var result = await _webApi.Query <RegistratedUser>(Defines.UserServices.SignUpUserUrl, args);

            return(result.Responce);
        }
Beispiel #3
0
        public async Task <IEnumerable <Bet> > Get()
        {
            var result = await _webApi.Query <IEnumerable <Bet> >(Defines.BetService.GetBets);

            return(result.Responce);
        }