WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API

Leaderboards::get_items() public WC 1.0

Return all leaderboards.

{} It's a method of the class: Leaderboards{}

No Hooks.

Return

WP_Error|WP_REST_Response. Nothing.

Usage

$Leaderboards = new Leaderboards();
$Leaderboards->get_items( $request );
$request(WP_REST_Request) (required)
Request data.

Code of Leaderboards::get_items() WC 5.2.2

<?php
public function get_items( $request ) {
	$persisted_query = json_decode( $request['persisted_query'], true );
	$leaderboards    = $this->get_leaderboards( $request['per_page'], $request['after'], $request['before'], $persisted_query );
	$data            = array();

	if ( ! empty( $leaderboards ) ) {
		foreach ( $leaderboards as $leaderboard ) {
			$response = $this->prepare_item_for_response( $leaderboard, $request );
			$data[]   = $this->prepare_response_for_collection( $response );
		}
	}

	return rest_ensure_response( $data );
}