示例#1
0
        private async Task GetUserDetails(Callback callback)
        {
            bool userIsExist = await _userRepository.IsExist(callback.Sender.Id);

            if (!userIsExist)
            {
                UserDetails viberUser = await _viberBotClient.GetUserDetailsAsync(callback.Sender.Id);

                User newUser = _mapper.Map <User>(viberUser);
                await _userRepository.CreateAsync(newUser);
            }
        }
示例#2
0
        //[TestMethod]
        public async Task GetUserDetailsAsyncTest()
        {
            var result = await _viberBotClient.GetUserDetailsAsync(_adminId);

            return;
        }