Delete the entire API ID

@return {Promise} which resolves to the ID of the API that was deleted
163040
function(apiId) {
        return new Promise(function(resolve, reject) {
            APIG.deleteRestApi({
                restApiId: apiId
            }, function(err) {
                if (err) {
                    if (err.code === 404 || err.code === 'NotFoundException') {
                        // API didn't exist to begin with
                        return resolve(apiId);
                    }

                    return reject(err);
                }

                resolve(apiId);
            });
        });
    }
253946
def automation_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/automations/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
1228211
function destroy(publicAPI, model = {}) {
  const previousDestroy = publicAPI.destroy;

  if (!model.subscriptions) {
    model.subscriptions = [];
  }

  publicAPI.destroy = () => {
    if (previousDestroy) {
      previousDestroy();
    }
    while (model.subscriptions && model.subscriptions.length) {
      model.subscriptions.pop().unsubscribe();
    }
    Object.keys(model).forEach((field) => {
      delete model[field];
    });

    // Flag the instance beeing deleted
    model.deleted = true;
  };
}
672022
def delete_api(self, ret):
        '''
        
        '''

        exists_response = __salt__['boto_apigateway.api_exists'](name=self.rest_api_name,
                                                                 description=_Swagger.AWS_API_DESCRIPTION,
                                                                 **self._common_aws_args)
        if exists_response.get('exists'):
            if __opts__['test']:
                ret['comment'] = 'Rest API named {0} is set to be deleted.'.format(self.rest_api_name)
                ret['result'] = None
                ret['abort'] = True
                return ret

            delete_api_response = __salt__['boto_apigateway.delete_api'](name=self.rest_api_name,
                                                                         description=_Swagger.AWS_API_DESCRIPTION,
                                                                         **self._common_aws_args)
            if not delete_api_response.get('deleted'):
                ret['result'] = False
                ret['abort'] = True
                if 'error' in delete_api_response:
                    ret['comment'] = 'Failed to delete rest api: {0}.'.format(delete_api_response['error']['message'])
                return ret

            ret = _log_changes(ret, 'delete_api', delete_api_response)
        else:
            ret['comment'] = ('api already absent for swagger file: '
                              '{0}, desc: {1}'.format(self.rest_api_name, self.info_json))

        return ret
1047547
def macro_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/macros/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
814258
def get_delete(url, id, method, key=None):
        
        return Util(
            url=url + id + "/",
            method=method,
            key=key,
        ).json_result()
334343
def delete(self):
        
        resp = self._client.delete(type(self).api_endpoint, model=self)

        if 'error' in resp:
            return False
        self.invalidate()
        return True
1074212
def delete_by_external_id(self, api_objects):
        
        if not isinstance(api_objects, collections.Iterable):
            api_objects = [api_objects]
        return CRUDRequest(self).delete(api_objects, destroy_many_external=True)
1021535
def delete(id, options={})
      request :delete, id, options
    rescue Stretcher::RequestError => e
      raise e if e.http_response.status != 404
      false
    end
123794
function(options) {
        if (!this.id)
          return Promise.reject(new Error('The status id is not exists.'));
        var request = AVRequest('statuses', null, this.id, 'DELETE', options);
        return request;
      }
1235633
function() {
        var that = this;
        return CRUD.EntityManager.getAdapter().Delete(that).then(function(result) {
            if (result.Action == 'deleted') {
                CRUD.log(that.getType() + ' ' + that.getID() + ' has been deleted! ');
                delete CRUD.EntityManager.cache[that.getType()][that.getID()];
                that.__values__[CRUD.EntityManager.getPrimary(that.getType())].ID = false;
            }
            return result;
        });
    }
208619
function onDeleteFail(model, params, reason) {
  Flux.dispatch(actionTypes.API_DELETE_FAIL, {
    model: model,
    params: params,
    reason: reason,
  })
  return Promise.reject(reason)
}
1181503
def delete_object(self, id):
        """"""
        return self.request(
            "{0}/{1}".format(self.version, id), method="DELETE"
        )
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)
1018720
def remove(cls, id):
        

        api = Client.instance().api
        api.index(id).delete()
11386
function clear() {
            showHandlers.splice( 0, showHandlers.length );
            hideHandlers.splice( 0, hideHandlers.length );
            return api;
         }
403115
function(newId, oldId) {
            var m = this.get(newId);
            if (m) this.remove(m);

            this._byId[newId] = this._byId[oldId];
            delete this._byId[oldId];
        }