TeslaInventoryNet 1.4.1
dotnet add package TeslaInventoryNet --version 1.4.1
NuGet\Install-Package TeslaInventoryNet -Version 1.4.1
<PackageReference Include="TeslaInventoryNet" Version="1.4.1" />
paket add TeslaInventoryNet --version 1.4.1
#r "nuget: TeslaInventoryNet, 1.4.1"
// Install TeslaInventoryNet as a Cake Addin #addin nuget:?package=TeslaInventoryNet&version=1.4.1 // Install TeslaInventoryNet as a Cake Tool #tool nuget:?package=TeslaInventoryNet&version=1.4.1
Retrieves real-time inventory from Tesla.
Usage
class Program
{
static void Main(string[] args)
{
var loggerFactory = LoggerFactory.Create(builder => {
builder.AddConsole();
builder.AddFilter(level => level >= LogLevel.Debug);
});
var logger = loggerFactory.CreateLogger<Program>();
var tesla = new TeslaInventory(loggerFactory.CreateLogger<TeslaInventory>());
tesla.Search(Location.US, new SearchCriteria() { Model = "m3", Condition = "used", Count = 100},
(results) => {
logger.LogInformation($"Found {results.TotalMatchesFound} vehicles total, {results.Vehicles.Length} vehicles returned");
foreach (var result in results.Vehicles)
{
logger.LogInformation(result.DetailsUrl
+ $"\n{result.Year} {result.Model}"
+ $"\n{result.TrimName}" + (result.IsDemo ? " Demo" : "")
+ $"\n{result.OptionCodeData.Where(x => x.Group == "PAINT").Select(x => x.Name).FirstOrDefault()}"
+ (result.Autopilot.Contains("AUTOPILOT_FULL_SELF_DRIVING") ? "\nFull Self-Driving Capability" : "")
+ $"\nFactory: {result.FactoryCode}"
+ $"\n{result.City}, {result.StateProvince}"
+ $"\n{result.CompositorUrls.FrontView}");
}
});
}
}
Sample output:
https://www.tesla.com/m3/order/5YJ3E1EB8KF533636
2019 m3
Long Range All-Wheel Drive Performance
Deep Blue Metallic
Full Self-Driving Capability
Factory: GF00
Seattle, WA
https://static-assets.tesla.com/v1/compositor/?model=m3&view=STUD_3QTR&size=1441&bkba_opt=2&options=$MT304,$MT304,$MT304,$APF2,$APBS,$BC3R,$DV4W,$IN3PB,$PPSB,$PRM31,$SC04,$MDL3,$W32P,$SLR1,$MT304,$PL31,$SPT31,$CPF0,$RSF1
API
TeslaInventory(logger, [Optional]restClientImpl])
logger
Type: ILogger<TeslaInventory>
<br/>The logger to use to log any debug/info messages
restClientImpl
Type: IRestClient
<br/>An optional IRestClient
implementation to use for invoking API calls
Search(location, searchCriteria)
location
Type: Location
<br/>An instance of a Location
object that represents the country/region to be searched.
searchCriteria
Type: SearchCriteria
<br/>The search criteria to perform the search against.
Model
: m3 | ms | my | mxCondition
: new | usedCount
: The number of results to return. Default is 20Offset
: For paging, the index into the total results to begin from
License
TeslaInventoryNet © Brad Walker, released under the MIT License.<br> Authored and maintained by Brad Walker with help from contributors.
GitHub Brad Walker · Twitter @braddwalker
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.Logging (>= 3.1.19)
- Newtonsoft.Json (>= 13.0.1)
- RestSharp (>= 106.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.4.1 | 451 | 10/6/2022 |
1.4.0 | 369 | 10/6/2022 |
1.3.18 | 314 | 12/27/2021 |
1.3.16 | 344 | 11/1/2021 |
1.3.15 | 389 | 10/31/2021 |
1.3.14 | 415 | 10/30/2021 |
1.3.13 | 306 | 10/25/2021 |
1.3.12 | 328 | 10/22/2021 |
1.3.11 | 306 | 10/22/2021 |
1.3.10 | 315 | 10/22/2021 |
1.3.9 | 336 | 10/21/2021 |
1.3.8 | 319 | 10/20/2021 |
1.3.7 | 329 | 10/20/2021 |
1.3.6 | 327 | 10/20/2021 |
1.3.5 | 392 | 10/17/2021 |
1.3.4 | 340 | 10/8/2021 |
1.3.3 | 377 | 10/7/2021 |
1.3.2 | 294 | 10/7/2021 |
1.3.1 | 308 | 10/6/2021 |
1.3.0 | 310 | 10/6/2021 |
1.2.2 | 315 | 10/5/2021 |
1.2.1 | 333 | 10/4/2021 |
1.2.0 | 343 | 10/4/2021 |
1.1.0 | 358 | 10/4/2021 |
1.0.0 | 348 | 10/4/2021 |
Initial release