protected JustGivingClientBase(ClientConfiguration clientConfiguration, 
										IHttpClient httpClient, 
										IAccountApi accountApi, 
										IDonationApi donationApi, 
										IPageApi pageApi, 
										ISearchApi searchApi, 
										ICharityApi charityApi, 
										IEventApi eventApi,
										ITeamApi teamApi)
        {
            if(httpClient == null)
            {
                throw new ArgumentNullException("httpClient", "httpClient must not be null to access the api.");
            }

            HttpClient = httpClient;
            HttpClient.ConnectionTimeOut = TimeSpan.FromMinutes(3);

            Account = accountApi;
            Donation = donationApi;
            Page = pageApi;
            Search = searchApi;
            Charity = charityApi;
            Event = eventApi;
            Team = teamApi;

            Configuration = clientConfiguration;

            InitApis(HttpClient, clientConfiguration);
        }
Example #2
0
 public GameServiceTest()
 {
     _dataContextConnection = A.Fake <IDataContextConnection>();
     _reminderService       = A.Fake <IReminderService>();
     _teamApi        = A.Fake <ITeamApi>();
     _competitionApi = A.Fake <ICompetitionApi>();
     _matchApi       = A.Fake <IMatchApi>();
 }
 public JustGivingClient(ClientConfiguration clientConfiguration, IHttpClient httpClient, IAccountApi accountApi,
                         IDonationApi donationApi, IPageApi pageApi, ISearchApi searchApi, ICharityApi charityApi,
                         IEventApi eventApi, ITeamApi teamApi, IOneSearchApi oneSearch, ICountryApi countryApi,
                         ICurrencyApi currencyApi, IProjectApi projectApi)
     : base(
         clientConfiguration, httpClient, accountApi, donationApi, pageApi, searchApi, charityApi, eventApi,
         teamApi, oneSearch, countryApi, currencyApi, projectApi)
 {
 }
 public CompetitionController(
     IOptions <ApiSettings> apiSettings,
     ISportApi sportApi,
     ICountryApi countryApi,
     ITeamApi teamApi,
     ICompetitionApi competitionApi
     )
 {
     this.apiSettings    = apiSettings.Value;
     this.sportApi       = sportApi;
     this.countryApi     = countryApi;
     this.teamApi        = teamApi;
     this.competitionApi = competitionApi;
 }
Example #5
0
 public HomeController(IWritableOptions <InitSettings> initSettings,
                       IMapper mapper,
                       ISportApi sportApi,
                       ICompetitionApi competitionApi,
                       ICountryApi countryApi,
                       ITeamApi teamApi)
 {
     this.initSettings   = initSettings;
     this.mapper         = mapper;
     this.sportApi       = sportApi;
     this.competitionApi = competitionApi;
     this.countryApi     = countryApi;
     this.teamApi        = teamApi;
 }
        protected JustGivingClientBase(ClientConfiguration clientConfiguration,
                                       IHttpClient httpClient,
                                       IAccountApi accountApi,
                                       IDonationApi donationApi,
                                       IPageApi pageApi,
                                       ISearchApi searchApi,
                                       ICharityApi charityApi,
                                       IEventApi eventApi,
                                       ITeamApi teamApi, IOneSearchApi oneSearch,
                                       ICountryApi country, ICurrencyApi currency,
                                       IProjectApi project)
        {
            if (httpClient == null)
            {
                throw new ArgumentNullException("httpClient", "httpClient must not be null to access the api.");
            }

            HttpClient = httpClient;
            HttpClient.ConnectionTimeOut = TimeSpan.FromMinutes(3);

            Account   = accountApi;
            Donation  = donationApi;
            Page      = pageApi;
            Search    = searchApi;
            Charity   = charityApi;
            Event     = eventApi;
            Team      = teamApi;
            OneSearch = oneSearch;
            Country   = country;
            Currency  = currency;
            Project   = project;

            Configuration = clientConfiguration;

            InitApis(HttpClient, clientConfiguration);
        }
 public JustGivingClient(ClientConfiguration clientConfiguration, IHttpClient httpClient, IAccountApi accountApi,
                         IDonationApi donationApi, IPageApi pageApi, ISearchApi searchApi, ICharityApi charityApi,
                         IEventApi eventApi, ITeamApi teamApi): base(clientConfiguration, httpClient, accountApi, donationApi, pageApi, searchApi, charityApi, eventApi, teamApi)
 {
 }