MondaySharp.NET 1.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package MondaySharp.NET --version 1.0.5                
NuGet\Install-Package MondaySharp.NET -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="MondaySharp.NET" Version="1.0.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MondaySharp.NET --version 1.0.5                
#r "nuget: MondaySharp.NET, 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.
// Install MondaySharp.NET as a Cake Addin
#addin nuget:?package=MondaySharp.NET&version=1.0.5

// Install MondaySharp.NET as a Cake Tool
#tool nuget:?package=MondaySharp.NET&version=1.0.5                

MondaySharp.NET

MondaySharp.NET is a powerful and intuitive C# library for interacting with the Monday.com API. With this library, developers can seamlessly integrate Monday.com functionalities into their C# applications, making it easier than ever to manage and automate workflows.

Features

  • Easy Integration: Quickly integrate Monday.com features into your C# projects with a clean and straightforward API.
  • Full API Coverage: Access the complete range of Monday.com API endpoints, allowing you to interact with boards, items, columns, and more.
  • Type-Safe Models: Benefit from type-safe models that reflect the structure of Monday.com entities, providing a robust development experience.
  • Asynchronous Support: Leverage asynchronous methods for non-blocking communication with the Monday.com API, ensuring optimal performance.

Getting Started

The library can be injected via Dependency Injection or you can initialize it manually.

Initializing

services.TryAddMondayClient(options =>
{
    options.EndPoint = new System.Uri(configuration["mondayUrl"]!);
    options.Token = configuration["mondayToken"]!;
});

IMondayClient mondayClient = new MondayClient(this.Logger, options =>
{
    options.EndPoint = new System.Uri(configuration["mondayUrl"]!);
    options.Token = configuration["mondayToken"]!;
});

Reading<br> When binding your row to an object, you can create a record inheriting MondayRow

public record TestRow : MondayRow
{
    [MondayColumnHeader("text0")]
    public ColumnText? Text { get; set; }

    [MondayColumnHeader("numbers9")]
    public ColumnNumber? Number { get; set; }
    public ColumnCheckBox? Checkbox { get; set; }
    public ColumnStatus? Priority { get; set; }
}

If you have a property that doesn't conform to your naming convention, you can simply add the MondayColumnHeader attribute, this will tell the client when attempting to bind the properties at runtime to look for this columnId instead of using the property name.

If you need to include Groups, Assets, Updates you can add them as a property.

Here are some example records that were used during testing to validate Assets, Updates and Group were successfully binding.

public record TestRowWithAssets : TestRow
{
    public List<Asset>? Assets { get; set; }
}
public record TestRowWithUpdates : TestRow
{
    public List<Update>? Updates { get; set; }
}
public record TestRowWithGroup : TestRow
{
    public Group? Group { get; set; }
}

when the library is creating the query to read the item(s), it will detect if there are assets, updates or groups, it will then modify the query as needed.

This way, we are not always requesting the assets, updates or groups, only when you need them.

When required to read a column based from ColumnValues, you can do the following.

ColumnValue[] columnValues =
[
    new ColumnValue()
    {
        Id = "text0",
        Text = "123"
    },
    new ColumnValue()
    {
        Id = "numbers9",
        Text = "1"
    },
];
List<TestRow?> items = await this.MondayClient!.GetBoardItemsAsync<TestRow>(this.BoardId, columnValues).ToListAsync();

This will attempt to find any items for the boardId along with the columnValues. If you need items without using the columnValues, you can simply do the following

This will enumerate each result asynchronously

List<TestRow?> items = await this.MondayClient!.GetBoardItemsAsync<TestRow>(this.BoardId).ToListAsync();

Creating<br> when required to create an item, you can do the following

Item[] items =[
    new Item()
    {
        Name = "Test Item 1",
        ColumnValues =
        [
            new ColumnValue()
            {
                ColumnBaseType = new ColumnText()
                {
                    Id = "text0",
                    Text = "Andrew Eberle"
                },
            },
            new ColumnValue()
            {
                ColumnBaseType = new ColumnNumber()
                {
                    Id = "numbers9",
                    Number = 10
                },
            },
        ]
    },
     new Item()
    {
        Name = "Test Item 2",
        ColumnValues =
        [
            new ColumnValue()
            {
                ColumnBaseType = new ColumnText()
                {
                    Id = "text0",
                    Text = "Eberle Andrew"
                },
            },
            new ColumnValue()
            {
                ColumnBaseType = new ColumnNumber()
                {
                    Id = "numbers9",
                    Number = 11
                },
            },
        ]
    }
];

Dictionary<string, Item>? keyValuePairs = await this.MondayClient!.CreateBoardItemsAsync(BoardId, items);

This will create items into monday with a single request similar to this https://developer.monday.com/api-reference/docs/introduction-to-graphql#sample-mutation-1

There are any column types, some supported, some not as I'm still building the library. Here is a small example pulled from some unit tests.

// Arrange
List<ColumnBaseType> columnValues =
[
    new ColumnDateTime("date", new DateTime(2023, 11, 29)),
    new ColumnText("text0", "Andrew Eberle"),
    new ColumnNumber("numbers", 10),
    new ColumnLongText("long_text7", "hello,world!"),
    new ColumnStatus("status_19", "Test"),
    new ColumnStatus("label", "Test"),
    new ColumnLongText("long_text", "long text with return \n"),
    new ColumnDropDown("dropdown", ["Hello", "World"]),
    new ColumnLink("link", "https://www.google.com", "google!"),
    new ColumnTag("tags", "21057674,21057675"),
    new ColumnTimeline("timeline", new DateTime(2023, 11, 29), new DateTime(2023, 12, 29)),
];

First provide the columnId and then filling the rest.

Here is the interface thusfar. For detailed usage instructions and examples, refer to the Documentation.

Installation

Install the MondaySharp.NET library using NuGet Package Manager:

nuget install MondaySharp.NET

Contributing

We welcome contributions! Please check out our Contributing Guidelines for details on how to get started.

License

MondaySharp.NET is licensed under the MIT License - see the LICENSE file for details.


Feel free to customize this description to better fit the specific features and goals of your MondaySharp.NET library.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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.0.24 234 6/17/2024
1.0.23 149 3/24/2024
1.0.22 101 3/22/2024
1.0.20 99 3/22/2024
1.0.19 129 3/15/2024
1.0.18 1,801 2/20/2024
1.0.17 131 2/8/2024
1.0.16 115 2/8/2024
1.0.15 111 2/8/2024
1.0.14 118 2/8/2024
1.0.13 137 1/17/2024
1.0.12 158 12/27/2023
1.0.11 102 12/27/2023
1.0.10 108 12/27/2023
1.0.9 106 12/27/2023
1.0.8 99 12/26/2023
1.0.7 119 12/24/2023
1.0.6 125 12/24/2023
1.0.5 104 12/23/2023
1.0.4 117 12/23/2023