While working with python-gdata (2.0.11) to interact with the profiles API,
trying to update a profile's extended information, I have just spent 2 days to
figure out that I shouldn't be assigning an instance of
gdata.contacts.data.Street to StructuredPostalAddress.street, but rather a
gdata.data.Street
The similarity in class names is confusing and, since I needed to use
gdata.contacts.data.PhoneNumber to work with phone numbers, I assumed it would
be the same for postal address..
Plus, the update requests received a "200 OK" response but the address was
never added, so it was hard to see what the problem was. Now this detail is
specific to the API (so not the library), but it didn't help.
For making the client library easier to understand and use, I would suggest
adding comments in the code to describe each of the duplicate classes' utility.
For example, saying something like this above gdata.contacts.data.Street:
"This class should be used with [x,y,z] but not with StructuredPostalAddress,
for the latter, see gdata.data.Street"
Original issue reported on code.google.com by LeLu...@gmail.com on 17 Sep 2010 at 3:30
Original issue reported on code.google.com by
LeLu...@gmail.com
on 17 Sep 2010 at 3:30