contentstack.csharp 1.0.6

.NET SDK for the Contentstack Content Delivery API.

There is a newer version of this package available.
See the version list below for details.
Install-Package contentstack.csharp -Version 1.0.6
dotnet add package contentstack.csharp --version 1.0.6
<PackageReference Include="contentstack.csharp" Version="1.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add contentstack.csharp --version 1.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: contentstack.csharp, 1.0.6"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// 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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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.

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.

Release Notes

Localization support for Query and Entry is added.

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 History

Version Downloads Last updated
2.6.1 95 4/9/2021
2.6.0 58 4/6/2021
2.5.0 1,122 12/5/2020
2.4.1-alpha 103 11/11/2020
2.4.0 3,365 8/12/2020
2.3.0 738 6/22/2020
2.2.1 6,435 2/17/2020
2.2.0 266 11/15/2019
2.1.1 623 9/3/2019
2.1.0 319 7/29/2019
2.0.0 508 6/28/2019
1.1.0 9,709 4/12/2019
1.0.6 2,091 8/10/2018
1.0.5-alpha 501 5/31/2018
1.0.4-alpha 545 5/31/2018
1.0.3-alpha 571 5/30/2018
1.0.2-alpha 506 5/29/2018
1.0.1-alpha 457 5/29/2018
1.0.0 690 6/1/2018
Show less