HaemmerElectronics.SeppPenner.SynologyCalendarClient
1.0.3
Prefix Reserved
dotnet add package HaemmerElectronics.SeppPenner.SynologyCalendarClient --version 1.0.3
NuGet\Install-Package HaemmerElectronics.SeppPenner.SynologyCalendarClient -Version 1.0.3
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="HaemmerElectronics.SeppPenner.SynologyCalendarClient" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HaemmerElectronics.SeppPenner.SynologyCalendarClient" Version="1.0.3" />
<PackageReference Include="HaemmerElectronics.SeppPenner.SynologyCalendarClient" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HaemmerElectronics.SeppPenner.SynologyCalendarClient --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: HaemmerElectronics.SeppPenner.SynologyCalendarClient, 1.0.3"
#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.
#:package HaemmerElectronics.SeppPenner.SynologyCalendarClient@1.0.3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HaemmerElectronics.SeppPenner.SynologyCalendarClient&version=1.0.3
#tool nuget:?package=HaemmerElectronics.SeppPenner.SynologyCalendarClient&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SynologyCalendarClient
SynologyCalendarClient is a project to handle Synology calendar API requests. However, as the Synology calendar API description is very bad, it is not yet finished.
Available for
- Net 10.0
- Net 11.0
Net Core and Net Framework latest and LTS versions
Basic usage
// The type name repeats the namespace, so an alias keeps the code readable.
using SynologyClient = SynologyCalendarClient.Client.SynologyCalendarClient;
/// <summary>
/// The main method of the program.
/// </summary>
public static async Task Main()
{
// Create the logger.
var logger = LoggerConfig.GetLoggerConfiguration(nameof(Program))
.WriteTo.Sink((ILogEventSink)Log.Logger)
.CreateLogger();
// Create the Synology calendar client.
var synologyCalendarClient = new SynologyClient("https://example.com/calendars", logger);
// Login.
var loginResult = await synologyCalendarClient.Login(
3,
"username",
"password",
enableSynoToken: true,
format: LoginFormat.Sid);
// If the login failed, jump out.
if (loginResult is null || !loginResult.Success)
{
logger.Error("The Synology login failed");
return;
}
// Get all calendars.
var calendarsResult = await synologyCalendarClient.GetAllCalendars(
1,
true,
false);
// If the login failed, jump out.
if (calendarsResult is null || !calendarsResult.Success)
{
logger.Error("Loading calendars failed");
return;
}
}
Issues
- Creating a event still fails: https://stackoverflow.com/questions/77349742/how-to-use-the-synology-calendar-api-to-create-events-in-c
- Tested methods: Login, Logout, GetApiInformation, GetAllCalendars, GetCalendarById, CreateEvent, GetAllEvents, SetEventData, CreateEvent.
- Missing deserialization tests for Events and Tasks.
- The API description is pretty bad, so I decided to use CalDav. Checkout https://github.com/SeppPenner/CalDAVNet and https://github.com/SeppPenner/CalDavSynologySyncer for examples.
Change history
See the Changelog.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Newtonsoft.Json (>= 13.0.4)
- Serilog (>= 4.4.0)
-
net11.0
- Newtonsoft.Json (>= 13.0.4)
- Serilog (>= 4.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version 1.0.3.0 (2026-11-24): Removed support for Net8.0 as it is out of support, added support for Net11.0, updated NuGet packages.