public InlineUrlKeysController(InlineUrlKeysRepository inlineUrlKeysRepository, SystemUserRepository systemUserRepository, BotsRepository botsRepository, IConfiguration configuration) { _inlineUrlKeysRepository = inlineUrlKeysRepository; _systemUserRepository = systemUserRepository; _configuration = configuration; _botsRepository = botsRepository; }
public TextMessageAnswersController(TextMessageAnswersRepository textMessageAnswersRepository, SystemUserRepository systemUserRepository, BotsRepository botsRepository, IConfiguration configuration) { _textMessageAnswersRepository = textMessageAnswersRepository; _systemUserRepository = systemUserRepository; _configuration = configuration; _botsRepository = botsRepository; }
public InterviewsController(BotsRepository botsRepository, IConfiguration configuration, InterviewsRepository interviewsRepository, SystemUserRepository systemUserRepository) { _configuration = configuration; _interviewsRepository = interviewsRepository; _systemUserRepository = systemUserRepository; _botsRepository = botsRepository; }
public TradeController( WalletsRepository walletsRepository, TradeRepository tradeRepository, BotsRepository botsRepository, CandleStickRepository candleStickRepository, PairsRepository pairsRepository, IHubContext <btcusdtHub> hubcontext) { _walletsRepository = walletsRepository; _tradeRepository = tradeRepository; _botsRepository = botsRepository; _candleStickRepository = candleStickRepository; _pairsRepository = pairsRepository; _hubcontext = hubcontext; }
public BotsController(IConfiguration configuration, UsersRepository usersRepository, BotsRepository botsRepository, TextMessageAnswersRepository textMessageAnswersRepository, InterviewsRepository interviewsRepository, InterviewAnswersRepository interviewAnswersRepository, InlineUrlKeysRepository inlineUrlKeysRepository, InlineKeysRepository inlineKeysRepository, SystemUserRepository systemUserRepository) { _configuration = configuration; _usersRepository = usersRepository; _botsRepository = botsRepository; _textMessageAnswersRepository = textMessageAnswersRepository; _interviewsRepository = interviewsRepository; _interviewAnswersRepository = interviewAnswersRepository; _inlineUrlKeysRepository = inlineUrlKeysRepository; _inlineKeysRepository = inlineKeysRepository; _systemUserRepository = systemUserRepository; _httpClient = new HttpClient(); }
public async static Task <BotViewModel> GetBotViewModel(string id, IConfiguration _configuration, BotsRepository _botsRepository) { var httpClient = new HttpClient(); var bot = _botsRepository.GetBot(id); var botResult = await httpClient.GetStringAsync($"{_configuration["RunnerApiUrl"]}/check?id={id}"); var botParsedResult = JsonConvert.DeserializeObject <Response>(botResult); var botViewModel = new BotViewModel { Bot = bot, Status = Convert.ToBoolean(botParsedResult.status) }; return(botViewModel); }
public async static Task <IEnumerable <BotViewModel> > GetBotsViewModels(IConfiguration _configuration, SystemUserRepository _botsRepository, BotsRepository botsRepository, string userId) { var httpClient = new HttpClient(); var bots = _botsRepository.GetUserBots(userId) ?? new List <string>(); var botsViewModels = await Task.WhenAll(bots.Select(async _ => { var result = await httpClient.GetStringAsync($"{_configuration["RunnerApiUrl"]}/check?id={_}"); var parsedResult = JsonConvert.DeserializeObject <Response>(result); return(new BotViewModel { Bot = botsRepository.GetBot(_), Status = parsedResult.status }); })); return(botsViewModels); }
public FeatureTogglingController(BotsRepository botsRepository) { _botsRepository = botsRepository; }
public BotsController(BotsRepository botsRepository) { _botsRepository = botsRepository; }