Skip to content

Commit

Permalink
Merge pull request #93 from at0dd/updates
Browse files Browse the repository at this point in the history
Add .net 8, update packages
  • Loading branch information
at0dd committed Dec 8, 2023
2 parents 95a17c6 + c8ab40b commit f5d8376
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore TeslaAPI.sln
Expand Down
4 changes: 2 additions & 2 deletions src/ITeslaAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ public interface ITeslaAPI
/// </summary>
/// <param name="client">The <see cref="HttpClient"/> to make the request with.</param>
/// <param name="vehicleID">The ID of the <see cref="Vehicle"/>.</param>
/// <param name="which_trunk">Which trunk to open/close. rear and front are the only options.</param>
/// <param name="whichTrunk">Which trunk to open/close. rear and front are the only options.</param>
/// <returns>Returns a <see cref="CommandResponse"/>.</returns>
Task<CommandResponse> ActuateTrunkAsync(HttpClient client, string vehicleID, string which_trunk);
Task<CommandResponse> ActuateTrunkAsync(HttpClient client, string vehicleID, string whichTrunk);

/// <summary>
/// Controls the windows. Will vent or close all windows simultaneously.
Expand Down
4 changes: 2 additions & 2 deletions src/TeslaAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,11 @@ public Task<CommandResponse> DoorsLockAsync(HttpClient client, string vehicleID)
}

/// <inheritdoc/>
public Task<CommandResponse> ActuateTrunkAsync(HttpClient client, string vehicleID, string which_trunk)
public Task<CommandResponse> ActuateTrunkAsync(HttpClient client, string vehicleID, string whichTrunk)
{
Dictionary<string, object> body = new Dictionary<string, object>
{
{ "which_trunk", which_trunk },
{ "which_trunk", whichTrunk },
};

HttpRequestMessage request = BuildRequest(HttpMethod.Post, $"{OwnerApiBaseUrl}{ApiV1}/vehicles/{vehicleID}/command/actuate_trunk", body: body);
Expand Down
8 changes: 4 additions & 4 deletions src/TeslaAPI.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>Tesla-API</PackageId>
<Version>1.1.1</Version>
<Version>1.1.2</Version>
<Authors>Alex Todd</Authors>
<NeutralLanguage>en-US</NeutralLanguage>
<License>https://github.com/at0dd/tesla-api/blob/main/LICENSE</License>
Expand All @@ -18,7 +18,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<ReleaseVersion>1.1.1</ReleaseVersion>
<ReleaseVersion>1.1.2</ReleaseVersion>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -51,7 +51,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
14 changes: 7 additions & 7 deletions tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<ReleaseVersion>1.1.1</ReleaseVersion>
<ReleaseVersion>1.1.2</ReleaseVersion>

<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
Expand All @@ -21,8 +21,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand All @@ -34,9 +34,9 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
<PackageReference Include="Xunit.DependencyInjection" Version="8.9.0" />
</ItemGroup>

Expand Down
1 change: 0 additions & 1 deletion tests/VehicleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ namespace Tests;

using Microsoft.Extensions.Options;
using TeslaAPI;
using TeslaAPI.Models.Response;
using TeslaAPI.Models.Vehicles;
using Tests.Models;
using Xunit;
Expand Down

0 comments on commit f5d8376

Please sign in to comment.