WengerK / course--php-notion-api

Companion & Code Sample of PHP code with the Notion API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Course - PHP & Notion API

πŸ‘‹ hello

Welcome to the companion repository for the course "WebDon at HEIG-VD"! This course is designed to explain & showcase how to use the Notion API with PHP on the Webmardi database.

πŸ›  Requirements

  • PHP
  • Composer

πŸ‘Ύ Samples

🧨 Getting Started

All samples are easily testable in your browser by running the php built-in web server.

php -S localhost:9000 -t samples/

And then browsing to the host and port you specified (in the above example, http://localhost:9000).

🚧 How to run the examples

  1. Install the dependencies with Composer:
$ composer install
  1. Copy the .env.example file in the examples folder as .env
$ cp ./.env.example ./.env
  1. Fill the .env file with correct information

    • NOTION_WEBMARDI_DATABASE_ID a Notion database
    • NOTION_TOKEN a valid notion Token for the previous Database
  2. Run the PHP built-in web server. Supply the -t option to this directory:

$ php -S localhost:9000 -t ./

About

Companion & Code Sample of PHP code with the Notion API


Languages

Language:PHP 84.7%Language:CSS 15.3%