Deletes a system hook. This method requires admin access.

<pre><code>GitLab Endpoint: DELETE /hooks/:hook_id</code></pre>

@param hookId the ID of the system hook to delete
@throws GitLabApiException if any exception occurs
777490
public void deleteSystemHook(Integer hookId) throws GitLabApiException {

        if (hookId == null) {
            throw new RuntimeException("hookId cannot be null");
        }

        Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
        delete(expectedStatus, null, "hooks", hookId);
    }
203531
public boolean removePluginById(String id) {
		SimonConsolePlugin plugin = getPluginById(id);
		return plugin != null && plugins.remove(plugin);
	}
1163891
public void api_application_applicationId_DELETE(Long applicationId) throws IOException {
		String qPath = "/me/api/application/{applicationId}";
		StringBuilder sb = path(qPath, applicationId);
		exec(qPath, "DELETE", sb.toString(), null);
	}
741202
private void deleteObject(final WebContext ctx, final Bucket bucket, final String id) {
        StoredObject object = bucket.getObject(id);
        object.delete();

        ctx.respondWith().status(HttpResponseStatus.OK);
        signalObjectSuccess(ctx);
    }
362025
protected void cleanupOnExit() {
        String threadName = "Shutdown Hook Deletion Thread for Temporary DB " + dataDir.toString();
        final DB db = this;
        Runtime.getRuntime().addShutdownHook(new Thread(threadName) {

            @Override
            public void run() {
                // ManagedProcess DestroyOnShutdown ProcessDestroyer does
                // something similar, but it shouldn't hurt to better be save
                // than sorry and do it again ourselves here as well.
                try {
                    // Shut up and don't log if it was already stop() before
                    if (mysqldProcess != null && mysqldProcess.isAlive()) {
                        logger.info("cleanupOnExit() ShutdownHook now stopping database");
                        db.stop();
                    }
                } catch (ManagedProcessException e) {
                    logger.warn("cleanupOnExit() ShutdownHook: An error occurred while stopping the database", e);
                }

                if (dataDir.exists() && (configuration.isDeletingTemporaryBaseAndDataDirsOnShutdown() && Util.isTemporaryDirectory(dataDir.getAbsolutePath()))) {
                    logger.info("cleanupOnExit() ShutdownHook quietly deleting temporary DB data directory: " + dataDir);
                    FileUtils.deleteQuietly(dataDir);
                }
                if (baseDir.exists() && (configuration.isDeletingTemporaryBaseAndDataDirsOnShutdown() && Util.isTemporaryDirectory(dataDir.getAbsolutePath()))) {
                    logger.info("cleanupOnExit() ShutdownHook quietly deleting temporary DB base directory: " + baseDir);
                    FileUtils.deleteQuietly(baseDir);
                }
            }
        });
    }
1324936
public void deleteSpaceSync(String spaceId) {
        log.debug("deleteSpaceSync(" + spaceId + ")");
        throwIfSpaceNotExist(spaceId);

        Map<String, String> allProps = getAllSpaceProperties(spaceId);
        allProps.put("is-delete", "true");
        doSetSpaceProperties(spaceId, allProps);

        SpaceDeleteWorker deleteWorker = getSpaceDeleteWorker(spaceId);
        deleteWorker.run();
    }
1337676
def delete_webhook(self, id, **data):
        
        
        return self.delete("/webhooks/{0}/".format(id), data=data)
855060
public void delete(String key) throws EtcdClientException {
        Preconditions.checkNotNull(key);

        URI uri = buildUriWithKeyAndParams(key, null);
        HttpDelete delete = new HttpDelete(uri);

        syncExecute(delete, new int[]{200, 404});
    }
980627
public void deleteSystemHook(SystemHook hook) throws GitLabApiException {

        if (hook == null) {
            throw new RuntimeException("hook cannot be null");
        }

        deleteSystemHook(hook.getId());
    }
646614
def _pre_delete_hook(cls, key):
        
        if cls.searching_enabled:
            doc_id = cls.search_get_document_id(key)
            index = cls.search_get_index()
            index.delete(doc_id)
460725
public void delete() {
        URL url = DEVICE_PIN_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
        BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE");
        BoxAPIResponse response = request.send();
        response.disconnect();
    }
862129
def remove_hook(self, repo_id, name):
        """"""
        ghrepo = self.api.repository_with_id(repo_id)
        if ghrepo:
            hooks = (h for h in ghrepo.hooks()
                     if h.config.get('url', '') == self.webhook_url)
            hook = next(hooks, None)
            if not hook or hook.delete():
                Repository.disable(user_id=self.user_id,
                                   github_id=repo_id,
                                   name=name)
                return True
        return False
1141932
public static void delete(final String id) throws AppPlatformException, IOException {
        assert(id != null);
        final BandwidthClient client = BandwidthClient.getInstance();
        client.delete(client.getUserResourceInstanceUri(BandwidthConstants.DOMAINS_URI_PATH, id));
    }
1056962
def delete(self, context):
	
		
		
		status_code, msg = self.__endpoint.delete(
			"/applications/application/{}".format(self.__name)
		)
		self.__available = False
445871
function _deactivate_plugin_hook() {
            $this->_logger->entrance( 'slug = ' . $this->_slug );

            if ( ! $this->is_user_admin() ) {
                return;
            }

            $is_network_deactivation  = fs_is_network_admin();
            $storage_keys_for_removal = array();

            $this->_admin_notices->clear_all_sticky();

            $storage_keys_for_removal[] = 'sticky_optin_added';
            if ( isset( $this->_storage->sticky_optin_added ) ) {
                unset( $this->_storage->sticky_optin_added );
            }

            if ( ! isset( $this->_storage->is_plugin_new_install ) ) {
                // Remember that plugin was already installed.
                $this->_storage->is_plugin_new_install = false;
            }

            // Hook to plugin uninstall.
            register_uninstall_hook( $this->_plugin_main_file_path, array( 'Freemius', '_uninstall_plugin_hook' ) );

            $this->clear_module_main_file_cache();
            $this->clear_sync_cron( $this->_is_network_active );
            $this->clear_install_sync_cron();

            if ( $this->is_registered() ) {
                if ( $this->is_premium() && ! $this->has_active_valid_license() ) {
                    FS_Plugin_Updater::instance( $this )->delete_update_data();
                }

                if ( $is_network_deactivation ) {
                    // Send deactivation event.
                    $this->sync_installs( array(
                        'is_active' => false,
                    ) );
                } else {
                    // Send deactivation event.
                    $this->sync_install( array(
                        'is_active' => false,
                    ) );
                }
            } else {
                if ( ! $this->has_api_connectivity() ) {
                    // Reset connectivity test cache.
                    unset( $this->_storage->connectivity_test );

                    $storage_keys_for_removal[] = 'connectivity_test';
                }
            }

            if ( $is_network_deactivation ) {
                if ( isset( $this->_storage->sticky_optin_added_ms ) ) {
                    unset( $this->_storage->sticky_optin_added_ms );
                }

                if ( ! empty( $storage_keys_for_removal ) ) {
                    $sites = self::get_sites();

                    foreach ( $sites as $site ) {
                        $blog_id = self::get_site_blog_id( $site );

                        foreach ( $storage_keys_for_removal as $key ) {
                            $this->_storage->remove( $key, false, $blog_id );
                        }

                        $this->_storage->save( $blog_id );
                    }
                }
            }

            // Clear API cache on deactivation.
            FS_Api::clear_cache();

            $this->remove_sdk_reference();
        }
527503
public void blockUser(Integer userId) throws GitLabApiException {
        if (userId == null) {
            throw new RuntimeException("userId cannot be null");
        }

        if (isApiVersion(ApiVersion.V3)) {
            put(Response.Status.CREATED, null, "users", userId, "block");
        } else {
            post(Response.Status.CREATED, (Form) null, "users", userId, "block");
        }
    }
886276
public static function delete_all_for_context($contextid) {
        global $DB;

        $areaids = $DB->get_fieldset_select('grading_areas', 'id', 'contextid = ?', array($contextid));
        $methods = array_keys(self::available_methods(false));

        foreach($areaids as $areaid) {
            $manager = get_grading_manager($areaid);
            foreach ($methods as $method) {
                $controller = $manager->get_controller($method);
                $controller->delete_definition();
            }
        }

        $DB->delete_records_list('grading_areas', 'id', $areaids);
    }