ContentTools.Net
1.0.0.1
See the version list below for details.
dotnet add package ContentTools.Net --version 1.0.0.1
NuGet\Install-Package ContentTools.Net -Version 1.0.0.1
<PackageReference Include="ContentTools.Net" Version="1.0.0.1" />
paket add ContentTools.Net --version 1.0.0.1
#r "nuget: ContentTools.Net, 1.0.0.1"
// Install ContentTools.Net as a Cake Addin #addin nuget:?package=ContentTools.Net&version=1.0.0.1 // Install ContentTools.Net as a Cake Tool #tool nuget:?package=ContentTools.Net&version=1.0.0.1
ContentTools .NET SDK
.Net SKD for ContentTools Rest API.
NuGet Package: https://www.nuget.org/packages/ContentTools.Net/
About ContentTools
It's a CMS platform to centralize content marketing operation: plan, manage, collaborate, publish. All in one place giving up email threads, spreadsheets, and lack of data.
Further information: https://contentools.com
About Contentools Integration API Version 1
With Contentools Integration API, one can make requests to our software through a defined endpoint and retrieve data from their project. As of the API version 1, it is only possible to retrieve data through GET requests as long as it is an authenticated request. The request should be filled in the following format, adjusting with the company name as present in the software URL and desired endpoint.
For instance: https://[accountname].contentools.com/api/v1/[endpoint] Every response will come in JSON format with the data organized in Javascript objects.
For more information see V1 API Documentation.
About ContentTools .NET SDK
It's a SDK Rest API developed in .Net Framework 4.6+ consuming Contentools API Version 1.
Dependencies
- .Net framework 4.6.1
- Newtonsoft.Json 12.0.2
- RestSharp 106.6.10
How to setup it
Just call the method ContentToolClient(string baseUrl, string token, string emailAccount, int projectId) with the following parameters:
- baseUrl = https://[accountname].contentools.com/api/v1/[endpoint]
- token = The API Token that needs to configure on ContentTools platform. For more information see here.
- emailAccount = Your email account on Content Tools platform.
- projectId = Your content project id on Content Tools.
In ContentTools.Client console project there is a good example using appSettings keys.
Returning values
After setup, the object instanced ContentToolClient has the property Posts that connects to endpoint public_content. Using the method Get() it's enough to return contents from ContentTools.
ContentToolClient client = new ContentToolClient(baseUrl, token, emailAccount, projectId);
var posts = client.Posts.Get();
Using filters
Use the method AddFilter() with the following signatures to filter contents:
void AddFilter(ContentType contentType);
void AddFilter(Paginate paginate);
void AddFilter(bool getDeletedContents = true);
void AddFilter(Status status);
void AddFilter(DateTime? dategt, DateTime? datelt)
ContentType filter
A Enum with the following definations:
[Description("blog-post")]
blogpost,
[Description("page")]
page,
[Description("social-post")]
socialpost,
[Description("webinar")]
webinar,
[Description("ebook")]
ebook,
[Description("Newsletter")]
newsletter
Paginate filter
A class with two main properties that possibiliy paginate data. Limit to define how many contents should be returned and Offset a number of contents to skip.
public int Limit { get; set; }
public int Offset { get; set; }
GetDeletedContents filter
A boolean property to able Rest API return deleted contents. False is default
bool getDeletedContents = false
Status filter
A Enum with the following definations:
[Description("In progress")]
InProgress = 1,
[Description("Finished")]
Finished = 2,
[Description("Archived")]
Archived = 3,
[Description("Published")]
Published = 4,
[Description("Delayed")]
Delayed = 5,
[Description("Scheduled")]
Scheduled = 6
DateTime filter
A date range with optional startDate and endDate.
DateTime? dategt, DateTime? datelt`
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- Newtonsoft.Json (>= 12.0.2)
- RestSharp (>= 106.6.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Summary of changes made in this release of the package.