コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ApiClient" /> class
        /// with default base path (https://api.supportify.io/v3).
        /// </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://api.supportify.io/v3");
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SupportifyApi"/> class
 /// using Configuration object
 /// </summary>
 /// <param name="configuration">An instance of Configuration</param>
 /// <returns></returns>
 public SupportifyApi(Configuration configuration = null)
 {
     if (configuration == null) // use the default one in Configuration
         this.Configuration = Configuration.Default; 
     else
         this.Configuration = configuration;
 }