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);
        }
 public ChangeRecordsApi(IUserDigestService userDigestService,
                         IDocumentDBRepository <ChangeRecord> changeRecordRepository,
                         ISearchApi searchApi)
 {
     _userDigestService      = userDigestService;
     _changeRecordRepository = changeRecordRepository;
     _searchApi = searchApi;
 }
예제 #3
0
 public OrganisationsApi(IOrganisationService organisationService,
                         ISearchApi searchApi,
                         IUserDigestService userDigestService)
 {
     _organisationService = organisationService;
     _searchApi           = searchApi;
     _userDigestService   = userDigestService;
 }
 public VehiclesApi(IVehicleService vehicleService,
                    ISearchApi searchApi,
                    IUserDigestService userDigestService)
 {
     _vehicleService    = vehicleService;
     _searchApi         = searchApi;
     _userDigestService = userDigestService;
 }
 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)
 {
 }
예제 #6
0
 public JourneysApi(IDocumentDBRepository <Journey> JourneyRepository,
                    IJourneyService JourneyService,
                    ISearchApi searchApi,
                    IUserDigestService userDigestService)
 {
     _JourneyRepository = JourneyRepository;
     _JourneyService    = JourneyService;
     _searchApi         = searchApi;
     _userDigestService = userDigestService;
 }
예제 #7
0
        void Init()
        {
            var index = SearchService.searchApis.FindIndex(api => api.engineScope == m_EngineScope);

            if (index >= 0)
            {
                m_Api = SearchService.searchApis[index];
                m_Api.activeEngineChanged += OnActiveEngineChanged;
            }
        }
예제 #8
0
            public SearchSessionHandler(string searchType)
            {
                var index = s_SearchApis.FindIndex(api => api.id == searchType);

                if (index >= 0)
                {
                    m_Api = s_SearchApis[index];
                    m_Api.activeEngineChanged += OnActiveEngineChanged;
                }
            }
 public DriversApi(IUserDigestService userDigestService,
                   IDocumentDBRepository <Driver> DriverRepository,
                   ISearchApi searchApi,
                   IUserService userService,
                   IDriverService DriverService)
 {
     _userDigestService = userDigestService;
     _DriverRepository  = DriverRepository;
     _searchApi         = searchApi;
     _DriverService     = DriverService;
 }
예제 #10
0
        public SearchSessionOptionsApplicator(ISearchApi api, SearchSessionOptions options)
        {
            m_Api                 = api;
            m_Options             = options;
            m_Disposed            = false;
            m_CurrentActiveEngine = m_Api?.activeSearchEngineName;

            if (m_Options.legacyOnly)
            {
                m_Api?.SetActiveSearchEngine(LegacySearchEngineBase.k_Name, false);
            }
        }
예제 #11
0
 public HeroService(HttpClient httpClient, IProductApi productService, IPaxApi paxService,
                    ISearchApi searchApi, IScheduleApi scheduleApi, IProductPricingApi productPricingApi,
                    IPaymentApi paymentApi, IBookingApi bookingApi, IVoucherApi voucherApi)
 {
     _httpClient       = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
     ProductApi        = productService ?? throw new ArgumentNullException(nameof(productService));
     PaxApi            = paxService ?? throw new ArgumentNullException(nameof(paxService));
     SearchApi         = searchApi ?? throw new ArgumentNullException(nameof(searchApi));
     ScheduleApi       = scheduleApi ?? throw new ArgumentNullException(nameof(scheduleApi));
     ProductPricingApi = productPricingApi ?? throw new ArgumentNullException(nameof(productPricingApi));
     PaymentApi        = paymentApi ?? throw new ArgumentNullException(nameof(paymentApi));
     BookingApi        = bookingApi ?? throw new ArgumentNullException(nameof(bookingApi));
     VoucherApi        = voucherApi ?? throw new ArgumentNullException(nameof(voucherApi));
 }
예제 #12
0
        void Init(bool pullEngines = false)
        {
            if (pullEngines)
            {
                PullEngines();
            }
            var index = SearchService.searchApis.FindIndex(api => api.engineScope == m_EngineScope);

            if (index >= 0)
            {
                m_Api = SearchService.searchApis[index];
                m_Api.activeEngineChanged += OnActiveEngineChanged;
            }
        }
        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);
        }
예제 #14
0
 /// <summary>
 /// Instantiates a new <see cref="TracksApi"/>.
 /// </summary>
 /// <remarks>
 /// Use this constructor when an accessToken will be provided using the `accessToken` parameter
 /// on each method
 /// </remarks>
 /// <param name="httpClient">An instance of <see cref="HttpClient"/></param>
 public TracksApi(HttpClient httpClient) : base(httpClient)
 {
     SearchApi = new SearchApi(httpClient);
 }
예제 #15
0
 public SearchServiceImpl(ISearchApi searchApiImplementation) : base(searchApiImplementation)
 {
 }
예제 #16
0
 public SearchResultViewModel(ISearchApi api)
 {
     SearchApi = api;
    
 }
예제 #17
0
 public ArtistsApi(HttpClient httpClient, IAccessTokenProvider accessTokenProvider) : base(httpClient, accessTokenProvider)
 {
     SearchApi = new SearchApi(httpClient, accessTokenProvider);
 }
예제 #18
0
 public SearchService(IMvxLog log) : base(log, "https://search.purplebricks.co.uk")
 {
     _apiClient = RestService.For <ISearchApi>(httpClient);
 }
예제 #19
0
 /// <summary>
 /// Use this constructor when an accessToken will be provided using the `accessToken` parameter
 /// on each method
 /// </summary>
 /// <param name="httpClient">An instance of <see cref="HttpClient"/></param>
 public ArtistsApi(HttpClient httpClient) : base(httpClient)
 {
     SearchApi = new SearchApi(httpClient);
 }
예제 #20
0
 /// <summary>
 /// This constructor accepts a Spotify access token that will be used for all calls to the API
 /// (except when an accessToken is provided using the optional `accessToken` parameter on each method).
 /// </summary>
 /// <param name="httpClient">An instance of <see cref="HttpClient"/></param>
 /// <param name="accessToken">A valid access token from the Spotify Accounts service</param>
 public ArtistsApi(HttpClient httpClient, string accessToken) : base(httpClient, accessToken)
 {
     SearchApi = new SearchApi(httpClient, accessToken);
 }
 public ArtistsApi(HttpClient httpClient, IAccountsService accountsService) : base(httpClient, accountsService)
 {
     SearchApi = new SearchApi(httpClient, accountsService);
 }
예제 #22
0
 public SearchController(ISearchApi searchApi)
 {
     _searchApi = searchApi;
 }
예제 #23
0
 /// <summary>
 /// Instantiates a new <see cref="AlbumsApi"/>.
 /// </summary>
 /// <remarks>
 /// Use this constructor when an accessToken will be provided using the `accessToken` parameter
 /// on each method
 /// </remarks>
 /// <param name="httpClient">An instance of <see cref="HttpClient"/></param>
 public AlbumsApi(HttpClient httpClient) : base(httpClient)
 {
     SearchApi = new SearchApi(httpClient);
 }
예제 #24
0
 public MediaController(IMediaApi mediaApi, ISearchApi searchApi, ITextApi textApi)
 {
     _mediaApi  = mediaApi;
     _searchApi = searchApi;
     _textApi   = textApi;
 }
 public SearchUseCase(ISearchApi searchApi)
 {
     _searchApi = searchApi;
 }
예제 #26
0
 internal SearchService([NotNull] ISearchApi searchApiImplementation)
 {
     SearchApiImplementation = searchApiImplementation ??
                               throw new ArgumentNullException(nameof(searchApiImplementation));
 }
 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)
 {
 }
예제 #28
0
 public SearchController(ISearchApi searchApi, ICoreLogger logger)
 {
     _searchApi = searchApi;
     _logger    = logger;
 }
예제 #29
0
 void Sections_SelectionChanged(object sender, SelectionChangedEventArgs e) {
     var pivotItem = sv.Sections.SelectedItem as PivotItem;
     if (pivotItem == null) return;
     var pi = pivotItem;
     var model = pi.Content as SearchResultViewModel;
     if (model == null) return;
     var rvm = model;
     if (ActiveSearch == rvm.SearchApi) return;
     ActiveSearch = rvm.SearchApi;
     DoSearch();
 }