Skip to content

Commit

Permalink
Merge pull request #8 from JSkimming/get-charge-state
Browse files Browse the repository at this point in the history
Added the Get Vehicle State API
  • Loading branch information
JSkimming authored Jan 8, 2018
2 parents 6b4b343 + 39b4365 commit 26bd0dd
Show file tree
Hide file tree
Showing 10 changed files with 1,385 additions and 10 deletions.
45 changes: 39 additions & 6 deletions src/Tesla.NET/ITeslaClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ Task<MessageResponse<ResponseDataWrapper<IReadOnlyList<Vehicle>>>> GetVehiclesAs
CancellationToken cancellationToken = default);

/// <summary>
/// Gets the <see cref="VehicleState"/> of the <see cref="Vehicle"/> with the specified
/// Gets the <see cref="ChargeState"/> of the <see cref="Vehicle"/> with the specified
/// <see cref="Vehicle.Id"/>.
/// </summary>
/// <param name="vehicleId">The unique <see cref="Vehicle.Id"/> of a <see cref="Vehicle"/>.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken" /> to observe while waiting for a task to
/// complete.</param>
/// <returns>
/// The <see cref="VehicleState"/> of the <see cref="Vehicle"/> with the specified <see cref="Vehicle.Id"/>.
/// The <see cref="ChargeState"/> of the <see cref="Vehicle"/> with the specified <see cref="Vehicle.Id"/>.
/// </returns>
Task<MessageResponse<ResponseDataWrapper<VehicleState>>> GetVehicleStateAsync(
Task<MessageResponse<ResponseDataWrapper<ChargeState>>> GetChargeStateAsync(
long vehicleId,
CancellationToken cancellationToken = default);

/// <summary>
/// Gets the <see cref="VehicleState"/> of the <see cref="Vehicle"/> with the specified
/// Gets the <see cref="ChargeState"/> of the <see cref="Vehicle"/> with the specified
/// <see cref="Vehicle.Id"/>.
/// </summary>
/// <param name="vehicleId">The unique <see cref="Vehicle.Id"/> of a <see cref="Vehicle"/>.</param>
Expand All @@ -63,9 +63,9 @@ Task<MessageResponse<ResponseDataWrapper<VehicleState>>> GetVehicleStateAsync(
/// <param name="cancellationToken">A <see cref="CancellationToken" /> to observe while waiting for a task to
/// complete.</param>
/// <returns>
/// The <see cref="VehicleState"/> of the <see cref="Vehicle"/> with the specified <see cref="Vehicle.Id"/>.
/// The <see cref="ChargeState"/> of the <see cref="Vehicle"/> with the specified <see cref="Vehicle.Id"/>.
/// </returns>
Task<MessageResponse<ResponseDataWrapper<VehicleState>>> GetVehicleStateAsync(
Task<MessageResponse<ResponseDataWrapper<ChargeState>>> GetChargeStateAsync(
long vehicleId,
string accessToken,
CancellationToken cancellationToken = default);
Expand Down Expand Up @@ -102,5 +102,38 @@ Task<MessageResponse<ResponseDataWrapper<DriveState>>> GetDriveStateAsync(
long vehicleId,
string accessToken,
CancellationToken cancellationToken = default);

/// <summary>
/// Gets the <see cref="VehicleState"/> of the <see cref="Vehicle"/> with the specified
/// <see cref="Vehicle.Id"/>.
/// </summary>
/// <param name="vehicleId">The unique <see cref="Vehicle.Id"/> of a <see cref="Vehicle"/>.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken" /> to observe while waiting for a task to
/// complete.</param>
/// <returns>
/// The <see cref="VehicleState"/> of the <see cref="Vehicle"/> with the specified <see cref="Vehicle.Id"/>.
/// </returns>
Task<MessageResponse<ResponseDataWrapper<VehicleState>>> GetVehicleStateAsync(
long vehicleId,
CancellationToken cancellationToken = default);

/// <summary>
/// Gets the <see cref="VehicleState"/> of the <see cref="Vehicle"/> with the specified
/// <see cref="Vehicle.Id"/>.
/// </summary>
/// <param name="vehicleId">The unique <see cref="Vehicle.Id"/> of a <see cref="Vehicle"/>.</param>
/// <param name="accessToken">
/// The access token used to authenticate the request; can be <see langword="null"/> if the authentication is
/// added by default.
/// </param>
/// <param name="cancellationToken">A <see cref="CancellationToken" /> to observe while waiting for a task to
/// complete.</param>
/// <returns>
/// The <see cref="VehicleState"/> of the <see cref="Vehicle"/> with the specified <see cref="Vehicle.Id"/>.
/// </returns>
Task<MessageResponse<ResponseDataWrapper<VehicleState>>> GetVehicleStateAsync(
long vehicleId,
string accessToken,
CancellationToken cancellationToken = default);
}
}
Loading

0 comments on commit 26bd0dd

Please sign in to comment.