From aeb32b8475862d6379ee5d8275071551b6846142 Mon Sep 17 00:00:00 2001 From: Alex Vincent Date: Tue, 21 Nov 2023 06:30:31 +0100 Subject: [PATCH 1/8] bump lang version --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index a679768..629b0de 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ CasCap - 11.0 + 12.0 bf9d717e-ecd3-40e4-850d-14010c167289 From fc560c5c1b41512e725e800a654d5d1f17a4014f Mon Sep 17 00:00:00 2001 From: Alex Vincent Date: Tue, 21 Nov 2023 06:40:07 +0100 Subject: [PATCH 2/8] target .net8.0 +semver: major --- samples/ConsoleApp/ConsoleApp.csproj | 3 +-- samples/GenericHost/GenericHost.csproj | 3 +-- .../CasCap.Apis.GooglePhotos.Tests.csproj | 3 +-- src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/samples/ConsoleApp/ConsoleApp.csproj b/samples/ConsoleApp/ConsoleApp.csproj index 8ba8a0d..60f72e8 100644 --- a/samples/ConsoleApp/ConsoleApp.csproj +++ b/samples/ConsoleApp/ConsoleApp.csproj @@ -2,8 +2,7 @@ Exe - net6.0 - $(TargetFrameworks);net7.0 + net8.0 diff --git a/samples/GenericHost/GenericHost.csproj b/samples/GenericHost/GenericHost.csproj index 1eeed32..a08c7d9 100644 --- a/samples/GenericHost/GenericHost.csproj +++ b/samples/GenericHost/GenericHost.csproj @@ -2,8 +2,7 @@ Exe - net6.0 - $(TargetFrameworks);net7.0 + net8.0 diff --git a/src/CasCap.Apis.GooglePhotos.Tests/CasCap.Apis.GooglePhotos.Tests.csproj b/src/CasCap.Apis.GooglePhotos.Tests/CasCap.Apis.GooglePhotos.Tests.csproj index d23ae3e..d815c7a 100644 --- a/src/CasCap.Apis.GooglePhotos.Tests/CasCap.Apis.GooglePhotos.Tests.csproj +++ b/src/CasCap.Apis.GooglePhotos.Tests/CasCap.Apis.GooglePhotos.Tests.csproj @@ -1,8 +1,7 @@  - net6.0 - $(TargetFrameworks);net7.0 + net8.0 diff --git a/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj b/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj index c4fb23f..74d003f 100644 --- a/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj +++ b/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj @@ -1,8 +1,7 @@  - net6.0 - $(TargetFrameworks);net7.0 + net8.0 true enable From 4823357abfc309cd4cb2cf13bd23ffecb5fb3aa1 Mon Sep 17 00:00:00 2001 From: Alex Vincent Date: Tue, 21 Nov 2023 10:41:53 +0100 Subject: [PATCH 3/8] bump SourceLink dependency --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 629b0de..5ec80ae 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -46,7 +46,7 @@ - + From 6823b23de6a6a1d44e33878a2058b56a2c802bdf Mon Sep 17 00:00:00 2001 From: Alex Vincent Date: Fri, 12 Jan 2024 08:50:10 +0100 Subject: [PATCH 4/8] misc updates --- .github/workflows/codeql-analysis.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 202443e..3176837 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -32,7 +32,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/README.md b/README.md index 5cbb1d0..990e89a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ > Want to save yourself some coding? See the _preview_ release of [GooglePhotosCli](https://github.com/f2calv/CasCap.GooglePhotosCli) using this library... -This is an _unofficial_ Google Photos REST API library targeting .NET 6.0 & .NET 7.0. +This is an _unofficial_ Google Photos REST API library targeting .NET 8.0. Note: Older projects that require .NET Standard 2.0 please use version 1.x of this library. From 6b4528d814d1395c8e3366a5f4c3bb9175661017 Mon Sep 17 00:00:00 2001 From: Alex Vincent Date: Fri, 12 Jan 2024 08:51:26 +0100 Subject: [PATCH 5/8] nuget updates --- samples/GenericHost/GenericHost.csproj | 14 +++++++------- .../CasCap.Apis.GooglePhotos.Tests.csproj | 16 ++++++++-------- .../CasCap.Apis.GooglePhotos.csproj | 8 ++++---- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/samples/GenericHost/GenericHost.csproj b/samples/GenericHost/GenericHost.csproj index a08c7d9..27ea2e1 100644 --- a/samples/GenericHost/GenericHost.csproj +++ b/samples/GenericHost/GenericHost.csproj @@ -7,13 +7,13 @@ - - - - - - - + + + + + + + diff --git a/src/CasCap.Apis.GooglePhotos.Tests/CasCap.Apis.GooglePhotos.Tests.csproj b/src/CasCap.Apis.GooglePhotos.Tests/CasCap.Apis.GooglePhotos.Tests.csproj index d815c7a..d97c4ea 100644 --- a/src/CasCap.Apis.GooglePhotos.Tests/CasCap.Apis.GooglePhotos.Tests.csproj +++ b/src/CasCap.Apis.GooglePhotos.Tests/CasCap.Apis.GooglePhotos.Tests.csproj @@ -5,15 +5,15 @@ - + - - - - - - - + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj b/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj index 74d003f..ae71481 100644 --- a/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj +++ b/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj @@ -25,11 +25,11 @@ - - - + + + - + From b9da5c9132d6ed7c4f5daf9e1dd64a10abe939a6 Mon Sep 17 00:00:00 2001 From: Alex Vincent Date: Fri, 12 Jan 2024 08:51:29 +0100 Subject: [PATCH 6/8] fix --- src/CasCap.Apis.GooglePhotos.Tests/Tests/ExifTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CasCap.Apis.GooglePhotos.Tests/Tests/ExifTests.cs b/src/CasCap.Apis.GooglePhotos.Tests/Tests/ExifTests.cs index 5962ef6..db3cbf2 100644 --- a/src/CasCap.Apis.GooglePhotos.Tests/Tests/ExifTests.cs +++ b/src/CasCap.Apis.GooglePhotos.Tests/Tests/ExifTests.cs @@ -1,6 +1,7 @@ using CasCap.Models; using CasCap.Services; using CasCap.Xunit; +using SixLabors.ImageSharp; using SixLabors.ImageSharp.Metadata.Profiles.Exif; using System.Diagnostics; using Xunit; From b577aadd19bc3dc776531465be69c13789ce8399 Mon Sep 17 00:00:00 2001 From: Alex Vincent Date: Fri, 12 Jan 2024 08:54:14 +0100 Subject: [PATCH 7/8] bump codeql action version --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3176837..9aa4b5f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -36,7 +36,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 # Override language selection by uncommenting this and choosing your languages with: languages: csharp @@ -44,7 +44,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). # If this step fails, then you should remove it and run the build manually (see below). - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹ️ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -58,4 +58,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 \ No newline at end of file + uses: github/codeql-action/analyze@v3 \ No newline at end of file From 0873bbdbfa52bda9ae07951c5ca817fad3216f5d Mon Sep 17 00:00:00 2001 From: Alex Vincent Date: Fri, 12 Jan 2024 09:00:16 +0100 Subject: [PATCH 8/8] fix new warnings --- .../Services/Base/GooglePhotosServiceBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CasCap.Apis.GooglePhotos/Services/Base/GooglePhotosServiceBase.cs b/src/CasCap.Apis.GooglePhotos/Services/Base/GooglePhotosServiceBase.cs index 90d9cb8..49a7a5e 100644 --- a/src/CasCap.Apis.GooglePhotos/Services/Base/GooglePhotosServiceBase.cs +++ b/src/CasCap.Apis.GooglePhotos/Services/Base/GooglePhotosServiceBase.cs @@ -148,7 +148,7 @@ public async Task LoginAsync() _logger.LogDebug("Authorisation granted or not required (if the saved access token already available)"); - if (credential.Token.IsExpired(credential.Flow.Clock)) + if (credential.Token.IsStale) { _logger.LogWarning("The access token has expired, refreshing it"); if (await credential.RefreshTokenAsync(CancellationToken.None)) @@ -240,7 +240,7 @@ public Task> GetSharedAlbumsAsync(int pageSize = defaultPageSizeAlbu string GetUrl(string uri, int? pageSize = defaultPageSizeAlbums, bool excludeNonAppCreatedData = false, string? pageToken = null) { - var queryParams = new Dictionary(3); + var queryParams = new Dictionary(3); if (pageSize.HasValue && pageSize != defaultPageSizeAlbums) queryParams.Add(nameof(pageSize), pageSize.Value.ToString()); if (excludeNonAppCreatedData) queryParams.Add(nameof(excludeNonAppCreatedData), excludeNonAppCreatedData.ToString()); if (!string.IsNullOrWhiteSpace(pageToken)) queryParams.Add(nameof(pageToken), pageToken!);//todo: nullability look further into this