KO
|
EN
gitlite β search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
telegraph
β 9
Open GitHub β
π A Telegraph API PHP client.
Download README (.md)
Explore Similar Repositories
intro_webpack
:
No description available.
biscuit-store
:
JavaScript library for application state-management.
falling_everything_py
:
Falling sand "nolla" style
DeepImageDeblurring
:
Deep Convolutional approaches for Gaussian and Motion Blur removal.
Sentinel-1_Greenland_Ice_Velocity
:
Ice velocity maps of the Greenland Ice Sheet margin derived from ESA Sentinel-1 synthetic aperture radar data.
// repository documentation
Was this content helpful?
β 0
(0 ratings)
Select Rating:
β
β
β
β
β
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
telegraph
?
Download (.md)
# Telegraph PHP Library Modern PHP library for Telegraph API. Telegraph is a minimalist anonymous publishing platform created by Telegram. Create beautiful articles in seconds without registration. ## Features - π Simple & Intuitive API - Fluent interface for easy content building - π¨ Rich Content Support - Headers, paragraphs, lists, images, videos, code blocks - π HTML Conversion - Automatic HTML to Telegraph format conversion with sanitization - π‘οΈ Type Safe - Full PHP 8.1+ type hints with readonly properties - π Fully Documented - Comprehensive PHPDoc comments for IDE support ## Requirements - PHP 8.1 or higher - cURL extension - JSON extension ## Installation Install via Composer: ```bash composer require chipslays/telegraph ``` ## Quick Start ```php use Telegraph\Telegraph; // Create client $telegraph = new Telegraph; // Create account $account = $telegraph->createAccount( shortName: 'MyBlog', authorName: 'John Doe' ); // IMPORTANT: Save this token! $token = $account->accessToken(); // Create page $page = $account->createPage( title: 'Hello World', content: 'My first Telegraph article!' ); echo "Published: " . $page->url(); ``` ```php $html = <<<HTML <h1>Article Title</h1> <p>Introduction with <strong>bold</strong> text.</p> <img src="https://example.com/image.jpg" /> <p>Regular paragraph with <a href="https://example.com">link</a>.</p> <ul> <li>First item</li> <li>Second item</li> </ul> <blockquote>Important quote</blockquote> HTML; $page = $account->createPageFromHtml('Blog Post', $html); ``` ## Usage Examples You can find code examples in [examples folder](/examples) or in [EXAMPLES.md](/EXAMPLES.md). ## License The MIT License (MIT). Please see [License File](/LICENSE.md) for more information.