Download wp-calypso/client/dashboard/data/site-purchases.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 347 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/data/site-purchases.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/dashboard/data/site-purchases.ts
-
curl -L -o site-purchases.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/data/site-purchases.ts
347 Bytes
| import wpcom from 'calypso/lib/wp'; | |
| export interface Purchase { | |
| ID: string; | |
| active: boolean; | |
| expiry_message: string; | |
| is_cancelable: boolean; | |
| product_slug: string; | |
| user_id: string; | |
| } | |
| export async function fetchSitePurchases( siteId: number ): Promise< Purchase[] > { | |
| return wpcom.req.get( { | |
| path: `/sites/${ siteId }/purchases`, | |
| } ); | |
| } | |