mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-04 05:53:07 -05:00
17 lines
352 B
TypeScript
17 lines
352 B
TypeScript
|
import { apiRequestGet } from 'mastodon/api';
|
||
|
import type {
|
||
|
ApiSearchType,
|
||
|
ApiSearchResultsJSON,
|
||
|
} from 'mastodon/api_types/search';
|
||
|
|
||
|
export const apiGetSearch = (params: {
|
||
|
q: string;
|
||
|
resolve?: boolean;
|
||
|
type?: ApiSearchType;
|
||
|
limit?: number;
|
||
|
offset?: number;
|
||
|
}) =>
|
||
|
apiRequestGet<ApiSearchResultsJSON>('v2/search', {
|
||
|
...params,
|
||
|
});
|