/// <summary> /// Initializes a new instance of the /// <see cref="Cronofy.CronofyAccessTokenClient"/> class. /// </summary> /// <param name="accessToken"> /// The access token for the OAuth authorization for the account, must /// not be empty. /// </param> /// <param name="dataCentre"> /// The data centre to use, must not be <code>null</code>. /// </param> /// <exception cref="System.ArgumentException"> /// Thrown if <paramref name="accessToken"/> is <code>null</code> or /// empty, or if <paramref name="dataCentre"/> is <code>null</code>. /// </exception> public CronofyAccessTokenClient(string accessToken, DataCentre dataCentre) { Preconditions.NotEmpty("accessToken", accessToken); Preconditions.NotNull("dataCentre", dataCentre); this.AccessToken = accessToken; this.UrlProvider = UrlProviderFactory.GetProvider(dataCentre.Identifier); this.HttpClient = new ConcreteHttpClient(); }
/// <summary> /// Initializes a new instance of the /// <see cref="Cronofy.CronofyEnterpriseConnectAccountClient"/> class. /// </summary> /// <param name="accessToken"> /// The access token for the OAuth authorization for the account, must /// not be empty. /// </param> /// <param name="dataCentre"> /// The data centre to use, must not be <code>null</code>. /// </param> /// <exception cref="System.ArgumentException"> /// Thrown if <paramref name="accessToken"/> is <code>null</code> or /// empty, or if <paramref name="dataCentre"/> is <code>null</code>. /// </exception> public CronofyEnterpriseConnectAccountClient(string accessToken, DataCentre dataCentre) : base(accessToken, dataCentre) { }
/// <summary> /// Initializes a new instance of the /// <see cref="Cronofy.CronofyAccountClient"/> class. /// </summary> /// <param name="accessToken"> /// The access token for the OAuth authorization for the account, must /// not be empty. /// </param> /// <param name="dataCentre"> /// The data centre to use, must not be <code>null</code>. /// </param> /// <exception cref="System.ArgumentException"> /// Thrown if <paramref name="accessToken"/> is <code>null</code> or /// empty, or if <paramref name="dataCentre"/> is <code>null</code>. /// </exception> public CronofyAccountClient(string accessToken, DataCentre dataCentre) : base(accessToken, dataCentre) { }