Exemplo n.º 1
0
        public void Init()
        {
            var services = new ServiceCollection();

            _kSoftApi = new KSoftApi(Token);

            ConfigureServices(services);
            _serviceProvider = services.BuildServiceProvider();
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 public ExampleClass(string token)
 {
     _kSoftApi = new KSoftApi(token);
 }
Exemplo n.º 5
0
 public ExampleClass(KSoftApi kSoftApi)
 {
     _kSoftApi = kSoftApi;
 }