Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SharesApi"/> class
 /// using Configuration object
 /// </summary>
 /// <param name="configuration">An instance of Configuration</param>
 /// <returns></returns>
 public SharesApi(Configuration configuration = null)
 {
     if (configuration == null) // use the default one in Configuration
         this.Configuration = Configuration.Default; 
     else
         this.Configuration = configuration;
 }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ApiClient" /> class
        /// with default base path (https://localhost/api/v1).
        /// </summary>
        /// <param name="config">An instance of Configuration.</param>
        public ApiClient(Configuration config = null)
        {
            if (config == null)
                Configuration = Configuration.Default;
            else
                Configuration = config;

            RestClient = new RestClient("https://localhost/api/v1");
        }