Beispiel #1
0
        public void Init()
        {
            var services = new ServiceCollection();

            _kSoftApi = new KSoftApi(Token);

            ConfigureServices(services);
            _serviceProvider = services.BuildServiceProvider();
        }
Beispiel #2
0
        public ExampleClass(string token)
        {
            var httpClient = new HttpClient {
                BaseAddress           = new Uri("https://api.ksoft.si"),
                DefaultRequestHeaders =
                {
                    Authorization = new AuthenticationHeaderValue("Bearer", token)
                }
            };

            _kSoftApi = new KSoftApi(httpClient);
        }
Beispiel #3
0
        public KSoftApiUnitTest()
        {
            var configuration = new ConfigurationBuilder().AddJsonFile("config.json").Build();
            var token         = configuration["token"];
            // _kSoftApi = new KSoftApi(token);
            var httpClient = new HttpClient(new HttpLoggingHandler())
            {
                BaseAddress           = new Uri("https://api.ksoft.si"),
                DefaultRequestHeaders =
                {
                    Authorization = new AuthenticationHeaderValue("Bearer", token)
                }
            };

            _kSoftApi = new KSoftApi(httpClient);
        }
Beispiel #4
0
 public ExampleClass(string token)
 {
     _kSoftApi = new KSoftApi(token);
 }
Beispiel #5
0
 public ExampleClass(KSoftApi kSoftApi)
 {
     _kSoftApi = kSoftApi;
 }