mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 11:11:11 +02:00
26 lines
462 B
TypeScript
26 lines
462 B
TypeScript
import { apiRequestGet } from 'flavours/glitch/api';
|
|
import type {
|
|
ApiSearchType,
|
|
ApiSearchResultsJSON,
|
|
} from 'flavours/glitch/api_types/search';
|
|
|
|
export const apiGetSearch = (
|
|
params: {
|
|
q: string;
|
|
resolve?: boolean;
|
|
type?: ApiSearchType;
|
|
limit?: number;
|
|
offset?: number;
|
|
},
|
|
options: {
|
|
signal?: AbortSignal;
|
|
} = {},
|
|
) =>
|
|
apiRequestGet<ApiSearchResultsJSON>(
|
|
'v2/search',
|
|
{
|
|
...params,
|
|
},
|
|
options,
|
|
);
|