Sharpener.Stratus
0.0.3
See the version list below for details.
dotnet add package Sharpener.Stratus --version 0.0.3
NuGet\Install-Package Sharpener.Stratus -Version 0.0.3
<PackageReference Include="Sharpener.Stratus" Version="0.0.3" />
<PackageVersion Include="Sharpener.Stratus" Version="0.0.3" />
<PackageReference Include="Sharpener.Stratus" />
paket add Sharpener.Stratus --version 0.0.3
#r "nuget: Sharpener.Stratus, 0.0.3"
#:package Sharpener.Stratus@0.0.3
#addin nuget:?package=Sharpener.Stratus&version=0.0.3
#tool nuget:?package=Sharpener.Stratus&version=0.0.3
Sharpener Stratus API NuGet
This package provides a simple set of tools for interacting with
the GTP Stratus API. It provides Client types that are used as first class
citizens that are grouped according to endpoints. For example, on the API, there are Company and Model sets of
endpoints (once referred to as controllers). So for each, there are now also CompanyClient and ModelClient types.
The tooling in this package contains data types for requests and responses, as well as putting the ceremony of each HTTP
request behind a client method. So, if you wanted to get a report for a specific model, you previously might have
written the code to create a new HttpClient, set the base url, set the headers, set the path and query parameters,
send the request, handle the various responses that may have been returned, and then finally multiplied the complexity
sevenfold by adding retry logic with appropriate backoff.
Now, assuming you have an IHttpClientFactory and your Stratus app key, it can look like this.
var modelClient = new ModelClient(httpClientFactory);
var report = await modelClient.GetModelReport(appKey, modelId, reportId);
if(report.IsError) return null;
return report.Value;
Behind the scenes, it handles retry logic and http client management.
Notes
This package currently is in the beginning phase. Standards of practice are being put into place so that future work can be fast, since the Stratus API is quite large. As of this writing, there are only a handful of endpoints available. However, it should be noted that the approach is settling in and there will soon be a full effort to fill them all out.
Testing
For manual testing, a Blazor project has been created in order for developers to easily write interfaces to test the endpoints that they create. The intent is to keep the sample web app as stock as possible, but libraries like Tailwind may be added in the future. The backend is still C#, but it's much easier to toss something together in this framework than it is in things like WPF or MAUI.
Standards as-yet to be determined:
Whereexpression visitors will be useful for allowing a more programmatic interaction with the common "where" query that often appears in paginated responses. But for now, manually written where queries are supported.- Composition will be leaned into heavily as we identify more and more "compositions" that are present in the Stratus
API. That is to say, where you see repeated sets of associated properties, we will create an interface that outlines
what those sets of properties or methods do, and then attribute them to the implementations. Ideally, I would like
response types to have several interfaces apiece that they employ. For example
StratusFoo : IIdentified, IDated
Contributing
If you would like to contribute, please create an issue in the GitHub repository and wait for feedback. If it is approved, you can create a new branch from that ticket and then create a PR when complete. Preference between rebase and merge isn't very strong, just be pragmatic in your choices. Please be as detailed in your PR as possible, including writing comments on your own PR to give hints and guidance for the code review. Thank you.
| 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.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
- Sharpener.Rest (>= 1.0.3)
- System.Memory (>= 4.6.3)
- System.Text.Json (>= 9.0.9)
-
net8.0
- Sharpener.Rest (>= 1.0.3)
-
net9.0
- Sharpener.Rest (>= 1.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.