Ocelli.OpenMETRC 1.1.4

Suggested Alternatives

OpenMETRC.V1

Additional Details

The package name has been simplified and with the new V2 of the METRC API, the V1 and V2 versions have been split into new packages.

There is a newer version of this package available.
See the version list below for details.
dotnet add package Ocelli.OpenMETRC --version 1.1.4                
NuGet\Install-Package Ocelli.OpenMETRC -Version 1.1.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ocelli.OpenMETRC" Version="1.1.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ocelli.OpenMETRC --version 1.1.4                
#r "nuget: Ocelli.OpenMETRC, 1.1.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Ocelli.OpenMETRC as a Cake Addin
#addin nuget:?package=Ocelli.OpenMETRC&version=1.1.4

// Install Ocelli.OpenMETRC as a Cake Tool
#tool nuget:?package=Ocelli.OpenMETRC&version=1.1.4                

Open:METRC

This is the final product that is published to NuGet. It contains several features that do not come out of the box with an OpenAPI code generator. These features include:

  • Credential Management: Just make life easier when maintaining what credentials work with which state.
  • Rate Limiting: While not perfect, it is much better than nothing. Writing your own rate limiter with the rules required is not the most Google-able thing.
  • State/Endpoint Validation: Not every state has every endpoint. OpenMETRC knows what endpoints work where and will cut down on the errors that you may get from METRC.

Change Log

  • 1.1.4
    • Added properties to objects from METRC.
      • FacilityType: CanRecordProcessingJobs, CanClonePlantBatches
      • Package: SourceHarvestCount, SourcePackageCount, SourceProcessingJobCount
      • PlantBatch: SourcePlantBatchIds, SourcePlantBatchNames, MultiPlantBath
    • Status 503 (Service Unavailable) no longer to return a message.

Development Notes

This tool uses the .NET Connected Service (based on NSwag) to generate the client code base don the OpenApi spec. While this automated feature is invaluable when doing this type of development, it does have a drawback. The client code is only generated once. If the generated code already exists, it will not be re-created. So, if you are making changes to the OpenAPI spec and you need a new version of the client generated, just delete the bin/ directory and rebuild the project.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.