Closed turicas closed 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
).
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. :)
Since
Document
class (pypln.api) has a method calledproperties
, 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 withproperties_url
. In the same way (and to be consistent), I think we should replacecorpus
key withcorpus_url
.