contentstack.csharp
1.0.6
See the version list below for details.
dotnet add package contentstack.csharp --version 1.0.6
NuGet\Install-Package contentstack.csharp -Version 1.0.6
<PackageReference Include="contentstack.csharp" Version="1.0.6" />
paket add contentstack.csharp --version 1.0.6
#r "nuget: contentstack.csharp, 1.0.6"
// Install contentstack.csharp as a Cake Addin #addin nuget:?package=contentstack.csharp&version=1.0.6 // Install contentstack.csharp as a Cake Tool #tool nuget:?package=contentstack.csharp&version=1.0.6
Getting Started
This guide will help you get started with our .NET SDK to build apps powered by Contentstack.
SDK Installation and Setup
To use the .NET SDK, download it from here
Open the terminal and install the contentstack module via ‘Package Manager’ command
PM> Install-Package contentstack.csharp
And via ‘.Net CLI’
dotnet add package contentstack.csharp
To use the module in your application, you need to first Add Namespace to your class
using Contentstack.Core; // ContentstackClient
using Contentstack.Core.Models; // Stack, Query, Entry, Asset, ContentType
Initialize SDK
You will need to specify the API key, Access token, and Environment Name of your stack to initialize the SDK:
// Initialize the Contentstack
Stack Stack stack = ContentstackClient.Stack("api_key", "access_token", "enviroment_name");
Once you have initialized the SDK, you can start getting content in your app.
Basic Queries
Get a Single Entry
To retrieve a single entry from a content type, use the code snippet given below:
Entry entry = stack.ContentType("blog").Entry("blta464e9fbd048668c");
entry.Fetch().ContinueWith((t) => {
if (!t.IsFaulted) {
Console.WriteLine("entry:" + t.Result);
}
});
Get Multiple Entries
To retrieve multiple entries of a particular content type, use the code snippet given below:
Query query = stack.ContentType("blog").Query();
query.Where("title", "welcome");
query.IncludeSchema();
query.IncludeCount();
query.ToJSON();
query.Find().ContinueWith((t) => {
if (!t.IsFaulted) {
Entry[] result = t.Result.Result; Console.WriteLine("result" + result);
}
});
These were example of some of the basic queries of the SDK. For advanced queries, refer to our API reference documentation by visiting the link given below.
Next steps
Refer to .Net SDK Api Documentation Reference to learn how to execute advanced queries.
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 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. 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. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.4 is compatible. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 was computed. 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 | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 1.4
- Markdig (>= 0.15.0)
- Microsoft.Extensions.Options (>= 1.1.2)
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 11.0.2)
- System.Net.Requests (>= 4.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on contentstack.csharp:
Package | Downloads |
---|---|
contentstack.aspnetcore
Main release |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.20.0 | 2,091 | 12/20/2024 |
2.19.0 | 643 | 12/5/2024 |
2.18.0 | 1,168 | 11/14/2024 |
2.17.0 | 2,427 | 10/24/2024 |
2.16.0 | 5,313 | 10/11/2024 |
2.15.0 | 2,659 | 9/12/2024 |
2.14.0 | 16,178 | 5/24/2024 |
2.13.0 | 2,537 | 4/19/2024 |
2.12.0 | 1,023 | 2/2/2024 |
2.11.0 | 445,063 | 9/27/2023 |
2.10.0 | 23,383 | 3/8/2023 |
2.9.0 | 67,790 | 9/9/2022 |
2.8.0 | 121,483 | 1/14/2022 |
2.7.0 | 3,953 | 12/8/2021 |
2.6.2 | 5,200 | 7/16/2021 |
2.6.1 | 6,160 | 4/9/2021 |
2.6.0 | 835 | 4/6/2021 |
2.5.0 | 3,848 | 12/5/2020 |
2.4.1-alpha | 819 | 11/11/2020 |
2.4.0 | 10,728 | 8/12/2020 |
2.3.0 | 1,621 | 6/22/2020 |
2.2.1 | 22,164 | 2/17/2020 |
2.2.0 | 1,125 | 11/15/2019 |
2.1.1 | 2,488 | 9/3/2019 |
2.1.0 | 1,250 | 7/29/2019 |
2.0.0 | 1,376 | 6/28/2019 |
1.1.0 | 14,180 | 4/12/2019 |
1.0.6 | 3,587 | 8/10/2018 |
1.0.5-alpha | 1,528 | 5/31/2018 |
1.0.4-alpha | 2,571 | 5/31/2018 |
1.0.3-alpha | 2,802 | 5/30/2018 |
1.0.2-alpha | 1,407 | 5/29/2018 |
1.0.1-alpha | 1,323 | 5/29/2018 |
1.0.0 | 1,832 | 6/1/2018 |
Localization support for Query and Entry is added.