marcelduran/webpagetest-api — pull request #9 by rexxars (2013-11-28 15:42:09+00:00)
Title: Added support for getting history of tests from WPT

This PR introduces the ability to fetch the test history list. Please let me know if anything needs clarifying or rewriting.

A few notes:
- WPT API is far from consistent - the history endpoint returns CSV-data with double-quoted values, which means I could not use the existing parser easily. I therefore added the `csv`-module as a dependency.
- WPT API returns data with XML entities (å etc) which I think is usually not what the user expects. I added the `entities`-module as a dependency to decode these into the unicode variant.
- WPT API also returns some HTML in the history data (bold-tags) which again is not what we want. Stripped those with a simple regex.
- WPT API has an option for returning **all** history entries for the given number of days. This results in absolutely huge responses if you use it against the official WPT-site, which I'm slightly concerned about. I therefore decided not to implement the option to turn this on, for now. Preferably someone should patch WPT to support paginated history results instead.