# wp-parsely/3.16.4/src/RemoteAPI/class-analytics-post-detail-api.php

Parse.ly, version 3.16.4. 46 lines.

- Page: https://pluginprobe.com/plugins/wp-parsely/3.16.4/code/src/RemoteAPI/class-analytics-post-detail-api.php
- Raw: https://pluginprobe.com/plugins/wp-parsely/3.16.4/raw/src/RemoteAPI/class-analytics-post-detail-api.php
- Modified: 2024-07-08T10:55:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-parsely/3.16.4/code/src/RemoteAPI/class-analytics-post-detail-api.php#L10-L20`.

```php
<?php
/**
 * Class for Analytics Post Detail API (`/analytics/post/detail`).
 *
 * @package Parsely
 * @since   3.6.0
 */

declare(strict_types=1);

namespace Parsely\RemoteAPI;

use Parsely\Endpoints\Base_Endpoint;
use Parsely\Parsely;
use WP_REST_Request;

/**
 * Class for Analytics Post Detail API (`/analytics/post/detail`).
 *
 * @since 3.6.0
 */
class Analytics_Post_Detail_API extends Base_Endpoint_Remote {
	protected const API_BASE_URL = Parsely::PUBLIC_API_BASE_URL;
	protected const ENDPOINT     = '/analytics/post/detail';
	protected const QUERY_FILTER = 'wp_parsely_analytics_post_detail_endpoint_args';

	/**
	 * Returns whether the endpoint is available for access by the current
	 * user.
	 *
	 * @since 3.14.0
	 * @since 3.16.0 Added the `$request` parameter.
	 *
	 * @param WP_REST_Request|null $request The request object.
	 * @return bool
	 */
	public function is_available_to_current_user( $request = null ): bool {
		return current_user_can(
			// phpcs:ignore WordPress.WP.Capabilities.Undetermined
			$this->apply_capability_filters(
				Base_Endpoint::DEFAULT_ACCESS_CAPABILITY
			)
		);
	}
}

```
