https://developer.zendesk.com/rest_api/docs/core/resource_collections#delete-a-resource-collection
350153
def resource_collection_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/resource_collections/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
1214582
def delete_object!(objectID, request_options = {})
      res = delete_object(objectID, request_options)
      wait_task(res['taskID'], WAIT_TASK_DEFAULT_TIME_BEFORE_RETRY, request_options)
      res
    end
499934
def delete_api_method_response(restApiId, resourcePath, httpMethod, statusCode,
                               region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        resource = describe_api_resource(restApiId, resourcePath, region=region,
                                         key=key, keyid=keyid, profile=profile).get('resource')
        if resource:
            conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
            conn.delete_method_response(restApiId=restApiId, resourceId=resource['id'],
                                        httpMethod=httpMethod, statusCode=str(statusCode))  # future lint: disable=blacklisted-function
            return {'deleted': True}
        return {'deleted': False, 'error': 'no such resource'}
    except ClientError as e:
        return {'deleted': False, 'error': __utils__['boto3.get_error'](e)}
1110969
def destroy(options={}, &block)
      object = resource
      options[:location] ||= smart_collection_url

      destroy_resource(object)
      respond_with_dual_blocks(object, options, &block)
    end
115349
function deleteItemController(path) {
    restController.call(this, 'delete', path);
    var ctrl = this;

    /**
     * Delete controller use this method to output a service as a rest
     * service
     * Output the deleted document with the $outcome property
     *
     * @param {apiService} service
     *
     * @return {Promise}
     */
    this.jsonService = function(service) {

        var params = ctrl.getServiceParameters(ctrl.req);

        var promise = service.getResultPromise(params);

        ctrl.outputJsonFromPromise(service, promise);

        return promise;
    };
}
701978
def resource_group_delete(name, **kwargs):
    '''
    

    '''
    result = False
    resconn = __utils__['azurearm.get_client']('resource', **kwargs)
    try:
        group = resconn.resource_groups.delete(name)
        group.wait()
        result = True
    except CloudError as exc:
        __utils__['azurearm.log_cloud_error']('resource', str(exc), **kwargs)

    return result
1192307
def delete_dataset(dataset_id,**kwargs):
    
    try:
        d = db.DBSession.query(Dataset).filter(Dataset.id==dataset_id).one()
    except NoResultFound:
        raise HydraError("Dataset %s does not exist."%dataset_id)

    dataset_rs = db.DBSession.query(ResourceScenario).filter(ResourceScenario.dataset_id==dataset_id).all()
    if len(dataset_rs) > 0:
        raise HydraError("Cannot delete %s. Dataset is used by one or more resource scenarios."%dataset_id)

    db.DBSession.delete(d)

    db.DBSession.flush()

    #Remove ORM references to children of this dataset (metadata, collection items)
    db.DBSession.expunge_all()
1061029
def delete(self, name):
        
        if self.service.splunk_version >= (5,):
            Collection.delete(self, name)
        else:
            raise IllegalOperationException("Deleting indexes via the REST API is "
                                            "not supported before Splunk version 5.")
936088
DocumentSet remove(ResourcePath key) {
    QueryDocumentSnapshot document = keyIndex.get(key);
    if (document == null) {
      return this;
    }

    ImmutableSortedMap<ResourcePath, QueryDocumentSnapshot> newKeyIndex = keyIndex.remove(key);
    ImmutableSortedSet<QueryDocumentSnapshot> newSortedSet = sortedSet.remove(document);
    return new DocumentSet(newKeyIndex, newSortedSet);
  }
938265
def api_delete(service, file_id, owner_token):
    """"""
    service += 'api/delete/%s' % file_id
    r = requests.post(service, json={'owner_token': owner_token, 'delete_token': owner_token})
    r.raise_for_status()

    if r.text == 'OK':
        return True
    return False
1277131
def delete(collection_name, spec, safe, last_error_args):
    
    data = __ZERO
    data += bson._make_c_string(collection_name)
    data += __ZERO
    data += bson.BSON.encode(spec)
    if safe:
        (_, remove_message) = __pack_message(2006, data)
        (request_id, error_message) = __last_error(last_error_args)
        return (request_id, remove_message + error_message)
    else:
        return __pack_message(2006, data)
785913
def delete(self, user):
        """"""
        if user:
            can_delete = yield self.can_delete(user)
        else:
            can_delete = False

        if not can_delete:
            raise exceptions.Unauthorized('User may not delete the resource')

        doc = {
            '_id': self.id,
            '_deleted': True
        }

        try:
            doc['_rev'] = self._rev
        except AttributeError:
            pass

        db = self.db_client()
        yield db.save_doc(doc)

        self._resource = doc
1061932
def delete(self, request, id=None):
        
        if id:
            obj = get_object_or_404(self.queryset(request), id=id)
            if not self.has_delete_permission(request, obj):
                return HttpResponseForbidden(_('You do not have permission to perform this action.'))
            else:
                return self.delete_object(request, obj)
        else:
            # No delete requests allowed on collection view
            return HttpResponseForbidden()
155500
def remove_dataset_from_collection(dataset_id, collection_id, **kwargs):
    
    collection_i = _get_collection(collection_id)
    collection_item = _get_collection_item(collection_id, dataset_id)
    if collection_item is None:
        raise HydraError("Dataset %s is not in collection %s.",
                                                    dataset_id,
                                                    collection_id)
    db.DBSession.delete(collection_item)
    db.DBSession.flush()

    db.DBSession.expunge_all()

    return 'OK'
880306
def remove_data(self, request, pk=None):
        """"""
        collection = self.get_object()

        if 'ids' not in request.data:
            return Response({"error": "`ids`parameter is required"}, status=status.HTTP_400_BAD_REQUEST)

        for data_id in request.data['ids']:
            collection.data.remove(data_id)

        return Response()
474691
def delete_resource_group(access_token, subscription_id, rgname):
    '''
    '''
    endpoint = ''.join([get_rm_endpoint(),
                        '/subscriptions/', subscription_id,
                        '/resourcegroups/', rgname,
                        '?api-version=', RESOURCE_API])
    return do_delete(endpoint, access_token)
1338536
def organization_field_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/organization_fields/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)