https://github.com/sepppenner/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.
https://github.com/sepppenner/synologycalendarclient
Last synced: about 1 month ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/sepppenner/synologycalendarclient
- Owner: SeppPenner
- License: mit
- Created: 2023-11-11T19:12:56.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-11T15:50:57.000Z (over 1 year ago)
- Last Synced: 2026-04-19T17:09:19.797Z (2 months ago)
- Language: C#
- Homepage:
- Size: 673 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: License.txt
Awesome Lists containing this project
README
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.
[](https://ci.appveyor.com/project/SeppPenner/synologycalendarclient)
[](https://github.com/SeppPenner/SynologyCalendarClient/issues)
[](https://github.com/SeppPenner/SynologyCalendarClient/network)
[](https://github.com/SeppPenner/SynologyCalendarClient/stargazers)
[](https://raw.githubusercontent.com/SeppPenner/SynologyCalendarClient/master/License.txt)
[](https://snyk.io/test/github/SeppPenner/SynologyCalendarClient)
[](https://franzhuber23.blogspot.de/)
[](https://patreon.com/SeppPennerOpenSourceDevelopment)
[](https://paypal.me/th070795)
## Available for
* Net 8.0
* Net 9.0
## Net Core and Net Framework latest and LTS versions
* https://dotnet.microsoft.com/download/dotnet
## Basic usage
```csharp
///
/// The main method of the program.
///
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](https://github.com/SeppPenner/SynologyCalendarClient/blob/master/Changelog.md).