Download wp-calypso/client/data/marketplace/reinstall-plugins-api.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 524 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/marketplace/reinstall-plugins-api.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/data/marketplace/reinstall-plugins-api.ts
-
curl -L -o reinstall-plugins-api.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/marketplace/reinstall-plugins-api.ts
524 Bytes
| import wpcom from 'calypso/lib/wp'; | |
| import type { ReinstallPluginsResponse } from './types'; | |
| /** | |
| * Calls the API to reinstall all the subscriptions given a site id. | |
| * @param {number} siteId Site ID. | |
| * @returns {Promise} Promise object represents the result of the request. | |
| */ | |
| const reinstallPlugins = ( siteId: number ): Promise< ReinstallPluginsResponse > => { | |
| return wpcom.req.get( { | |
| path: `/sites/${ siteId }/marketplace/products/reinstall`, | |
| apiNamespace: 'wpcom/v2', | |
| } ); | |
| }; | |
| export default reinstallPlugins; | |