Download wp-calypso/client/dashboard/data/site-scan.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 370 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/data/site-scan.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/dashboard/data/site-scan.ts
-
curl -L -o site-scan.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/data/site-scan.ts
370 Bytes
| import wpcom from 'calypso/lib/wp'; | |
| export interface SiteScan { | |
| most_recent: { | |
| timestamp: string; | |
| }; | |
| reason: string; | |
| state: 'unavailable' | 'idle'; | |
| threats: Record< string, unknown >[]; | |
| } | |
| export async function fetchSiteScan( siteId: number ): Promise< SiteScan > { | |
| return wpcom.req.get( { | |
| path: `/sites/${ siteId }/scan`, | |
| apiNamespace: 'wpcom/v2', | |
| } ); | |
| } | |