Exemplo n.º 1
0
 public RequestCoordinator(IHttpClient httpClient, IUrlSigner urlSigner, IOAuthCredentials oAuthCredentials, IApiUri apiUri)
 {
     HttpClient        = httpClient;
     _urlSigner        = urlSigner;
     _oAuthCredentials = oAuthCredentials;
     _apiUri           = apiUri;
 }
		public EndpointResolver(IUrlResolver urlResolver, IUrlSigner urlSigner, IOAuthCredentials oAuthCredentials, IApiUri apiUri)
		{
			_urlResolver = urlResolver;
			_urlSigner = urlSigner;
			_oAuthCredentials = oAuthCredentials;
			_apiUri = apiUri;
		}
Exemplo n.º 3
0
 public OAuthService(IApiUri apiUri, IOAuthCredentials credentials)
 {
     Uri            = apiUri.Uri;
     SecureUri      = apiUri.SecureUri;
     ConsumerKey    = credentials.ConsumerKey;
     ConsumerSecret = credentials.ConsumerSecret;
 }
		public RequestCoordinator(IHttpClient httpClient, IUrlSigner urlSigner, IOAuthCredentials oAuthCredentials, IApiUri apiUri)
		{
			HttpClient = httpClient;
			_urlSigner = urlSigner;
			_oAuthCredentials = oAuthCredentials;
			_apiUri = apiUri;
		}
Exemplo n.º 5
0
 public EchoNestMusicService(IWorkContext workContext,
                             mobSocialSettings mobSocialSettings,
                             IOAuthCredentials credentials,
                             IApiUri apiUri)
 {
     _mobSocialSettings = mobSocialSettings;
     _workContext       = workContext;
     _credentials       = credentials;
     _apiUri            = apiUri;
 }
        public void Setup()
        {
            _apiUri = A.Fake <IApiUri>();
            A.CallTo(() => _apiUri.Uri).Returns("http://example.com");
            A.CallTo(() => _apiUri.SecureUri).Returns("https://example.com");

            _oAuthCredentials = A.Fake <IOAuthCredentials>();
            A.CallTo(() => _oAuthCredentials.ConsumerKey).Returns("testkey");
            A.CallTo(() => _oAuthCredentials.ConsumerSecret).Returns("testsecret");

            _requestBuilder = new RequestBuilder(_apiUri, _oAuthCredentials);
        }
		public void Setup()
		{
			_apiUri = A.Fake<IApiUri>();
			A.CallTo(() => _apiUri.Uri).Returns("http://example.com");
			A.CallTo(() => _apiUri.SecureUri).Returns("https://example.com");

			_oAuthCredentials = A.Fake<IOAuthCredentials>();
			A.CallTo(() => _oAuthCredentials.ConsumerKey).Returns("testkey");
			A.CallTo(() => _oAuthCredentials.ConsumerSecret).Returns("testsecret");

			_requestBuilder = new RequestBuilder(_apiUri, _oAuthCredentials);
		}
 protected RequestHandler(IApiUri apiUri)
 {
     _apiUri = apiUri;
 }
		public RouteParamsSubstitutor(IApiUri apiUri)
		{
			_defaultBaseUriProvider = new BaseUriFromApiUri(apiUri);
		}
 public void Setup()
 {
     _apiUri = A.Fake <IApiUri>();
     A.CallTo(() => _apiUri.Uri).Returns("http://example.com");
     A.CallTo(() => _apiUri.SecureUri).Returns("https://example.com");
 }
		public RequestBuilder(IApiUri apiUri, IOAuthCredentials oAuthCredentials)
		{
			_oAuthCredentials = oAuthCredentials;
			_routeParamsSubstitutor = new RouteParamsSubstitutor(apiUri);
		}
		public BaseUriFromApiUri(IApiUri apiUri)
		{
			_apiUri = apiUri;
		}
		protected RequestHandler(IApiUri apiUri)
		{
			_apiUri = apiUri;
		}
 public PostRequestHandler(IApiUri apiUri, IOAuthCredentials oAuthCredentials, IUrlSigner urlSigner) : base(apiUri)
 {
     _oAuthCredentials = oAuthCredentials;
     _urlSigner        = urlSigner;
 }
Exemplo n.º 15
0
 public RouteParamsSubstitutor(IApiUri apiUri)
 {
     _defaultBaseUriProvider = new BaseUriFromApiUri(apiUri);
 }
Exemplo n.º 16
0
 public BaseUriFromApiUri(IApiUri apiUri)
 {
     _apiUri = apiUri;
 }
Exemplo n.º 17
0
 public FluentApi(IOAuthCredentials oAuthCredentials, IApiUri apiUri)
     : this(new HttpClientMediator(), new RequestBuilder(apiUri, oAuthCredentials))
 {
 }
Exemplo n.º 18
0
 public FluentApi(IOAuthCredentials oAuthCredentials, IApiUri apiUri)
     : this(new RequestCoordinator(new GzipHttpClient(), new UrlSigner(), oAuthCredentials, apiUri))
 {
 }
Exemplo n.º 19
0
 public static IFluentApi <T> CreateWithCreds(IOAuthCredentials oAuthCredentials, IApiUri apiUri)
 {
     return(new FluentApi <T>(oAuthCredentials, apiUri));
 }
 public RequestBuilder(IApiUri apiUri, IOAuthCredentials oAuthCredentials)
 {
     _oAuthCredentials       = oAuthCredentials;
     _routeParamsSubstitutor = new RouteParamsSubstitutor(apiUri);
 }
		public PostRequestHandler(IApiUri apiUri, IOAuthCredentials oAuthCredentials, IUrlSigner urlSigner) : base(apiUri)
		{
			_oAuthCredentials = oAuthCredentials;
			_urlSigner = urlSigner;
		}
Exemplo n.º 22
0
 public ApiFactory(IApiUri apiUri, IOAuthCredentials oauthCredentials)
 {
     _apiUri           = apiUri;
     _oauthCredentials = oauthCredentials;
 }
		public void Setup()
		{
			_apiUri = A.Fake<IApiUri>();
			A.CallTo(() => _apiUri.Uri).Returns("http://example.com");
			A.CallTo(() => _apiUri.SecureUri).Returns("https://example.com");
		}
Exemplo n.º 24
0
 public RouteParamsSubstitutor(IApiUri apiUri)
 {
     _apiUri = apiUri;
 }