Sharpener.Stratus
0.0.1
See the version list below for details.
dotnet add package Sharpener.Stratus --version 0.0.1
NuGet\Install-Package Sharpener.Stratus -Version 0.0.1
<PackageReference Include="Sharpener.Stratus" Version="0.0.1" />
<PackageVersion Include="Sharpener.Stratus" Version="0.0.1" />
<PackageReference Include="Sharpener.Stratus" />
paket add Sharpener.Stratus --version 0.0.1
#r "nuget: Sharpener.Stratus, 0.0.1"
#:package Sharpener.Stratus@0.0.1
#addin nuget:?package=Sharpener.Stratus&version=0.0.1
#tool nuget:?package=Sharpener.Stratus&version=0.0.1
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 3 endpoints available. Ping, Get Model by ID, and Get Model Report by their IDs. However, it should be noted that the approach is settling in and there will soon be a full effort to fill them all out.
Standards as-yet to be determined:
- Auto camel casing of some properties.
- This may seem simple. It's not. You can set
System.Text.Jsonto globally use camel casing on DTOs, but I'm not interested in forcing that behavior throughout the entire app stack. I will probably be creating a class or property attribute that automatically camel cases properties. For the meantime, I'm explicitly callingJsonPropertyNameand providing it. But I want the data types in library to feel first class. So the data types themselves will not be using camel case.
- This may seem simple. It's not. You can set
- Testing is very immature
- For the moment, you can test your work in the test project by manually supplying your app key and the IDs you need for the calls you want. However, these test projects should be used for unit and integration testing later on. I intend to build a thin UI where a developer can input the values that they want to test against the classes and endpoints that they are contributing. But for starting out, it's a little backwards.
- 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 : IHasId, IDateTimeLifecycle
Contributing
This is the early stages of this project, so it may not be the best time yet to get involved, but as the shape of this effort begins to flesh out, you may find yourself wanting to contribute. It is most welcome. It is a large API that will likely require responsiveness on our part so that we can stay up to date with the current version of the API. Help will be most appreciated as the maintainability of this project grows more imposing.
| 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 was computed. 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.2)
- System.Memory (>= 4.6.3)
- System.Text.Json (>= 9.0.8)
-
net8.0
- Sharpener.Rest (>= 1.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.