{"id":20992223,"url":"https://github.com/softlion/notionsharp","last_synced_at":"2025-04-12T20:41:03.969Z","repository":{"id":40603340,"uuid":"259387283","full_name":"softlion/NotionSharp","owner":"softlion","description":"Notion API client library in C# (csharp)","archived":false,"fork":false,"pushed_at":"2024-07-09T22:00:55.000Z","size":694,"stargazers_count":47,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-08T01:49:34.483Z","etag":null,"topics":["api","csharp","notion"],"latest_commit_sha":null,"homepage":"https://vapolia.eu","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softlion.png","metadata":{"files":{"readme":"README official.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"liberapay":"softlion"}},"created_at":"2020-04-27T16:21:20.000Z","updated_at":"2025-03-28T04:29:13.000Z","dependencies_parsed_at":"2024-01-21T19:56:45.467Z","dependency_job_id":null,"html_url":"https://github.com/softlion/NotionSharp","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softlion%2FNotionSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softlion%2FNotionSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softlion%2FNotionSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softlion%2FNotionSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softlion","download_url":"https://codeload.github.com/softlion/NotionSharp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631669,"owners_count":21136554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","csharp","notion"],"created_at":"2024-11-19T07:08:19.037Z","updated_at":"2025-04-12T20:41:03.932Z","avatar_url":"https://github.com/softlion.png","language":"C#","funding_links":["https://liberapay.com/softlion"],"categories":[],"sub_categories":[],"readme":"# WORK IN PROGRESS  \n\nState 2024/01/11: all APIs are working except:\n- block/append\n- page/create and update\n- database/get, query and list\n\nThose are not priority and up for grabs.\n\n# NotionSharp.ApiClient - client for official Notion API in C#\n\nThis is an unofficial [Notion](https://notion.so) public API beta library and website template. You can, for example, get notion pages as a RSS feed. You can also use it as a simple CMS (Content Management System).\n\n[![NuGet][nuget-img]][nuget-link]  \n![Nuget](https://img.shields.io/nuget/dt/Softlion.NotionSharp)\n\n![publish to nuget](https://github.com/softlion/NotionSharp/workflows/publish%20to%20nuget/badge.svg)\n\n[nuget-link]: https://www.nuget.org/packages/Softlion.NotionSharp/\n[nuget-img]: https://img.shields.io/nuget/v/Softlion.NotionSharp\n\n\n## SDK Usage\n\nCreate a session:\n\n```csharp\n    var sessionInfo = new NotionSessionInfo \n    {\n        Token = \"secret_9BXXXxxxxxxxxxXXXXXXXXXXXxxxxxxxxxxxxxxx\"\n    };\n\n    var session = new NotionSession(sessionInfo);\n```\n\nExample: get the HTML content of a page\n\n```csharp\n    var page = await session.Search(filterOptions: FilterOptions.ObjectPage)\n            .WhereAwait(async p =\u003e p.Title().Title[0].PlainText == \"Procrastination\")\n            .FirstAsync();\n\n    var html = await session.GetHtml(page);\n```\n\n## Spawn a website displaying Notion pages in a few minutes\n\n### Setup your Notion pages and get your credentials\n\n#### Create some content  \n  Create a page at the root of Notion.so (the root page), then add subpages to this page with a title and an icon.\n\n  When you encounter `CmsPageTitle` below in this setup, replace it with the exact title of your root page.\n\n#### Get the credentials to access this content\n\n  Connect to your [notion.so](notion.so) account first then [navigate here](https://www.notion.so/my-integrations) and create a new integration.  \n  Copy the `Internal Integration Token`, this is your credential (named `Token` below).\n\n  Go back to your content, and share your root page with the integration you just created (tap in the invite input zone to bring the integration selector).\n  \n  \n\n\n### Option 1: Spawn the website with [kubernetes](https://kubernetes.io/)\n\nRun these commands after having setup kubernetes:\n\n```powershell\nhelm upgrade demonotionblog helm\\notionsharpblog --install -f your-own-values.yaml\nstart http://localhost:5080/\n```\n\nExample of a simple `your-own-values.yaml` file suitable for [minikube](https://kubernetes.io/fr/docs/setup/learning-environment/minikube/).  \nCheck `helm\\notionsharpblog\\values.yaml` for all available configurable values.\n\n```yaml\nappSettingsSecrets:\n  appsettings-secrets.Production.json: |-\n    {\n      \"Notion\": {\n        \"CmsPageTitle\": \"My Blog\",\n        \"Token\": \"secret_9BXXXxxxxxxxxxXXXXXXXXXXXxxxxxxxxxxxxxxx\"\n      }\n    }\n\n#For minikube only\nservice:\n  type: LoadBalancer\n  port: 5080\n```\n\n\n\n\n\n\n\n\n### Option 2: Clone the website template\n\nIssue these commands to create your customized notion website. Replace the fake credentials with yours.  \nThis requires the [dotnet sdk](https://dotnet.microsoft.com/download) v5+.\n\n```powershell\nmd DemoNotionBlog\ncd DemoNotionBlog\ndotnet new -i Softlion.NotionSharp.TemplateProjects\n```\n\n```powershell\ndotnet new blazorblog -p \"MySite CMS\"\ndotnet user-secrets init\ndotnet user-secrets set \"Notion:Token\" \"secret_9BXXXxxxxxxxxxXXXXXXXXXXXxxxxxxxxxxxxxxx\"\n\nor\n\ndotnet new blazorblog -p \"MySite CMS\" --token secret_9BXXXxxxxxxxxxXXXXXXXXXXXxxxxxxxxxxxxxxx\n```\n```powershell\ndotnet run\n```\n\nTo uninstall the template:\n```powershell\ndotnet new -u Softlion.NotionSharp.TemplateProject.Blog\n```\n\nUse [Visual Studio](https://visualstudio.microsoft.com/), [VS Code](https://code.visualstudio.com/), or [Rider](https://www.jetbrains.com/rider/) to open the solution `.sln` file and customize the website.\n  \n  \n\n\n\n### Option 3: Cloning the git repo\n\nClone the git repo then install the template:\n\n```powershell\ndotnet new -i Demos\\DemoNotionBlog\n```\nThen spawn a new website from this template:\n```powershell\ndotnet new blazorblog -p \"MySite CMS\" --key secret_9BXXXxxxxxxxxxXXXXXXXXXXXxxxxxxxxxxxxxxx\ndotnet run\n```\n\nTo uninstall the template:\n```powershell\ndotnet new -u Softlion.NotionSharp.TemplateProject.Blog\n``` \n  \n  \n\n\n\n### Option 4: Using Docker\n\nA dockerfile is included with the demo/template project.\nIn Visual Studio, right click the demo project and choose \"publish\" to publish it using the UI.\nOr use these commands:\n\n```powershell\ndocker build -t yourdockerhub.com/demonotionblog:1.0.0 .\ndocker run -p8080:5000 yourdockerhub.com/demonotionblog:1.0.0\nstart http://localhost:8080/\n```\n\nNote: the prebuilt docker image vapolia/demonotionblog:latest is made only for `helm` (ie: kubernetes) and is missing the appsettings-secrets.Production.json file.\n  \n  \n  \n\n\n\n## References\n\n* [Notion official API docs](https://developers.notion.com/reference/intro)\n* [Notion official API guides](https://developers.notion.com/docs)\n* [Notion official API changelog](https://developers.notion.com/changelog)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftlion%2Fnotionsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftlion%2Fnotionsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftlion%2Fnotionsharp/lists"}