Skip to content

Commit

Permalink
updated CryptoExchange ref
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Nov 19, 2024
1 parent 18d6923 commit ff918cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 2 additions & 4 deletions CoinGecko.Net/CoinGecko.Net.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<Nullable>enable</Nullable>
Expand Down Expand Up @@ -48,12 +48,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="CryptoExchange.Net" Version="8.3.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\CryptoExchange.Net\CryptoExchange.Net\CryptoExchange.Net.csproj" />
</ItemGroup>
</Project>
11 changes: 9 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,15 @@ <h2>API Access</h2>

<p>CoinGecko.Net can be configured using Dotnet dependency injection, after which the clients can be injected into your services. It also correctly configures logging and HttpClient usage.</p>

<pre><code>builder.Services.AddCoinGecko(options => {
// Options can be configured here
<pre><code>// Configure options from config file
// see https://github.com/JKorf/CryptoExchange.Net/tree/master/Examples/example-config.json for an example
builder.Services.AddCoinGecko(builder.Configuration.GetSection("CoinGecko"));

// OR

builder.Services.AddCoinGecko(options => {
// Configure options in code
options.RequestTimeout = TimeSpan.FromSeconds(10);
});</code></pre>

<p>The <code>ICoinGeckoRestClient</code> can then be injected.</p>
Expand Down

0 comments on commit ff918cf

Please sign in to comment.