lumetas/trilium-notes
最新稳定版本:v0.0.1
Composer 安装命令:
composer require lumetas/trilium-notes
包简介
README 文档
README
Languages
Introduction
PHP client for Trilium Notes ETAPI. Allows programmatic management of notes, branches, attributes and attachments.
Installation
Install via composer:
composer require lumetas/trilium-notes
Quick Start
<?php require 'vendor/autoload.php'; use Lumetas\TriliumNotes\Trilium; $trilium = new Trilium('http://localhost:37740/etapi', 'your-auth-token'); // Create a note $note = $trilium->createNote( 'root', 'New Note', 'text', 'Note content' ); // Get content echo $note->getContent();
Core Classes
Trilium
Main API client class. Takes endpoint and auth token.
Key methods:
getNoteById()- get note by IDcreateNote()- create new notesearchNotes()- search notescreateAttribute()- create attribute
Note
Class for working with notes.
Key methods:
getContent()/writeContent()- content managementgetAttributes()- get attributescreateLabel()/createRelation()- create label/relationexport()/import()- export/import
Branch
Class for working with branches (note relationships).
Attribute
Class for working with attributes (labels and relations).
Attachment
Class for working with attachments.
Examples
Create Note with Label
$noteWithBranch = $trilium->createNote( 'root', 'Note with label', 'text', 'Content' ); $note = $noteWithBranch->getNote(); $note->createLabel('important', 'high');
Search Notes
$notes = $trilium->searchNotes('search query', [ 'ancestorNoteId' => 'root', 'limit' => 10 ]); foreach ($notes as $note) { echo $note->getTitle(); }
Links
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2025-07-27