histrio / py-couchdb

Modern pure python CouchDB Client.
https://pycouchdb.readthedocs.org/
Other
120 stars 43 forks source link

get_attachment with more args #23

Closed dedalus2000 closed 11 years ago

dedalus2000 commented 11 years ago

As fat I need to get an attachemnt to a particular revision I need the "rev" argument to be added to the get_attachment function.

I can propose to add the kwargs (like for many other funtions):

def get_attachment(self, doc, filename, stream=False, **kwargs): .. r, result = self.resource(doc['_id']).get(filename, stream=stream, params=kwargs) ..

dedalus2000 commented 11 years ago

Or should it be more congruos to get always the requested rev? .. self.resource(doc['_id']).get(filename, stream=stream, rev=doc["_rev"]) ..

niwinz commented 11 years ago

Fixed! thanks.