Download wp-calypso/client/dashboard/data/p2.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 309 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/data/p2.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/dashboard/data/p2.ts
-
curl -L -o p2.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/data/p2.ts
309 Bytes
| import wpcom from 'calypso/lib/wp'; | |
| export async function fetchP2HubP2s( | |
| siteId: number, | |
| options: { limit?: number } = {} | |
| ): Promise< { totalItems: number } > { | |
| return wpcom.req.get( | |
| { | |
| path: '/p2/workspace/sites/all', | |
| apiNamespace: 'wpcom/v2', | |
| }, | |
| { | |
| hub_id: siteId, | |
| ...options, | |
| } | |
| ); | |
| } | |