delete method
Deletes a sitemap from the Sitemaps report.
Does not stop Google from crawling this sitemap or the URLs that were previously crawled in the deleted sitemap.
Request parameters:
siteUrl
- The site's URL, including protocol. For example:
http://www.example.com/
.
feedpath
- The URL of the actual sitemap. For example:
http://www.example.com/sitemap.xml
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<void> delete(
core.String siteUrl,
core.String feedpath, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'webmasters/v3/sites/' +
commons.escapeVariable('$siteUrl') +
'/sitemaps/' +
commons.escapeVariable('$feedpath');
await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
downloadOptions: null,
);
}