You are here

public function HttpServiceApiWrapperPosts::findPost in HTTP Client Manager 8.2

Find Post.

Parameters

int $postId: The Post id.

Return value

array An array representing the Post matching the provided id.

File

modules/http_client_manager_example/src/Plugin/HttpServiceApiWrapper/HttpServiceApiWrapperPosts.php, line 61

Class

HttpServiceApiWrapperPosts
Class HttpServiceApiWrapperPosts.

Namespace

Drupal\http_client_manager_example\Plugin\HttpServiceApiWrapper

Code

public function findPost($postId) {
  $args = [
    'postId' => (int) $postId,
  ];
  return $this
    ->call(Posts::FIND_POST, $args)
    ->toArray();
}