Deletes the Request with the given ID for the given user.
777185
def delete_request(self, user_id, request_id):
        """"""
        return self.request(
            "{0}_{1}".format(request_id, user_id), method="DELETE"
        )
1317953
def delete(self, id):
        
        try:
            response = yield self.client.delete(id)

            if response.get("n") > 0:
                self.write({"message": "Deleted %s object: %s" % (self.object_name, id) })
                return

            self.raise_error(404, "Resource not found")

        except InvalidId as ex:
            self.raise_error(400, message="Your ID is malformed: %s" % id)
        except:
            self.raise_error()

        self.finish()
1367164
public function destroy($id)
    {
        // get user by id
        $user = AppUser::withTrashed()->where('id', $id)->first();

        if (!$user) {
            return response()->json(null, 404);
        }

        // delete user
        $deleteUser = $user->forceDelete();

        return response()->json(null, 204);
    }
970952
def delete(cls, id):
        '''
        
        '''
        client = cls._new_api_client()
        return client.make_request(cls, 'delete', url_params={'id': id})
975139
public function destroy(Request $request, $id)
    {
        $tag = Tag::where(['id' => $id, 'user_id' => $request->user()->id])->firstOrFail();

        // Detach all tags from the did
        $tag->dids()->detach();

        $tag->delete();
    }
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)
1317854
public function deleteUser(Request $request, $user_id)
    {

        if ($request->user()->id == $user_id)
            return redirect()->back()
                ->with('warning', trans('web::seat.self_delete_warning'));

        $user = $this->getUser($user_id);
        $group = $user->group;

        // Delete the user.
        $user->delete();

        // Ensure the orphan group is cleaned up.
        if ($group->users->isEmpty()) $group->delete();

        return redirect()->back()
            ->with('success', trans('web::seat.user_deleted'));
    }
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')
867705
def user_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/users/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
930762
def user_sessions_delete(self, user_id, **kwargs):
        ""
        api_path = "/api/v2/users/{user_id}/sessions.json"
        api_path = api_path.format(user_id=user_id)
        return self.call(api_path, method="DELETE", **kwargs)
106850
def delete(method, hmc, uri, uri_parms, logon_required):
        """"""
        try:
            user = hmc.lookup_by_uri(uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        # Check user type
        type_ = user.properties['type']
        if type_ == 'pattern-based':
            raise BadRequestError(
                method, uri, reason=312,
                message="Cannot delete pattern-based user {!r}".
                format(user.name))
        # Delete the mocked resource
        user.manager.remove(user.oid)
1073375
def remove_user(self, user, **kwargs):
        """"""
        if isinstance(user, Entity):
            user = user['id']

        assert isinstance(user, six.string_types)

        endpoint = '{0}/{1}/users/{2}'.format(
            self.endpoint,
            self['id'],
            user,
        )
        return self.request('DELETE', endpoint=endpoint, query_params=kwargs)
1194894
def delete(self) :
        """"""
        if not self.URL :
            raise CreationError("Please save user first", None, None)

        r = self.connection.session.delete(self.URL)
        if r.status_code < 200 or r.status_code > 202 :
            raise DeletionError("Unable to delete user, url: %s, status: %s" %(r.url, r.status_code), r.content )

        self.URL = None
1225115
def delete(self, request, id, format=None):
        
        bot = self.get_bot(id, request.user)
        bot.delete()
        return Response(status=status.HTTP_204_NO_CONTENT)
1302655
def delete(cls, id, api_key=None, **kwargs):
        """"""
        inst = cls(api_key=api_key)
        endpoint = '/'.join((cls.get_endpoint(), id))
        inst.request('DELETE', endpoint=endpoint, query_params=kwargs)
        inst._is_deleted = True
        return True
981310
def UsersDelete (self, user_id):
        
        if self.__SenseApiCall__('/users/{user_id}.json'.format(user_id = user_id), 'DELETE'):
            return True
        else:
            self.__error__ = "api call unsuccessful"
            return False
328562
def delete(self):
        
        self.requester.delete(
            '/{endpoint}/{id}', endpoint=self.endpoint,
            id=self.id
        )
        return self