stevenyvr987 / overdrive-evergreen-opac

Automatically exported from code.google.com/p/overdrive-evergreen-opac
0 stars 0 forks source link

Availability API response format differs from documentation #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The response object has properties to indicate number of available copies, 
number of holds, and number of copies owned, however if a count is zero, the 
related property is absent. This formatting differs from the documentation 
which indicates the property will always be present even for zero count.

The fix would be to normalize the format, ie, add in the property with zero 
count, so that the code can rely on a fixed format.

Original issue reported on code.google.com by steven3...@gmail.com on 19 Jun 2014 at 8:31

GoogleCodeExporter commented 9 years ago
The quick fix is to substitute a zero when the property is absent, but this has 
to be done everywhere the property value is needed. A better fix is to 
'normalize' the property at one place in the code.

Original comment by steven3...@gmail.com on 19 Jun 2014 at 8:56

GoogleCodeExporter commented 9 years ago
As a result of the quick fix, this issue is now downgraded. Refactoring of the 
code is needed to make the fix more generic so that it will be less of a 
maintenance issue.

Original comment by steven3...@gmail.com on 30 Jun 2014 at 8:59

GoogleCodeExporter commented 9 years ago

Original comment by steven3...@gmail.com on 4 Jul 2014 at 8:43

GoogleCodeExporter commented 9 years ago
The result of apiAvailability has been augmented to have zero numbers of avail. 
copies, holds, and copies owned.

Original comment by steven3...@gmail.com on 30 Jul 2014 at 7:27