示例#1
0
        public CloudflareApi(SecretsStoreManager secretsStoreManager, string id, object ServiceOptions) : base(secretsStoreManager, id)
        {
            Options = (ServiceOptions)ServiceOptions;

            client.AddDefaultHeader("X-Auth-Email", secretsStoreManager.TryGetSecret(Options.Email));
            client.AddDefaultHeader("X-Auth-Key", secretsStoreManager.TryGetSecret(Options.ApiKey));
            client.AddDefaultHeader("Content-Type", "application/json; charset=utf-8");
            client.AddHandler("application/json", new DynamicJsonDeserializer());
        }
示例#2
0
        public TwitterApi(SecretsStoreManager secretsStoreManager, string id, object ServiceOptions) : base(secretsStoreManager, id)
        {
            Options = (ServiceOptions)ServiceOptions;

            client.Authenticator = OAuth1Authenticator.ForProtectedResource(
                secretsStoreManager.TryGetSecret(Options.ConsumerKey),
                secretsStoreManager.TryGetSecret(Options.ConsumerSecret),
                secretsStoreManager.TryGetSecret(Options.Token),
                secretsStoreManager.TryGetSecret(Options.TokenSecret)
                );
            client.AddHandler("application/json", new DynamicJsonDeserializer());
        }
示例#3
0
        public TwitterWeb(SecretsStoreManager secretsStoreManager, string id, object ServiceOptions) : base(secretsStoreManager, id)
        {
            Options = (ServiceOptions)ServiceOptions;

            var driverOptions = new ChromeOptions();

#if !DEBUG
            driverOptions.AddArgument("headless");
#endif
            driverOptions.AddArgument("disable-gpu");

            driver = new ChromeDriver(Directory.GetCurrentDirectory(), driverOptions);
            driver.Manage().Timeouts().ImplicitWait = new TimeSpan(0, 0, 30);
        }
示例#4
0
 public Pushover(SecretsStoreManager secretsStoreManager, object NotifyServiceOptions) : base(secretsStoreManager)
 {
     Options = (NotifyServiceOptions)NotifyServiceOptions;
 }