array( 'type' => 'integer', 'minimum' => 1, 'description' => __( 'The organizer ID.', 'acrossai-abilities-manager' ), ), ); } protected function required_input(): array { return array( 'id' ); } protected function output_properties(): array { return array( 'organizer' => array( 'type' => 'object' ), ); } protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ); } protected function run( array $input ) { $id = (int) $input['id']; $post = Event_Repository::require_post( $id, 'organizer' ); if ( is_wp_error( $post ) ) { return $post; } return array( 'organizer' => Event_Repository::describe_linked( $id, 'organizer' ), 'message' => sprintf( /* translators: %s: name */ __( '%s.', 'acrossai-abilities-manager' ), get_the_title( $id ) ), ); } }