@azuro-org/toolkit
Version:
This framework-agnostic package provides essential utilities for building applications on the Azuro Protocol.
30 lines (29 loc) • 893 B
TypeScript
import type { ChainId } from '../../config';
import type { PaginatedGamesResponse } from './types';
export type SearchGamesParams = {
chainId: ChainId;
/** minimum 3 characters long */
query: string;
/** 1-based, default: 1 */
page?: number;
/** 1-based, default: 10 */
perPage?: number;
};
export type SearchGamesResult = PaginatedGamesResponse;
/**
* Searches for games by text query across game titles, leagues, and countries.
* The minimum query length is 3 characters. Returns paginated results.
*
* - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/searchGames
*
* @example
* import { searchGames } from '@azuro-org/toolkit'
*
* const { games } = await searchGames({
* chainId: 137,
* query: 'Manchester',
* page: 1,
* perPage: 10,
* })
* */
export declare const searchGames: (props: SearchGamesParams) => Promise<SearchGamesResult>;