mirror of
https://github.com/twisterarmy/twister-php.git
synced 2025-01-15 00:59:56 +00:00
twister-php
PHP 8 / Composer Tools for Twister API
Install
composer require twisterarmy/twister
Features
Client
Twister client communication toolkit
RSS
RSS toolkit for twister
Init
$rss = new \Twisterarmy\Twister\Rss();
Format
Time
Convert RSS time to datetime format (Documentation)
Example
$rss->setTimeFormat('c');
Message
Convert RSS fields to twister message format
Mask
{time}
- formatted time string bysetTimeFormat
,U
by default{link}
- target link{title}
- item title
Example
$rss->setMessageFormat('{title} {link}');
Length
Twister protocol accept messages with 256 chars max but you can define another value.
Formatted messages greater this value will be skipped from feed.
Example
$rss->setLength(256);
Feed
Get formatted feed array
Example
$feed = $rss->get(url);
Description
PHP 8 / Composer Library for Twister
php-8twistertwister-apitwister-api-phptwister-clienttwister-composertwister-curltwister-librarytwister-p2ptwister-phptwister-php-8twister-php-clienttwister-rss
Readme
MIT
40 KiB
Languages
PHP
100%