diff options
| author | 2025-06-03 00:16:17 +0200 | |
|---|---|---|
| committer | 2025-06-03 00:16:17 +0200 | |
| commit | cc35094bb261cb3185def89d745317fa756560ee (patch) | |
| tree | 0d94bbd1dfe1013101dd96b8dbfa975d275ddf7b /docs/en | |
| parent | 430d4e898e60ec1892d7191cf6e039aaf693822f (diff) | |
Add API endpoint for extensions (#7576)
* Add API endpoint for extensions
Useful for https://github.com/FreshRSS/FreshRSS/issues/7572
* Support PATH_INFO
Now also support being invoked like `/api/misc.php/Extension%20Name/`
* More documentation
Diffstat (limited to 'docs/en')
| -rw-r--r-- | docs/en/admins/10_ServerConfig.md | 2 | ||||
| -rw-r--r-- | docs/en/developers/03_Backend/05_Extensions.md | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/docs/en/admins/10_ServerConfig.md b/docs/en/admins/10_ServerConfig.md index b7f57e61a..07ea147b6 100644 --- a/docs/en/admins/10_ServerConfig.md +++ b/docs/en/admins/10_ServerConfig.md @@ -98,7 +98,7 @@ server { fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; fastcgi_split_path_info ^(.+\.php)(/.*)$; # By default, the variable PATH_INFO is not set under PHP-FPM - # But FreshRSS API greader.php need it. If you have a “Bad Request” error, double check this var! + # But FreshRSS APIs greader.php and misc.php need it. If you have a “Bad Request” error, double check this var! # NOTE: the separate $path_info variable is required. For more details, see: # https://trac.nginx.org/nginx/ticket/321 set $path_info $fastcgi_path_info; diff --git a/docs/en/developers/03_Backend/05_Extensions.md b/docs/en/developers/03_Backend/05_Extensions.md index aeb693cba..db9b03d60 100644 --- a/docs/en/developers/03_Backend/05_Extensions.md +++ b/docs/en/developers/03_Backend/05_Extensions.md @@ -164,6 +164,8 @@ final class HelloWorldExtension extends Minz_Extension The following events are available: +* `api_misc` (`function(): void`): to allow extensions to have own API endpoint + on `/api/misc.php/Extension%20Name/` or `/api/misc.php?ext=Extension%20Name`. * `check_url_before_add` (`function($url) -> Url | null`): will be executed every time a URL is added. The URL itself will be passed as parameter. This way a website known to have feeds which doesn’t advertise it in the header can still be automatically supported. * `entry_auto_read` (`function(FreshRSS_Entry $entry, string $why): void`): Triggered when an entry is automatically marked as read. The *why* parameter supports the rules {`filter`, `upon_reception`, `same_title_in_feed`}. * `entry_auto_unread` (`function(FreshRSS_Entry $entry, string $why): void`): Triggered when an entry is automatically marked as unread. The *why* parameter supports the rules {`updated_article`}. |
