Example #1
0
 public VkGroupMessageService(IConfigurationHelperService configurationHelper,
                              IVkGroupPhotoService vkGroupPhotoService)
 {
     _vkGroupPhotoService = vkGroupPhotoService;
     _api = new VkApi();
     _api.Authorize(new ApiAuthParams
     {
         AccessToken = configurationHelper.GetAccessToken()
     });
 }
 public VkUpdateController(
     IVkGroupMessageService vkGroupMessageService,
     IConfigurationHelperService configurationHelper,
     IStickerService stickerService,
     IEmojiService emojiService,
     IKeyboardService keyboardService,
     IBotUserService botUserService,
     IReceivedMessageService receivedMessageService)
 {
     _vkGroupMessageService  = vkGroupMessageService;
     _configurationHelper    = configurationHelper;
     _stickerService         = stickerService;
     _emojiService           = emojiService;
     _keyboardService        = keyboardService;
     _botUserService         = botUserService;
     _receivedMessageService = receivedMessageService;
 }
Example #3
0
        public VkApi GetVkApi(IConfigurationHelperService configurationHelper)
        {
            if (_api != null)
            {
                return(_api);
            }

            _api = new VkApi();
            _api.Authorize(new ApiAuthParams
            {
                ApplicationId = configurationHelper.GetApplicationId(),
                Login         = configurationHelper.GetVkLogin(),
                Password      = configurationHelper.GetVkPassword(),
                Settings      = Settings.Photos
            });

            return(_api);
        }
 public VkCompetitionService(IVkConnection connection, IConfigurationHelperService configurationHelper)
 {
     _configurationHelper = configurationHelper;
     _api = connection.GetVkApi(configurationHelper);
 }
 public MessageService(IConfigurationHelperService <DialogBotMessages> configurationHelperService)
 {
     _configurationHelperService = configurationHelperService;
 }
Example #6
0
 public VkHelper(IConfigurationHelperService configurationHelperService)
 {
     _configurationHelperService = configurationHelperService;
 }
 public VkGroupPhotoService(IConfigurationHelperService configurationHelper, IVkConnection vkConnection)
 {
     _configurationHelper = configurationHelper;
     _api = vkConnection.GetVkApi(configurationHelper);
 }
 public FileHelperService(IConfigurationHelperService configurationHelper)
 {
     _configurationHelper = configurationHelper;
 }