Download wp-calypso/client/dashboard/data/site-domains.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 350 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/data/site-domains.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/dashboard/data/site-domains.ts
-
curl -L -o site-domains.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/data/site-domains.ts
350 Bytes
| import wpcom from 'calypso/lib/wp'; | |
| import type { Domain } from './domains'; | |
| export type SiteDomain = Omit< Domain, 'domain_status' >; | |
| export async function fetchSiteDomains( siteId: number ): Promise< SiteDomain[] > { | |
| const { domains } = await wpcom.req.get( { | |
| path: `/sites/${ siteId }/domains`, | |
| apiVersion: '1.2', | |
| } ); | |
| return domains; | |
| } | |