Deletes the bucket identified by its ID.

@param array $options

@throws \Exception
@throws GuzzleException

@return bool
969434
public function deleteBucket(array $options)
    {
        if (!isset($options['BucketId']) && isset($options['BucketName'])) {
            $options['BucketId'] = $this->getBucketIdFromName($options['BucketName']);
        }

        try {
            $this->generateAuthenticatedClient([
                'accountId' => $this->accountId,
                'bucketId'  => $options['BucketId'],
            ])->request('POST', $this->apiUrl.'/b2_delete_bucket');
        } catch (\Exception $e) {
            return false;
        }

        return true;
    }
705034
public function executeUpserts(array $options = array())
    {
        if ( ! $this->queuedUpserts) {
            return;
        }

        foreach ($this->queuedUpserts as $oid => $document) {
            try {
                $this->executeUpsert($document, $options);
                unset($this->queuedUpserts[$oid]);
            } catch (\MongoException $e) {
                unset($this->queuedUpserts[$oid]);
                throw $e;
            }
        }
    }
738155
public function delete($path = '', $options = array())
    {
        return $this->client->delete(
            $this->getPathURI($path),
            $this->addDataToRequest($options),
            $this->requestHeader
        );
    }
1261356
public function remove(array $criteria = [], array $options = [])
    {
        $this->createChunksIndex();

        $matchingFiles = parent::find($criteria, ['_id' => 1]);
        $ids = [];
        foreach ($matchingFiles as $file) {
            $ids[] = $file['_id'];
        }
        $this->chunks->remove(['files_id' => ['$in' => $ids]], ['justOne' => false] + $options);
        return parent::remove(['_id' => ['$in' => $ids]], ['justOne' => false] + $options);
    }
594259
public function remove($id, $options = [])
    {
        $_options = [
            'area' => false,
        ];

        $options = array_merge($_options, $options);

        if ($options['area']) {
            $this->area = $item['area'];
        }

        unset(self::$data[$this->area][$id]);
    }
629343
public function delete(EntityInterface $resource, $options = [])
    {
        return (bool)$this->query()->delete()->where([
            $this->getPrimaryKey() => $resource->get($this->getPrimaryKey())
        ])->execute();
    }
987425
public function delete($publicId, $options = array())
    {
        $response = $this->destroy($publicId, $options);

        return (boolean) ($response['result'] == 'ok');
    }
904881
public function delete($uri, $body = null, array $options = [])
    {
        return $this->request(self::REQUEST_METHOD_DELETE, $uri, $body, $options);
    }
1319867
public function delete($resource, array $args = [], array $options = [])
    {
        $response = parent::delete($resource, $args, $options);
        $this->calls[] = [
            'method' => 'DELETE',
            'resource' => $resource,
            'args' => $args,
            'options' => $options,
            'success' => $response->success(),
            'response' => $response->getBody(),
        ];
        return $response;
    }
65394
public function updateBucket(array $options)
    {
        if (!in_array($options['BucketType'], [Bucket::TYPE_PUBLIC, Bucket::TYPE_PRIVATE])) {
            throw new ValidationException(
                sprintf('Bucket type must be %s or %s', Bucket::TYPE_PRIVATE, Bucket::TYPE_PUBLIC)
            );
        }

        if (!isset($options['BucketId']) && isset($options['BucketName'])) {
            $options['BucketId'] = $this->getBucketIdFromName($options['BucketName']);
        }

        $response = $this->client->request('POST', $this->apiUrl.'/b2_update_bucket', [
            'headers' => [
                'Authorization' => $this->authToken,
            ],
            'json' => [
                'accountId' => $this->accountId,
                'bucketId' => $options['BucketId'],
                'bucketType' => $options['BucketType']
            ]
        ]);

        return new Bucket($response['bucketId'], $response['bucketName'], $response['bucketType']);
    }
394053
public function Delete($UserID, $Options = array()) {
      if ($UserID == $this->GetSystemUserID()) {
         $this->Validation->AddValidationResult('', 'You cannot delete the system user.');
         return FALSE;
      }
      
      $Content = array();
      
      // Remove shared authentications.
      $this->GetDelete('UserAuthentication', array('UserID' => $UserID), $Content);

      // Remove role associations.
      $this->GetDelete('UserRole', array('UserID' => $UserID), $Content);
      
      $this->DeleteContent($UserID, $Options, $Content);
      
      // Remove the user's information
      $this->SQL->Update('User')
         ->Set(array(
            'Name' => T('[Deleted User]'),
            'Photo' => null,
            'Password' => RandomString('10'),
            'About' => '',
            'Email' => 'user_'.$UserID.'@deleted.email',
            'ShowEmail' => '0',
            'Gender' => 'u',
            'CountVisits' => 0,
            'CountInvitations' => 0,
            'CountNotifications' => 0,
            'InviteUserID' => null,
            'DiscoveryText' => '',
            'Preferences' => null,
            'Permissions' => null,
            'Attributes' => Gdn_Format::Serialize(array('State' => 'Deleted')),
            'DateSetInvitations' => null,
            'DateOfBirth' => null,
            'DateUpdated' => Gdn_Format::ToDateTime(),
            'HourOffset' => '0',
            'Score' => null,
            'Admin' => 0,
            'Deleted' => 1
            ))
         ->Where('UserID', $UserID)
         ->Put();

      // Remove user's cache rows
      $this->ClearCache($UserID);
      
      return TRUE;
   }
1255866
public function delete($options)
    {
        $where = $this->parseWhere($options['where']);
        $bulk = new BulkWrite;
        if (1 == $options['limit']) {
            $deleteOptions = ['limit' => 1];
        } else {
            $deleteOptions = ['limit' => 0];
        }
        $bulk->delete($where, $deleteOptions);
        $this->log('remove', $where, $deleteOptions);
        return $bulk;
    }
417036
public function delete($projectStatus, $params = array(), $options = array())
    {
        $path = sprintf("/project_statuses/%s", $projectStatus);
        return $this->client->delete($path, $params, $options);
    }
1182904
public function delete($url, array $options = [])
    {
        if ($token = $this->fetch('token')) {
            $this->bearer($token);
        }

        if (array_key_exists('delete', $this->methodHeaders)) {
            $this->addHeader('Content-Type', $this->methodHeaders['delete']['content_type']);
            $this->addHeader('Accept', $this->methodHeaders['delete']['accept']);
        }

        try {
            $response = $this->request->delete(sprintf('%s?%s', $this->getRealUrl($url, 'delete'), http_build_query(array_merge([$this->paramKey => $this->apiKey], $options))), [
                'headers' => $this->headers,
            ]);
        } catch (RequestException $e) {
            $response = $e->getResponse();
        }

        return $this->convertToSymfonyResponse($response);
    }
745696
public function delete($files, array $options = [])
    {
        collect(array_wrap($options))->each(function ($file) {
            Storage::delete(sprintf('%s/%s', $this->uploadFolder, array_get($file, 'filename')));
        });

        return response()->json('Files deleted', 200);
    }
948141
public function groupDelete($groupId, $options=array()){

        $data = array();
        
        $data['group_id'] = $groupId;

        $data = array_merge($data, $options);

        return $this->request($this->groupDeleteUrl, $data);
    }
1032665
public static function doDelete(array $options=array(), $instance=null, $IDField=null) {
		self::prepareQuery($options, $instance, $IDField);
		return self::$instances[$instance]->delete($options);
	}