

Var statisticClient = buildServiceProvider.GetRequiredService() Var playerEmbedClient = buildServiceProvider.GetRequiredService() Var episodeClient = buildServiceProvider.GetRequiredService() Var podcastClient = buildServiceProvider.GetRequiredService() ServiceProvider buildServiceProvider = services.BuildServiceProvider() Register necessary dependencies to ServiceCollection as follows var apiOptions = new ApiOptions("", "") If you don't want to use HttpClientFactory, you must register HttpClient yourself with the container. Initializationįirst, you need to install and NuGet package as follows dotnet add package ĭotnet add package īy installing you will be able to use HttpClientFactory.In the words of the ASP.NET Team it is “an opinionated factory for creating HttpClient instances” and is a new feature comes with the release of ASP.NET Core 2.1. IStatisticClient statisticClient = apiClientContext.StatisticClient ĪpiClientContext contains all necessary clients. IPodcastClient podcastClient = apiClientContext.PodcastClient IPlayerEmbedClient playerEmbedClient = apiClientContext.PlayerEmbedClient IEpisodeClient episodeClient = apiClientContext.EpisodeClient Var apiClientContext = SimplecastClientStandalone.Create(apiOptions) ApiOptions apiOptions = new ApiOptions("", "")

If you do not want to use any DI framework, you have to instantiate SimplecastClientStandalone as follows. Simplecast.Client can be used with any DI library, or it can be used standalone. Your API key is available in your Simplecast account settings. You have the option of authenticating one of three different ways: using HTTP Basic Auth, passing it as a request parameter, or setting an HTTP header. NET 4.6.1 that provides an easy way to interact with the Simplecast API ( )Īll requests must be authenticated using your API key, available in your Simplecast account settings. NET Client Library is a client library targeting.
