Destroy a group.

        :param str id: a group ID
        :return: ``True`` if successful
        :rtype: bool
338042
def destroy(self, id):
        
        path = '{}/destroy'.format(id)
        url = utils.urljoin(self.url, path)
        response = self.session.post(url)
        return response.ok
256453
def destroy(self, bot_id):
        
        url = utils.urljoin(self.url, 'destroy')
        payload = {'bot_id': bot_id}
        response = self.session.post(url, json=payload)
        return response.ok
334966
def destroy_domain(self, domain_id):
        
        json = self.request('/domains/%s/destroy' % domain_id, method='GET')
        status = json.get('status')
        return status
1203165
def remove_tweet(self, id):
        
        try:
            self._client.destroy_status(id=id)
            return True
        except TweepError as e:
            if e.api_code in [TWITTER_PAGE_DOES_NOT_EXISTS_ERROR, TWITTER_DELETE_OTHER_USER_TWEET]:
                return False
            raise
324032
def group_membership_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/group_memberships/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
211904
def delete(self, id: int):
        
        assert isinstance(id, int)

        self.open_session()
        to_delete = self.get(id)
        self.session.delete(to_delete)
        self.save()
1021535
def delete(id, options={})
      request :delete, id, options
    rescue Stretcher::RequestError => e
      raise e if e.http_response.status != 404
      false
    end
274437
public function destroy($id)
	{
		try
		{
			$query = $this->db->getQuery(true);
			$query->delete($this->db->quoteName('#__session'))
				->where($this->db->quoteName('session_id') . ' = ' . $this->db->quote($id));

			// Remove a session from the database.
			$this->db->setQuery($query);

			return (boolean) $this->db->execute();
		}
		catch (\Exception $e)
		{
			return false;
		}
	}
1034627
function destroy( $id )
	{
		$this->id_format($id);
		$params = array();
		$params['id'] = $id;
		return $this->oauth->post( 'statuses/destroy',  $params );
	}
1028322
def delete(self, _id):
        
        mongo_response = yield self.collection.remove({"_id": ObjectId(_id)})

        raise Return(mongo_response)
724654
public static function destroyByGroup($group_id)
	{
		$group_id = (is_array($group_id) ? $group_id : array($group_id));

		$blank = self::blank();

		$query = $blank->getQuery()
			->delete($blank->getTableName())
			->whereIn('group_id', $group_id);

		if (!$query->execute())
		{
			return false;
		}

		return true;
	}
1039674
public function destroy($id)
    {
        // get permission by id
        $permission = Permission::find($id);

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

        // delete permission
        $deletePermission = $permission->delete();

        if (!$deletePermission) {
            return response()->json(null, 500); // @codeCoverageIgnore
        }

        return response()->json(null, 204);
    }
661546
def destroy_session(self, session_id):
        

        try:
            del self.sessions[session_id]
        except KeyError:
            pass

        # Invoke hooks
        invoke_hooks(self.hooks, "session_destroyed", session_id)
962429
public function destroy($id)
    {
     	$user_setting = User_setting::findOrfail($id);
     	$user_setting->delete();
        return URL::to('user_setting');
    }
801484
def get_group_by_id(self, group_id) -> typing.Optional['Group']:
        
        for group in self.groups:

            if group.group_id == group_id:
                return group

        return None
1265000
private void releaseID(int id) {
        ids.removeInt(id);
        nextID = 1;
        for (int i = 0; i < ids.size(); i++) {
            nextID = Math.max(ids.get(i) + 1, nextID);
        }
    }
889297
def destroy(self):
        
        resp = {}
        for key in self.keys:
            resp[key] = self.database.xgroup_destroy(key, self.name)
        return resp