FoodDataCentralSDK 1.0.5
dotnet add package FoodDataCentralSDK --version 1.0.5
NuGet\Install-Package FoodDataCentralSDK -Version 1.0.5
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="FoodDataCentralSDK" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FoodDataCentralSDK" Version="1.0.5" />
<PackageReference Include="FoodDataCentralSDK" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FoodDataCentralSDK --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FoodDataCentralSDK, 1.0.5"
#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.
#:package FoodDataCentralSDK@1.0.5
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FoodDataCentralSDK&version=1.0.5
#tool nuget:?package=FoodDataCentralSDK&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FoodDataCentral.NET
A .NET Standard library for interacting with the US Department of Agriculture's FoodData Central API
Installation
You can use FoodDataCentral.NET in your package by installing the NuGet package.
Install-Package FoodDataCentralSDK
Note you will need a data.gov API key. You can obtain a key here.
Usage
using IO.FoodDataCentralSDK;
using IO.FoodDataCentral.Models;
...
// Create the API client
var api = new FoodDataCentralAPI("YOUR_API_KEY");
// Search for foods with the query "big mac"
SearchResult searchResults = await api.Search("big mac");
// Get details of a food
Food food = await api.GetFoodById(170720);
// Get protein of selected food
float proteinGrams = food.FoodNutrients[NutrientType.Protein].Amount;
Licence
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- JsonSubTypes (>= 1.2.0)
- NewtonSoft.Json (>= 13.0.1)
- NUnit (>= 4.1.0)
- RestSharp (>= 105.1.0)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.Text.Json (>= 7.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.