eve-val/evelink — pull request #132 by metatoaster (2013-03-19 11:18:08+00:00)
Title: Streamline the get method

So here is the third choice I suggested. The major con you might see is the need to do extra XML parsing on the cached string, as that is what's being cached rather than a mix of ElementTree nodes and APIError objects. I think this case is better, and the cache handling method could potentially be improved to allow users to question whether it is possible to request the API rather than being completely blind to as to whether the results returned are stale (avoids having to inspect the last_timestamps). This may help users in not re-using those stale results for processing. If the user does this they wouldn't need to call the API again thus don't have to trigger the parsing of the XML tree all over.

Oh yeah the other benefit is that the code as is flows more linearly rather than having three branches of execution within the same method. Also avoid having another layer (I don't need to add `raw_get` to get what I need).

Of course, this can probably be improved, so please do critique and pick what you feel like (between this branch and raw_get).