public GoogleApiClient( IRestSharpClientFactory restSharpClientFactory, IGoogleConfiguration googleConfiguration, IMapper mapper) { _clientFactory = restSharpClientFactory; _googleConfiguration = googleConfiguration; _mapper = mapper; }
public GoogleOcr(IGoogleConfiguration googleConfiguration) { _googleConfiguration = googleConfiguration; _ocrClientLazy = new Lazy <ImageAnnotatorClient>(() => new ImageAnnotatorClientBuilder { CredentialsPath = googleConfiguration.KeyPath, JsonCredentials = googleConfiguration.Key }.Build()); }
public GoogleTranslate(IGoogleConfiguration googleConfiguration, ILogger <GoogleTranslate> logger) { _googleConfiguration = googleConfiguration; _log = logger; _translateClientLazy = new Lazy <TranslationServiceClient>(() => new TranslationServiceClientBuilder { CredentialsPath = googleConfiguration.KeyPath, JsonCredentials = googleConfiguration.Key }.Build()); }
public GoogleSearchEngine(ILogger <GoogleSearchEngine> logger, IGoogleConfiguration googleConfiguration) { _logger = logger; // builder will check validity of configuration properties _googleConfiguration = googleConfiguration; }