cloudcms 1.1.6

dotnet add package cloudcms --version 1.1.6
NuGet\Install-Package cloudcms -Version 1.1.6
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="cloudcms" Version="1.1.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add cloudcms --version 1.1.6
#r "nuget: cloudcms, 1.1.6"
#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 cloudcms as a Cake Addin
#addin nuget:?package=cloudcms&version=1.1.6

// Install cloudcms as a Cake Tool
#tool nuget:?package=cloudcms&version=1.1.6

Cloud CMS C# Driver

The Cloud CMS C# driver is a .NET core client library to facilitate connections to Cloud CMS. The driver handles OAuth authentication and token management, HTTPS calls, and provides convenient methods to perform operations. It works against Cloud CMS instances on our SaaS platform as well as on-premise installations.

Installation

Command Line:

dotnet add package cloudcms

Visual Studio:

Install-Package cloudcms

Connecting to Cloud CMS

To connect to Cloud CMS, use the static CloudCMSDriver.ConnectAsync method. This takes either a file path to a gitana.json file, a JObject json object, dictionary, or ConnectionObject.

The required API key properties for this are:

  • clientKey
  • clientSecret
  • username
  • password
  • baseURL

Connection examples:

string path = "gitana.json";
IPlatform platform1 = await CloudCMSDriver.ConnectAsync(path);

JObject configObj = ...;
IPlatform platform2 = await CloudCMSDriver.ConnectAsync(configObj);

IDictionary<string, string> configDict = ...;
IPlatform platform3 = await CloudCMSDriver.ConnectAsync(configDict);

ConnectionConfig config = ...;
IPlatform platform4 = await CloudCMSDriver.ConnectAsync(config);

Examples

Below are some examples of how you might use this driver:

// Connect to Cloud CMS
string path = "gitana.json";
IPlatform platform = await CloudCMSDriver.ConnectAsync(path);

// Read repository
IRepository repository = await platform.ReadRepositoryAsync("<repositoryId>");

// Read branch
IBranch branch = await repository.ReadBranchAsync("<branchId>");

// Read node
INode node = await branch.ReadNodeAsync("<nodeID>");

// Update node
node.Data["title"] = "A new title";
await node.UpdateAsync();

// Delete node
await node.DeleteAsync();

// Create node
JObject obj = new JObject(
    new JProperty("title", "Twelfth Night"),
    new JProperty("description", "An old play")
);
INode newNode = await branch.CreateNodeAsync(obj);

// Query nodes
JObject query = new JObject(
    new JProperty("_type", "store:book")
);
JObject pagination = new JObject(
    new JProperty("limit", 2)
);
List<INode> queryNodes = await branch.QueryNodesAsync(query, pagination);

// Search/Find nodes
JObject find = new JObject(
    new JProperty("search", "Shakespeare"),
    new JProperty("query",
        new JObject(
            new JProperty("_type", "store:book")
        )
    )
);
List<INode> findNodes = await branch.FindNodesAsync(find, pagination);

Tests

To run the tests for this driver, ensure you have your gitana.json file in the driver directory, then run:

dotnet test

Resources

Support

For information or questions about the C# Driver, please contact Cloud CMS at support@cloudcms.com.

Product 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. 
.NET Core netcoreapp3.1 is compatible. 
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.

Version Downloads Last updated
1.1.6 489 12/14/2021
1.1.5 432 5/24/2021
1.1.4 612 7/13/2020
1.1.3 530 7/13/2020
1.1.2 507 7/13/2020
1.1.1 503 7/9/2020
1.1.0 490 7/8/2020
1.0.4 509 7/2/2020
1.0.3 2,714 1/29/2019
1.0.2 837 1/17/2019
1.0.1 836 1/17/2019
1.0.0 829 1/17/2019