Skip to content

mastodon_api_parametrized_routes

Alex Kirk edited this page Feb 8, 2025 · 10 revisions

Auto-generated Example

add_filter(
    'mastodon_api_parametrized_routes',
    function ( array $string_list ) {
        // Your code here
        return $string_list;
    }
);

Parameters

  • array $string_list

Files

apply_filters(
			'mastodon_api_parametrized_routes',
			array(
				'api/v1/accounts/([^/]+)/featured_tags'  => 'api/v1/accounts/$matches[1]/featured_tags',
				'api/v1/accounts/([^/]+)/followers'      => 'api/v1/accounts/$matches[1]/followers',
				'api/v1/accounts/([^/]+)/follow'         => 'api/v1/accounts/$matches[1]/follow',
				'api/v1/accounts/([^/]+)/unfollow'       => 'api/v1/accounts/$matches[1]/unfollow',
				'api/v1/accounts/([^/]+)/statuses'       => 'api/v1/accounts/$matches[1]/statuses',
				'api/v1/statuses/([0-9]+)/context'       => 'api/v1/statuses/$matches[1]/context',
// ...

Hooks

Clone this wiki locally