Skip to content

Commit

Permalink
Add changes due to GarminConnectClient API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Abász committed Sep 11, 2022
1 parent 5c250cc commit 8772ad6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
Binary file modified Libs/Fit.dll
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);1591</NoWarn>
<Version>0.2.0</Version>
<Version>0.2.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ private static GarminConnectClient.Lib.IConfiguration SetupConfiguration(string
.AddInMemoryCollection(
new Dictionary<string, string>
{
["AppConfig:Username"] = userName,
["AppConfig:Password"] = password,
["AppConfig:BackupDir"] = _tmpDir,
});
IConfigurationRoot configuration = builder.Build();
Expand Down Expand Up @@ -105,7 +103,7 @@ async public static Task<bool> UploadAsync(GarminWeightScaleDTO weightScaleDTO,
var configuration = SetupConfiguration(weightScaleDTO.Email, weightScaleDTO.Password);
var logger = LoggerFactory.Create(logging => logging.AddConsole()).CreateLogger<Client>();
var client = new Client(configuration, logger);
await client.Authenticate();
await client.Authenticate(weightScaleDTO.Email, weightScaleDTO.Password);
if (!(await client.UploadActivity(fitFilePath, new FileFormat { FormatKey = "fit" })).Success)
{
throw new Exception("Error while uploading uploading Garmin Connect");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Libs\Fit.dll</HintPath>
</Reference>
<Reference Include="FitFileConverter.ClassLibrary, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="FitFileConverter.ClassLibrary, Culture=neutral">
<HintPath>..\..\Libs\FitFileConverter.ClassLibrary.dll</HintPath>
</Reference>
<ProjectReference Include="..\..\src\GarminWeightScaleUploader.Lib\GarminWeightScaleUploader.Lib.csproj"/>
Expand Down

0 comments on commit 8772ad6

Please sign in to comment.