public CustomerStatusProvider(IConfig config, IRestClientWrapper jiraClient)
        {
            _config     = config;
            _jiraClient = jiraClient;

            _credentials = new Credentials(_config.Username, _config.Password);
        }
Beispiel #2
0
        public UserModule(IRestClientWrapper restClientWrapper, ISpotifyService spotifyService)
        {
            Get["/user", true] = async(parameters, ct) =>
            {
                string name          = this.Request.Query["Name"];
                string contry        = this.Request.Query["Contry"];
                string spotifyUserId = this.Request.Query["SpotifyUserId"];

                var user = new User {
                    Country = contry, Name = name, SpotifyUserId = spotifyUserId
                };

                var userResult = await restClientWrapper.PostAsync <UserResult>(user, "User");

                return(userResult);
            };
            Get["/spotifyUser", true] = async(parameters, ct) =>
            {
                string token = this.Request.Query["token"];

                var user = await spotifyService.GetUser(token);


                return(user);
            };
        }
Beispiel #3
0
 public PatchPipeline(IGameRepository gameRepository, IRestClientFactory restClientFactory,
                      IOptionsMonitor <Settings> options, ILogger <PatchPipeline> log)
 {
     _gameRepository = gameRepository;
     _log            = log;
     _client         = restClientFactory.CreateRestClient(options.CurrentValue.StaticDataEndpoint, string.Empty);
 }
Beispiel #4
0
 public MatchGenerator(IRestClientFactory restClientFactory, IGameRepository gameRepository,
                       IRiotModelMapper riotModelMapper, IOptionsMonitor <Settings> options)
 {
     _client          = restClientFactory.CreateRestClient(options.CurrentValue.RiotApiUrl, options.CurrentValue.RiotApiToken);
     _gameRepository  = gameRepository;
     _riotModelMapper = riotModelMapper;
 }
Beispiel #5
0
        public ApiHelper(IOptions <TmdbApiSettings> settings, IRestClientWrapper restClient)
        {
            if (string.IsNullOrEmpty(settings.Value.ApiKey))
            {
                throw new ApplicationException("Please provide api key for TheMovieDB API.");
            }

            _settings   = settings.Value;
            _restClient = restClient;
        }
Beispiel #6
0
        public Ents24Client(Source source, SourceRepository sourceRepository, IRestClientWrapper client)
        {
            _source           = source;
            _sourceRepository = sourceRepository;

            ValidateSource();

            _client         = client;
            _client.BaseUrl = new Uri(_source.BaseUrl);
            Authenticate();
        }
Beispiel #7
0
 public MembersService(IConfiguration configurationService, IRestClientWrapper _restClientWrapper)
 {
     _configurationService   = configurationService;
     this._restClientWrapper = _restClientWrapper;
 }
Beispiel #8
0
 public ChannelService(IRestClientWrapper restClientWrapper, IConfiguration configuration)
 {
     _restClientWrapper = restClientWrapper;
     _configuration     = configuration;
 }
Beispiel #9
0
 public Ents24Client(Source source, IRestClientWrapper client) : this(source, new SourceRepository(), client)
 {
 }
Beispiel #10
0
 public RecessService(IRestClientWrapper restClientWrapper, IConfiguration configuration)
 {
     _restClientWrapper = restClientWrapper;
     _configuration     = configuration;
 }
Beispiel #11
0
 public PartifyStorageService(IRestClientWrapper restClientWrapper)
 {
     _restClientWrapper = restClientWrapper;
 }
Beispiel #12
0
 public EventService(IRestClientWrapper restClientWrapper, IConfiguration configuration, IChannelService channelService)
 {
     _restClientWrapper = restClientWrapper;
     _configuration     = configuration;
     _channelService    = channelService;
 }
Beispiel #13
0
 public ContentDownloader(IOptions <UrlSettings> urlSettings, IRestClientWrapper restClientWrapper)
 {
     _urlSettings       = urlSettings.Value;
     _restClientWrapper = restClientWrapper;
 }
Beispiel #14
0
 public DownloadService(IRestClientWrapper restClientWrapper, IConfiguration configuration)
 {
     _restClientWrapper = restClientWrapper;
     _configuration     = configuration;
 }