Skip to content

This is a small class library intended to be used with a web api/website in order to expose an iCal feed to be imported in apps such as Google Calendar or Microsoft Outlook. It maps the way I arranged the structure of my task items in Notion, so it should be adapted based on your specific way of using Notion.

Notifications You must be signed in to change notification settings

lesbass/notion-2-ical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notion-2-ical

.NET Standard class library intended to be used with a web api/website in order to expose an iCal feed to be imported in apps such as Google Calendar or Microsoft Outlook. It maps the way I arranged the structure of my task items in Notion, so it should be adapted based on your specific way of using Notion.

API Reference

Here is a link to Notion APIs: https://developers.notion.com/

Specifically, Database query API: https://developers.notion.com/reference/post-database-query

Controller Example

Using this in a .NET Core MVC environment, an example of a Controller could be:

using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Notion.Interfaces;

namespace MyApp
{
    public class CalendarController : Controller
    {
        private readonly INotionService _notionService;

        public CalendarController(INotionService notionService)
        {
            _notionService = notionService;
        }

        public async Task<IActionResult> Index()
        {
            Response.Headers.Add("Content-Disposition", "attachment");
            Response.Headers.Add("X-Content-Type-Options", "nosniff");

            return Content(await _notionService.GetVCalendarData(), "text/calendar");
        }
    }
}

About

This is a small class library intended to be used with a web api/website in order to expose an iCal feed to be imported in apps such as Google Calendar or Microsoft Outlook. It maps the way I arranged the structure of my task items in Notion, so it should be adapted based on your specific way of using Notion.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages