定制 thelufenk/notion 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thelufenk/notion

最新稳定版本:1.0.1

Composer 安装命令:

composer require thelufenk/notion

包简介

Notion PHP SDK

README 文档

README

Latest Version on Packagist Total Downloads

This is an unofficial PHP SDK for the new public Notion API. It's work in progress as we didn't get the change to be included to the private beta.

Installation

You can install the package via composer:

composer require codecycler/notion

Usage

Getting all databases attached to your integration.

use Notion\Notion;

$databaseOptions = new Notion($token)
    ->database()
    ->ids();

Querying a database by id

use Notion\Notion;

$databaseOptions = new Notion($token)
    ->database($databaseId)
    ->query()
    ->get();

Query database by property

$nameFilter = (new Notion\Filters\TextFilter())
    ->equals('Name', 'Notion is awesome!');

$database = $client->database('e3161af3-ff12-43c5-9f42-02eea4ab4cbf')
  ->query()
  ->filter($nameFilter)
  ->get();

foreach ($database->pages as $page) {
  $name = $page->name;
  $status = $page->status;
}

Getting a page by id

$page = $client->page('9b0ff081-1af8-4751-92d6-9e07fbd5c20d')->get();

$name           = $page->name;          // Property: 'Name'
$showOnWebsite  = $page->showOnWebsite; // Property: 'Show on website'

Creating a new page in a database

$database = $client->database('e3161af3-ff12-43c5-9f42-02eea4ab4cbf')->get();

$page = $database->newPage();

$page->name = 'New page created with the Notion API';
$page->showOnWebsite = true;

$page->save();

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 16
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固