IntelligentPlant.IndustrialAppStore.CommandLine
3.1.0
dotnet add package IntelligentPlant.IndustrialAppStore.CommandLine --version 3.1.0
NuGet\Install-Package IntelligentPlant.IndustrialAppStore.CommandLine -Version 3.1.0
<PackageReference Include="IntelligentPlant.IndustrialAppStore.CommandLine" Version="3.1.0" />
paket add IntelligentPlant.IndustrialAppStore.CommandLine --version 3.1.0
#r "nuget: IntelligentPlant.IndustrialAppStore.CommandLine, 3.1.0"
// Install IntelligentPlant.IndustrialAppStore.CommandLine as a Cake Addin #addin nuget:?package=IntelligentPlant.IndustrialAppStore.CommandLine&version=3.1.0 // Install IntelligentPlant.IndustrialAppStore.CommandLine as a Cake Tool #tool nuget:?package=IntelligentPlant.IndustrialAppStore.CommandLine&version=3.1.0
IntelligentPlant.IndustrialAppStore.CommandLine
This package contains types for authenticating with and calling the Intelligent Plant Industrial App Store API from command-line applications.
Please consider using the IntelligentPlant.IndustrialAppStore.Templates package to simplify creation of projects that are pre-configured to use this package.
Getting Started
First, visit the Industrial App Store and create a registration for your app. When you register your app, you can configure the default scopes (i.e. permissions) that the app will request (user info, reading user data sources, etc). You must also enable the Device Code Authorization Flow for your app.
Next, register CLI services with the dependency injection container:
services.AddIndustrialAppStoreCliServices(options => {
options.ClientId = "<YOUR CLIENT ID>";
// Base folder for application data such as encrypted authentication
// tokens. Relative paths are resolved using the user's local
// application data folder.
options.AppDataPath = "MyIasApp";
});
Next, build the service provider and ensure that a valid Industrial App Store authentication session is available:
var provider = services.BuildServiceProvider();
using var scope = provider.CreateScope();
var sessionManager = scope.ServiceProvider.GetRequiredService<IndustrialAppStoreSessionManager>();
await sessionManager.SignInAsync((request, ct) => {
Console.WriteLine($"Please sign in by visiting {request.VerificationUri} and entering the following code: {request.UserCode}");
return default;
});
Finally, use the IndustrialAppStoreHttpClient
service to interact with the Industrial App Store APIs:
var client = scope.ServiceProvider.GetRequiredService<IndustrialAppStoreHttpClient>();
var dataSources = await client.DataSources.GetDataSourcesAsync();
Persisting Application Data
If your application persists data to disk, you can use the AppDataFolderProvider
service to get the base path for your app's data folder:
var appDataDir = scope.ServiceProvider.GetRequiredService<AppDataFolderProvider>().AppDataFolder;
var myDataDir = appDataDir.CreateSubdirectory("MyData");
Encrypted authentication tokens are saved to a sub-folder of the base folder provided by AppDataFolderProvider
.
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 is compatible. 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. 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.0
- IntelligentPlant.IndustrialAppStore.DependencyInjection (>= 3.1.0)
- IntelligentPlant.IndustrialAppStore.HttpClient (>= 3.1.0)
- Microsoft.AspNetCore.DataProtection (>= 8.0.11)
- Microsoft.Bcl.TimeProvider (>= 8.0.1)
- Nito.AsyncEx.Coordination (>= 5.1.2)
-
net8.0
- IntelligentPlant.IndustrialAppStore.DependencyInjection (>= 3.1.0)
- IntelligentPlant.IndustrialAppStore.HttpClient (>= 3.1.0)
- Microsoft.AspNetCore.DataProtection (>= 8.0.11)
- Microsoft.Bcl.TimeProvider (>= 8.0.1)
- Nito.AsyncEx.Coordination (>= 5.1.2)
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 |
---|---|---|
3.1.0 | 113 | 12/12/2024 |
3.0.0 | 86 | 11/27/2024 |
3.0.0-pre.361 | 42 | 11/20/2024 |
3.0.0-pre.358 | 41 | 11/20/2024 |
3.0.0-pre.351 | 41 | 11/15/2024 |
3.0.0-pre.348 | 59 | 11/11/2024 |
3.0.0-pre.339 | 47 | 11/7/2024 |