PluginProbe
Parse.ly / 3.16.4
Parse.ly v3.16.4
3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 3.20.3 All 105 releases
wp-parsely / src / RemoteAPI / interface-remote-api.php

interface-remote-api.php in Parse.ly 3.16.4, at src/RemoteAPI/interface-remote-api.php

42 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Remote API: Interface
4 *
5 * @package Parsely
6 * @since 3.2.0
7 */
8
9 declare(strict_types=1);
10
11 namespace Parsely\RemoteAPI;
12
13 use WP_Error;
14 use WP_REST_Request;
15
16 /**
17 * Remote API Interface.
18 */
19 interface Remote_API_Interface {
20 /**
21 * Returns the items provided by this interface.
22 *
23 * @param array<string, mixed> $query The query arguments to send to the remote API.
24 * @param bool $associative (optional) When TRUE, returned objects will be converted into
25 * associative arrays.
26 * @return array<string, mixed>|object|WP_Error
27 */
28 public function get_items( array $query, bool $associative = false );
29
30 /**
31 * Returns whether the endpoint is available for access by the current
32 * user.
33 *
34 * @since 3.14.0 Renamed from `is_user_allowed_to_make_api_call()`.
35 * @since 3.16.0 Added the `$request` parameter.
36 *
37 * @param WP_REST_Request|null $request The request object.
38 * @return bool
39 */
40 public function is_available_to_current_user( $request = null ): bool;
41 }
42