NAMD / pypln.web

Web interface for PyPLN
http://pypln.org/
GNU General Public License v3.0
12 stars 8 forks source link

Replace "properties" with "properties_url" in document list #112

Closed turicas closed 10 years ago

turicas commented 10 years ago

Since Document class (pypln.api) has a method called properties, it'll be easier for us if we do not answer a document listing with a 'properties' property. As it is the URL which have the document's properties, I think the best option is to replace it with properties_url. In the same way (and to be consistent), I think we should replace corpus key with corpus_url.

flavioamieiro commented 10 years ago

The corpus attribute returned by the server is in fact another entity, it's only represented in the json as a URL that points to it. properties, on the other hand, is a URL that contains information about this document, so maybe it does make sense for it to be called properties_url. Anyway, I don't see a very big problem in the code we have now (with properties being translated to properties_url).

turicas commented 10 years ago

I just don't like having it has a corner case in every part of code (if key == 'properties': ...) but I can live with it. :)