update to REST API changes (WP 5.5)
This commit is contained in:
parent
edc334a1fb
commit
fb22aeae71
7 changed files with 36 additions and 26 deletions
|
@ -23,9 +23,10 @@ class Followers {
|
||||||
\register_rest_route(
|
\register_rest_route(
|
||||||
'activitypub/1.0', '/users/(?P<id>\d+)/followers', array(
|
'activitypub/1.0', '/users/(?P<id>\d+)/followers', array(
|
||||||
array(
|
array(
|
||||||
'methods' => \WP_REST_Server::READABLE,
|
'methods' => \WP_REST_Server::READABLE,
|
||||||
'callback' => array( '\Activitypub\Rest\Followers', 'get' ),
|
'callback' => array( '\Activitypub\Rest\Followers', 'get' ),
|
||||||
'args' => self::request_parameters(),
|
'args' => self::request_parameters(),
|
||||||
|
'permission_callback' => '__return_true',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -23,9 +23,10 @@ class Following {
|
||||||
\register_rest_route(
|
\register_rest_route(
|
||||||
'activitypub/1.0', '/users/(?P<id>\d+)/following', array(
|
'activitypub/1.0', '/users/(?P<id>\d+)/following', array(
|
||||||
array(
|
array(
|
||||||
'methods' => \WP_REST_Server::READABLE,
|
'methods' => \WP_REST_Server::READABLE,
|
||||||
'callback' => array( '\Activitypub\Rest\Following', 'get' ),
|
'callback' => array( '\Activitypub\Rest\Following', 'get' ),
|
||||||
'args' => self::request_parameters(),
|
'args' => self::request_parameters(),
|
||||||
|
'permission_callback' => '__return_true',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -29,9 +29,10 @@ class Inbox {
|
||||||
\register_rest_route(
|
\register_rest_route(
|
||||||
'activitypub/1.0', '/inbox', array(
|
'activitypub/1.0', '/inbox', array(
|
||||||
array(
|
array(
|
||||||
'methods' => \WP_REST_Server::EDITABLE,
|
'methods' => \WP_REST_Server::EDITABLE,
|
||||||
'callback' => array( '\Activitypub\Rest\Inbox', 'shared_inbox' ),
|
'callback' => array( '\Activitypub\Rest\Inbox', 'shared_inbox' ),
|
||||||
'args' => self::shared_inbox_request_parameters(),
|
'args' => self::shared_inbox_request_parameters(),
|
||||||
|
'permission_callback' => '__return_true',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -39,9 +40,10 @@ class Inbox {
|
||||||
\register_rest_route(
|
\register_rest_route(
|
||||||
'activitypub/1.0', '/users/(?P<user_id>\d+)/inbox', array(
|
'activitypub/1.0', '/users/(?P<user_id>\d+)/inbox', array(
|
||||||
array(
|
array(
|
||||||
'methods' => \WP_REST_Server::EDITABLE,
|
'methods' => \WP_REST_Server::EDITABLE,
|
||||||
'callback' => array( '\Activitypub\Rest\Inbox', 'user_inbox' ),
|
'callback' => array( '\Activitypub\Rest\Inbox', 'user_inbox' ),
|
||||||
'args' => self::user_inbox_request_parameters(),
|
'args' => self::user_inbox_request_parameters(),
|
||||||
|
'permission_callback' => '__return_true',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -25,8 +25,9 @@ class Nodeinfo {
|
||||||
\register_rest_route(
|
\register_rest_route(
|
||||||
'activitypub/1.0', '/nodeinfo/discovery', array(
|
'activitypub/1.0', '/nodeinfo/discovery', array(
|
||||||
array(
|
array(
|
||||||
'methods' => \WP_REST_Server::READABLE,
|
'methods' => \WP_REST_Server::READABLE,
|
||||||
'callback' => array( '\Activitypub\Rest\Nodeinfo', 'discovery' ),
|
'callback' => array( '\Activitypub\Rest\Nodeinfo', 'discovery' ),
|
||||||
|
'permission_callback' => '__return_true',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -34,8 +35,9 @@ class Nodeinfo {
|
||||||
\register_rest_route(
|
\register_rest_route(
|
||||||
'activitypub/1.0', '/nodeinfo', array(
|
'activitypub/1.0', '/nodeinfo', array(
|
||||||
array(
|
array(
|
||||||
'methods' => \WP_REST_Server::READABLE,
|
'methods' => \WP_REST_Server::READABLE,
|
||||||
'callback' => array( '\Activitypub\Rest\Nodeinfo', 'nodeinfo' ),
|
'callback' => array( '\Activitypub\Rest\Nodeinfo', 'nodeinfo' ),
|
||||||
|
'permission_callback' => '__return_true',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -43,8 +45,9 @@ class Nodeinfo {
|
||||||
\register_rest_route(
|
\register_rest_route(
|
||||||
'activitypub/1.0', '/nodeinfo2', array(
|
'activitypub/1.0', '/nodeinfo2', array(
|
||||||
array(
|
array(
|
||||||
'methods' => \WP_REST_Server::READABLE,
|
'methods' => \WP_REST_Server::READABLE,
|
||||||
'callback' => array( '\Activitypub\Rest\Nodeinfo', 'nodeinfo2' ),
|
'callback' => array( '\Activitypub\Rest\Nodeinfo', 'nodeinfo2' ),
|
||||||
|
'permission_callback' => '__return_true',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -16,9 +16,10 @@ class Ostatus {
|
||||||
\register_rest_route(
|
\register_rest_route(
|
||||||
'activitypub/1.0', '/ostatus/remote-follow', array(
|
'activitypub/1.0', '/ostatus/remote-follow', array(
|
||||||
array(
|
array(
|
||||||
'methods' => \WP_REST_Server::READABLE,
|
'methods' => \WP_REST_Server::READABLE,
|
||||||
'callback' => array( '\Activitypub\Rest\Ostatus', 'get' ),
|
'callback' => array( '\Activitypub\Rest\Ostatus', 'get' ),
|
||||||
// 'args' => self::request_parameters(),
|
// 'args' => self::request_parameters(),
|
||||||
|
'permission_callback' => '__return_true',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -23,9 +23,10 @@ class Outbox {
|
||||||
\register_rest_route(
|
\register_rest_route(
|
||||||
'activitypub/1.0', '/users/(?P<id>\d+)/outbox', array(
|
'activitypub/1.0', '/users/(?P<id>\d+)/outbox', array(
|
||||||
array(
|
array(
|
||||||
'methods' => \WP_REST_Server::READABLE,
|
'methods' => \WP_REST_Server::READABLE,
|
||||||
'callback' => array( '\Activitypub\Rest\Outbox', 'user_outbox' ),
|
'callback' => array( '\Activitypub\Rest\Outbox', 'user_outbox' ),
|
||||||
'args' => self::request_parameters(),
|
'args' => self::request_parameters(),
|
||||||
|
'permission_callback' => '__return_true',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -24,9 +24,10 @@ class Webfinger {
|
||||||
\register_rest_route(
|
\register_rest_route(
|
||||||
'activitypub/1.0', '/webfinger', array(
|
'activitypub/1.0', '/webfinger', array(
|
||||||
array(
|
array(
|
||||||
'methods' => \WP_REST_Server::READABLE,
|
'methods' => \WP_REST_Server::READABLE,
|
||||||
'callback' => array( '\Activitypub\Rest\Webfinger', 'webfinger' ),
|
'callback' => array( '\Activitypub\Rest\Webfinger', 'webfinger' ),
|
||||||
'args' => self::request_parameters(),
|
'args' => self::request_parameters(),
|
||||||
|
'permission_callback' => '__return_true',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue