public void Init() { var services = new ServiceCollection(); _kSoftApi = new KSoftApi(Token); ConfigureServices(services); _serviceProvider = services.BuildServiceProvider(); }
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); }
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); }
public ExampleClass(string token) { _kSoftApi = new KSoftApi(token); }
public ExampleClass(KSoftApi kSoftApi) { _kSoftApi = kSoftApi; }