15 lines
303 B
TypeScript
Raw Normal View History

2024-12-31 13:55:42 +01:00
import type { Tld} from './index'
import {request} from './index'
2024-07-25 02:09:49 +02:00
2024-12-30 23:50:15 +01:00
interface TldList {
'hydra:totalItems': number
'hydra:member': Tld[]
2024-07-25 02:09:49 +02:00
}
2024-12-30 23:50:15 +01:00
export async function getTldList(params: object): Promise<TldList> {
return (await request<TldList>({
2024-07-25 02:09:49 +02:00
url: 'tld',
2024-12-30 23:50:15 +01:00
params
2024-07-25 02:09:49 +02:00
})).data
2024-12-30 23:50:15 +01:00
}