コード例 #1
0
 public MerakiClient(MerakiClientSettings settings)
 {
     _client = new HttpClient(new HttpClientHandler())
     {
         BaseAddress = new Uri(settings.Address)
     };
     _client.DefaultRequestHeaders.Add("X-Cisco-Meraki-API-Key", settings.Key);
     _client.DefaultRequestHeaders.Add("Accept-Type", "application/json");
 }
コード例 #2
0
ファイル: MerakiClientFactory.cs プロジェクト: migrap/Meraki
        public static MerakiClient Create(Action <MerakiClientSettings> configure)
        {
            var settings = new MerakiClientSettings();
            var options  = Options.Create(settings);
            var setup    = new MerakiClientSettingsSetup();

            setup.Configure(settings);
            configure?.Invoke(settings);

            return(new MerakiClient(settings));
        }