Skip to content

Commit ff0470a

Browse files
authored
Upgrade to .NET 7 (#67)
* Upgrade to .NET 7 fixes #62 * Manually setup .NET 7 (workaround)
1 parent c7c4ba2 commit ff0470a

File tree

5 files changed

+47
-40
lines changed

5 files changed

+47
-40
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,17 @@ jobs:
3939

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v3
43+
44+
# .NET 7 isn't supported yet, temp workaround.
45+
- name: Setup .NET
46+
uses: actions/setup-dotnet@v2
47+
with:
48+
dotnet-version: 7.x
4349

4450
# Initializes the CodeQL tools for scanning.
4551
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v1
52+
uses: github/codeql-action/init@v2
4753
with:
4854
languages: ${{ matrix.language }}
4955
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -54,7 +60,7 @@ jobs:
5460
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5561
# If this step fails, then you should remove it and run the build manually (see below)
5662
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v1
63+
uses: github/codeql-action/autobuild@v2
5864

5965
# ℹ️ Command-line programs to run using the OS shell.
6066
# 📚 https://git.io/JvXDl
@@ -68,4 +74,4 @@ jobs:
6874
# make release
6975

7076
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v1
77+
uses: github/codeql-action/analyze@v2

.github/workflows/dotnet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818
- name: Setup .NET
19-
uses: actions/setup-dotnet@v3
19+
uses: actions/setup-dotnet@v2
2020
with:
21-
dotnet-version: 6.0.x
21+
dotnet-version: 7.x
2222
- name: Restore dependencies
2323
run: dotnet restore
2424
- name: Build

FinancialModelingPrepApi/FinancialModelingPrepApi.csproj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
55
<RootNamespace>MatthiWare.FinancialModelingPrep</RootNamespace>
66
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
77
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
88
<Company>MatthiWare</Company>
99
<PackageId>MatthiWare.FinancialModelingPrep</PackageId>
10-
<Description>FinancialModelingPrep API Client written in .NET 6</Description>
10+
<Description>FinancialModelingPrep API Client written in .NET 7</Description>
1111
<Copyright>Copyright Matthias Beerens 2021</Copyright>
1212
<Product>FinancialModelingPrep API Client</Product>
1313
<Authors>Matthias Beerens</Authors>
@@ -17,8 +17,7 @@
1717
<PackageTags>FinancialModelingPrep stock quote finance-api</PackageTags>
1818
<PackageProjectUrl>https://github.com/MatthiWare/FinancialModelingPrep.NET</PackageProjectUrl>
1919
<PackageReleaseNotes>
20-
- OtherTotalStockHoldersEquity Type fixed
21-
- Include .NET 5 and .NET 6 in nuget package
20+
- Include .NET 6 and .NET 7 in nuget package
2221
</PackageReleaseNotes>
2322
<AssemblyName>FinancialModelingPrep</AssemblyName>
2423
</PropertyGroup>
@@ -29,9 +28,9 @@
2928

3029
<ItemGroup>
3130
<PackageReference Include="Bert.RateLimiters" Version="1.0.15" />
32-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
33-
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
34-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
31+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
32+
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
33+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
3534
<PackageReference Include="MinVer" Version="4.2.0">
3635
<PrivateAssets>all</PrivateAssets>
3736
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,24 @@
33
[![.NET](https://github.com/MatthiWare/FinancialModelingPrep.NET/actions/workflows/dotnet.yml/badge.svg)](https://github.com/MatthiWare/FinancialModelingPrep.NET/actions/workflows/dotnet.yml)
44
[![Nuget](https://buildstats.info/nuget/MatthiWare.FinancialModelingPrep)](https://www.nuget.org/packages/MatthiWare.FinancialModelingPrep/)
55

6-
.NET 5 API Client For https://financialmodelingprep.com/ API written in C#
6+
.NET 7 API Client For https://financialmodelingprep.com/ API written in C#
77

88
## Installation
9+
910
```powershell
1011
PM> Install-Package MatthiWare.FinancialModelingPrep
1112
```
1213

1314
# Quick Start
1415

1516
### Register FinancialModelingPrepApiClient in Dependency Injection provider
16-
> You can find your API Key here https://financialmodelingprep.com/developer/docs/dashboard
17-
``` csharp
17+
18+
> You can find your API Key here https://site.financialmodelingprep.com/developer/docs/dashboard/
19+
20+
```csharp
1821
using MatthiWare.FinancialModelingPrep;
1922

20-
Services.AddFinancialModelingPrepApiClient(new FinancialModelingPrepOptions()
23+
Services.AddFinancialModelingPrepApiClient(new FinancialModelingPrepOptions()
2124
{
2225
ApiKey = "API-KEY-HERE"
2326
});
@@ -41,7 +44,7 @@ var quoteResult = await api.CompanyValuation.GetQuoteAsync("AAPL");
4144

4245
### Get Stock Price Quote
4346

44-
``` csharp
47+
```csharp
4548
var response = await api.CompanyValuation.GetQuoteAsync("AAPL");
4649

4750
// Display Apple Stock Quote
@@ -50,7 +53,7 @@ Console.WriteLine($"$AAPL is currently trading at: {response.Data.Price}");
5053

5154
### All API Responses are wrapped in an `ApiResponse<T>` object.
5255

53-
``` csharp
56+
```csharp
5457
public class ApiResponse<T>
5558
{
5659
/// <summary>
@@ -72,21 +75,22 @@ public class ApiResponse<T>
7275

7376
Example:
7477

75-
``` csharp
78+
```csharp
7679
var response = await api.CompanyValuation.GetQuoteAsync("AAPL");
7780

7881
// Display Apple Stock Quote
7982
if (!quoteResult.HasError)
8083
{
8184
Console.WriteLine($"$AAPL is currently trading at: {response.Data.Price}");
82-
}
83-
else
85+
}
86+
else
8487
{
8588
Console.WriteLine($"Error occured, message: {response.Error}");
8689
}
8790
```
8891

8992
### Covered Endpoints
93+
9094
- Company Valuation
9195
- Advanced Data
9296
- Insider Trading (Not yet covered)
@@ -98,14 +102,12 @@ else
98102
- Market Indexes
99103
- Alternative Data (Not yet covered)
100104
- Commodities (Not yet covered)
101-
- ETF (Not yet covered)
105+
- ETF (Partially covered)
102106
- Mutual Funds (Not yet covered)
103-
- Euronext
104-
- TSX
105107
- Stock Market (Partially covered)
106-
- Cryptocurrencies (Not yet covered)
107-
- Forex (Not yet covered)
108+
- Cryptocurrencies (Partially covered)
109+
- Forex (Partially covered)
108110

109111
### Contribute
110-
Create a PR where you add or improve an Endpoint
111112

113+
Create a PR where you add or improve an Endpoint

Tests/Tests.csproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net7.0</TargetFrameworks>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Divergic.Logging.Xunit" Version="4.1.0" />
11-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
12-
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
14-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
15-
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
17-
<PackageReference Include="Moq" Version="4.18.1" />
18-
<PackageReference Include="xunit" Version="2.4.1" />
10+
<PackageReference Include="Divergic.Logging.Xunit" Version="4.2.0" />
11+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
12+
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
13+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
14+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
15+
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
16+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
17+
<PackageReference Include="Moq" Version="4.18.2" />
18+
<PackageReference Include="xunit" Version="2.4.2" />
1919
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
2020
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2121
<PrivateAssets>all</PrivateAssets>
2222
</PackageReference>
23-
<PackageReference Include="coverlet.collector" Version="3.1.2">
23+
<PackageReference Include="coverlet.collector" Version="3.2.0">
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
<PrivateAssets>all</PrivateAssets>
2626
</PackageReference>

0 commit comments

Comments
 (0)