예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PositionsApi"/> class
        /// using Configuration object
        /// </summary>
        /// <param name="configuration">An instance of Configuration</param>
        /// <returns></returns>
        public PositionsApi(CoinAPI.EMS.REST.V1.Client.Configuration configuration = null)
        {
            if (configuration == null) // use the default one in Configuration
            {
                this.Configuration = CoinAPI.EMS.REST.V1.Client.Configuration.Default;
            }
            else
            {
                this.Configuration = configuration;
            }

            ExceptionFactory = CoinAPI.EMS.REST.V1.Client.Configuration.DefaultExceptionFactory;
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BalancesApi"/> class
        /// using Configuration object
        /// </summary>
        /// <param name="configuration">An instance of Configuration</param>
        /// <returns></returns>
        public BalancesApi(CoinAPI.EMS.REST.V1.Client.Configuration configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            this.Configuration = CoinAPI.EMS.REST.V1.Client.Configuration.MergeConfigurations(
                CoinAPI.EMS.REST.V1.Client.GlobalConfiguration.Instance,
                configuration
                );
            this.Client             = new CoinAPI.EMS.REST.V1.Client.ApiClient(this.Configuration.BasePath);
            this.AsynchronousClient = new CoinAPI.EMS.REST.V1.Client.ApiClient(this.Configuration.BasePath);
            ExceptionFactory        = CoinAPI.EMS.REST.V1.Client.Configuration.DefaultExceptionFactory;
        }