File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,28 @@ PM> Install-Package MatthiWare.FinancialModelingPrep
1111
1212# Quick Start
1313
14- Register FinancialModelingPrepApiClient in Dependency Injection provider
14+ ### Register FinancialModelingPrepApiClient in Dependency Injection provider
1515> You can find your API Key here https://financialmodelingprep.com/developer/docs/dashboard
1616``` csharp
17+ using MatthiWare .FinancialModelingPrep ;
18+
1719Services .AddFinancialModelingPrepApiClient (new FinancialModelingPrepOptions ()
1820{
1921 ApiKey = " API-KEY-HERE"
2022});
23+
24+ var api = ServiceProvider .GetRequiredService <IFinancialModelingPrepApiClient >();
25+
26+ // do something with api like getting the latest Apple Stock Quote
27+ var quoteResult = await api .CompanyValuation .GetQuoteAsync (" AAPL" );
2128```
2229
23- ### Resolve FMP API Client
30+ ### Create FMP API Client using Factory (without Dependency Injection)
2431
25- ``` csharp
26- var api = ServiceProvider .GetRequiredService <IFinancialModelingPrepApiClient >();
32+ ``` csharp
33+ using MatthiWare .FinancialModelingPrep ;
34+
35+ var api = FinancialModelingPrepApiClientFactory .CreateClient (new FinancialModelingPrepOptions ());
2736
2837// do something with api like getting the latest Apple Stock Quote
2938var quoteResult = await api .CompanyValuation .GetQuoteAsync (" AAPL" );
You can’t perform that action at this time.
0 commit comments