Skip to content

SeppPenner/CalDAVNet

Repository files navigation

CalDAVNet

CalDAVNet is a project to access CalDAV servers and a fork of https://github.com/markatk/CalDAV.NET.

Build status GitHub issues GitHub forks GitHub stars License: MIT Nuget NuGet Downloads Known Vulnerabilities Gitter Blogger Patreon PayPal

Available for

  • Net 8.0

Net Core and Net Framework latest and LTS versions

Basic usage

using Ical.Net.CalendarComponents;

/// <summary>
/// The main method.
/// </summary>
public static async Task Main()
{
    // Create client.
    var calDavClient = new Client("http://192.168.2.2/caldav.php/user/someid", "user", "password");

    // Get all calendars for the user.
    var calendars = await calDavClient.GetAllCalendars();

    // Get the calendar by the uid.
    var calendarByUid = await calDavClient.GetCalendarByUid("/caldav.php/user/uniqueid/");

    // Get the default calendar.
    var defaultCalendar = await calDavClient.GetDefaultCalendar();

    // Add an event.
    var calendarEvent = new CalendarEvent();
    var added = await calDavClient.AddOrUpdateEvent(calendarEvent, new Ical.Net.Calendar());

    // Delete an event.
    var deleted = await calDavClient.DeleteEvent(calendarEvent);
}

NuGet

The project can be found on nuget.

Install

dotnet add package HaemmerElectronics.SeppPenner.CalDAVNet

Change history

See the Changelog.

About

CalDAVNet is a project to access CalDAV servers and a fork of https://github.com/markatk/CalDAV.NET.

Resources

License

Stars

Watchers

Forks

Packages

No packages published