Handles request for deleting account
497072
@RequestMapping(value = "/delete", method = RequestMethod.POST)
	public @ResponseBody
	void delete(
			@RequestParam(value = "username", required = true) String username,
			HttpServletResponse response) {
		logger.debug("Received request to delete account");

		ResponseAccount responseAccount = accountService
				.getAccountByUsername(username);
		if (responseAccount.getAccount() == null) {
			try {
				response.sendError(500, "No such user exists: " + username);
			} catch (IOException e) {
				e.printStackTrace();
				return;
			}
			return;
		}
		accountService.delete(responseAccount.getAccount());

	}
515101
def complete_request(self, account_id, request_id, **params):
        """"""
        response = self._post(
            'v2', 'accounts', account_id, 'transactions', request_id,
            'complete', data=params)
        return self._make_api_object(response, APIObject)
659969
def delete(self, request, _id):
        
        _id = deserialize(_id)

        to_delete = self.collection.get({'_id': _id})
        if to_delete:
            deleted = to_delete.delete()

            return Response(
                response=serialize(deleted),
                status=(
                    200 if not all(
                        key in deleted for key in [
                            'error_code', 'error_type', 'error_message'
                        ]
                    ) else 400
                )
            )
        else:
            return Response(
                response=serialize(
                    DocumentNotFoundError(self.collection.__name__, _id)
                ),
                status=404
            )
1079117
function (req, res) {
    User.destroy({id: req.params.id}).exec(function (err, user) {
      if(err) return res.json({ err: err }, 500);
      else res.ok();
    });
  }
966920
def delete(self):
        
        resource = self.RESOURCE.format(
            account_id=self.account.id,
            tailored_audience_id=self.tailored_audience_id,
            id=self.id)
        response = Request(self.account.client, 'delete', resource).perform()
        return self.from_response(response.body['data'])
152336
function (req, res) {
        var id = req.params.id;
        {modelName}.findByIdAndRemove(id, function (err, {name}) {
            if (err) {
                return res.status(500).json({
                    message: 'Error when deleting the {name}.',
                    error: err
                });
            }
            return res.status(204).json();
        });
    }
1169908
def deleted_user_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/deleted_users/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
912795
def delete_user(username,
                token_manager=None,
                app_url=defaults.APP_URL):
    
    account_id = get_account_id(username,
                                token_manager=token_manager,
                                app_url=app_url)

    headers = token_manager.get_access_token_headers()
    auth_url = environment.get_auth_url(app_url=app_url)
    url = "%s/api/v1/accounts/%s" % (auth_url, account_id)
    response = requests.delete(url, headers=headers)

    if response.status_code == 204:
        return response.text

    else:
        raise JutException('Error %s; %s' % (response.status_code, response.text))
151457
function performRemove() {
        UserService.remove(vm.user)
          .then(deleteUserSuccess)
          .catch(deleteUserCatch);

        function deleteUserSuccess() {
          Toast.show({type: 'success', text: 'User ' + vm.displayName + ' deleted'});
          vm.showList();
        }

        function deleteUserCatch(err) {
          Toast.show({
            type: 'warn',
            text: 'Error while deleting user ' + vm.displayName,
            link: {state: $state.$current, params: $stateParams}
          });

          if (form && err) {
            form.setResponseErrors(err, vm.errors);
          }
        }
      }
1345489
async def delete_user(name):
    """"""
    app_log.info("Deleting user %s", name)
    await api_request('users/{}/server'.format(name), method='DELETE')
    await api_request('users/{}'.format(name), method='DELETE')
907201
def delete_account(account_id, options = {})
      content_type = { 'Content-Type' => 'application/json' }
      content_type.merge(options[:headers]) if options[:headers]

      uri = build_uri("/accounts/#{account_id}")

      http = initialize_net_http_ssl(uri)
      request = Net::HTTP::Delete.new(uri.request_uri, headers(content_type))
      response = http.request(request)
      generate_log(request, response, uri)
      json = response.body
      json = '{}' if json.nil? || json == ''
      JSON.parse(json)
    end
754320
def delete(self):
        ''''''
        response = self.hv.delete_request('people/' + str(self.id))
        return response
1069077
function del(url, fn){
  var req = request('DELETE', url);
  if (fn) req.end(fn);
  return req;
}
74818
def delete(self, endpoint, params=None, version='1.1', json_encoded=False):
        """"""
        return self.request(endpoint, 'DELETE', params=params, version=version, json_encoded=json_encoded)
736250
public function deleteAccount()
    {
        if (!isset($this->childauth)) {
            throw new Exception(
                sprintf(
                    'No child authentication set - cannot delete your own account.'
                )
            );
        }

        $endPointUrl = $this->apiurl."/account/";

        $response = $this->curlDelete($endPointUrl);

        return $response;
    }
708288
def _delete_account(self, username):
        

        # account deleted

        ds_user = self.get_user(username)
        if ds_user is not None:
            self._call(["delete", "user", "name=%s" % username])

        return
731208
def delete(self, url, data=None, params=None):
        
        return self.request("delete", url, data, params)