/** * Deletes an image serving URL that was created using getImageServingUrl. * * @param string $gs_filename The name of the Google Cloud Storage object * that has an existing URL to delete. In the format * gs://bucket_name/object_name * * @throws \InvalidArgumentException if any of the arguments are not valid. * @throws CloudStorageException If there was a problem contacting the * service. */ public static function deleteImageServingUrl($gs_filename) { $blob_key = self::createGsKey($gs_filename); $req = new ImagesDeleteUrlBaseRequest(); $resp = new ImagesDeleteUrlBaseResponse(); $req->setBlobKey($blob_key); try { ApiProxy::makeSyncCall('images', 'DeleteUrlBase', $req, $resp); } catch (ApplicationError $e) { throw self::imagesApplicationErrorToException($e); } }
private function expectDeleteUrlBase($blob_key) { $req = new ImagesDeleteUrlBaseRequest(); $resp = new ImagesDeleteUrlBaseResponse(); $req->setBlobKey($blob_key); $this->apiProxyMock->expectCall('images', 'DeleteUrlBase', $req, $resp); }