Delete a library entry.

        :param eid str: Entry ID
        :param token str: OAuth Token
        :return: True or ServerError
        :rtype: Bool or Exception
343723
def delete(self, eid, token):
        
        final_headers = self.header
        final_headers['Authorization'] = "Bearer {}".format(token)

        r = requests.delete(self.apiurl + "/library-entries/{}".format(eid), headers=final_headers)

        if r.status_code != 204:
            print(r.status_code)
            raise ConnectionError(r.text)

        return True
1196233
def delete(self, using=None):
        
        using = using or router.db_for_write(self.__class__, instance=self)
        connection = connections[using]
        logger.debug("Deleting LDAP entry %s" % self.dn)
        connection.delete_s(self.dn)
        signals.post_delete.send(sender=self.__class__, instance=self)
216302
def delete_user(self, user):
        
        self.project_service.set_auth(self._token_project)
        self.project_service.delete_user(user)
1342784
def delete_endpoint(self, endpoint_id):
        
        self._validate_uuid(endpoint_id)

        url = "/notification/v1/endpoint/{}".format(endpoint_id)
        response = NWS_DAO().deleteURL(url, self._write_headers())

        if response.status != 204:
            raise DataFailureException(url, response.status, response.data)
        return response.status
444917
def _delete(self, identifier=None):
        
        query = text("""
            DELETE FROM identifier_index
            WHERE identifier = :identifier;
        """)
        self.execute(query, identifier=identifier)
922616
def delete_entity(self, etype, entity_id):
        
        r = fapi.delete_entity(self.namespace, self.name, etype,
                                  entity_id, self.api_url)
        fapi._check_response_code(r, 202)
442469
public void deleteToken(String token, DeleteTokenHandler handler) {
        HMSAgentLog.i("deleteToken:token:" + StrUtils.objDesc(token) + " handler=" + StrUtils.objDesc(handler));
        this.token = token;
        this.handler = handler;
        connect();
    }
163058
def delete(self, id):
        
        resp = self.client.accounts.delete(id)
        self.display(resp)
523697
def delete_webhook(webhook_id)
      response = self.class.delete("#{@api.webhook_config[:url]}/#{URI::escape(webhook_id)}",
                                 :query => {
                                   :auth_token => @token
                                 },
                                 :headers => @api.headers
      )

      ErrorHandler.response_code_to_exception_for :webhook, webhook_id, response
      true
    end
265520
def oauth_token_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/oauth/tokens/{id}"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
835640
def revoke_token(token_id, user):
    
    try:
        token = TokenBlacklist.query.filter_by(id=token_id, user_identity=user).one()
        token.revoked = True
        db.session.commit()
    except NoResultFound:
        raise TokenNotFound("Could not find the token {}".format(token_id))
530100
def delete(context, id, etag):
    
    result = feeder.delete(context, id=id, etag=etag)

    if result.status_code == 204:
        utils.print_json({'id': id, 'message': 'Feeder deleted.'})
    else:
        utils.format_output(result, context.format)
1245287
def remove_entry_listener(self, registration_id):
        
        return self._stop_listening(registration_id,
                                    lambda i: multi_map_remove_entry_listener_codec.encode_request(self.name, i))
904236
def delete(self, uid):
        
        try:
            record = resource_db[uid].copy()

        except KeyError:
            return self.response_factory.not_found(errors=['Resource with UID {} does not exist!'])

        del resource_db[uid]

        return self.response_factory.ok(data=record)
609755
def remove_uid(self, uid):
        
        for sid in self.get('uid2sid', uid):
            self.remove('sid2uid', sid, uid)
        self.delete('uid2sid', uid)
651517
def token_revoke(token):
    """"""
    db.session.delete(token)
    db.session.commit()
    return redirect(url_for('.index'))
141467
def delete_subscription(self, subscription_id):
        
        url = self.SUBSCRIPTIONS_ID_URL % subscription_id

        connection = Connection(self.token)
        connection.set_url(self.production, url)

        return connection.delete_request()