a method to determine if document exists
            
        :param doc_id: string with id of document in bucket 
        :param rev_id: [optional] string with revision id of document in bucket
        :return: boolean indicating existence of document

def exists(self, doc_id, rev_id=''):
        
        '''
            a method to determine if document exists
            
        :param doc_id: string with id of document in bucket 
        :param rev_id: [optional] string with revision id of document in bucket
        :return: boolean indicating existence of document
        '''

        title = '%s.exists' % self.__class__.__name__

    # validate inputs
        input_fields = {
            'doc_id': doc_id,
            'rev_id': rev_id
        }
        for key, value in input_fields.items():
            if value:
                object_title = '%s(%s=%s)' % (title, key, str(value))
                self.fields.validate(value, '.%s' % key, object_title)
    
    # send request and construct response
        url = self.bucket_url + '/%s' % doc_id
        params = None
        if rev_id:
            params = { 'rev': rev_id }
        response = requests.get(url, params=params)
        if not 'error' in response.json():
            return True
        return False