Beispiel #1
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="Api"/> class.
 /// </summary>
 /// <param name="uri">The URI pointing to the root of the API.</param>
 /// <param name="credentials">The authentication credentials.</param>
 protected ApiBase(Uri uri, HttpCredentials credentials)
 {
     Uri        = uri;
     HttpHelper = new HttpHelper(credentials);
 }
Beispiel #2
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="Api"/> class.
 /// </summary>
 /// <param name="uri">The URI pointing to the root of the API.</param>
 /// <param name="credentials">The authentication credentials.</param>
 public Api(Uri uri, HttpCredentials credentials)
     : base(uri, credentials)
 {
     Auth         = new AuthApi(this);
     Environments = new EnvironmentsApi(this);
 }
Beispiel #3
0
 public HttpHelper(HttpCredentials credentials)
 {
     _credentials = credentials;
 }
Beispiel #4
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="Api"/> class,
 ///   pointed to the default API address.
 /// </summary>
 /// <param name="credentials">The authentication credentials.</param>
 public Api(HttpCredentials credentials)
     : this(DefaultAddress, credentials)
 {
 }