This sample will show you to easily read events for the current day using the Events Endpoint API.
$ mkdir read_events && cd read_events
$ dotnet new console
- RestSharp
- DotNetEnv
- Newtonsoft.Json
You'll need the following values:
ACCESS_TOKEN = ""
CALENDAR_ID = ""
Add the above values to a new .env
file:
$ touch .env # Then add your env variables
To compile the comment we need to use this dotnet
command:
$ dotnet run --project read_events.csproj
Run the app:
$ ./bin/Debug/net6.0/read_events
When you run it, it will display all the events for the current date and wait for a keystoke to end
Visit our Nylas Calendar API documentation to learn more.