We should set sane defaults for almost all values. This will make it
possible to execute even when the configuration file is not present.
Change-Id: If85a72ad2b1470bdc9791e59810b4ba483becb9c
Some of these options can be changed via some methods, but these are
module globals that will affect any object created. This will also
make it possible to override specific options in the constructor w/o
affecting other objects.
Change-Id: I542b0bb6a45d0888878736c2d5fc58a0f7a7e653
We should not be running code that loads a configuration file in
a BEGIN block, as that will execute just by loading the module.
This makes using this module conditionally in other programs or testing
that code more difficult, as we would need to mock either this module
or the configuration file.
Just load the configuration file once in the constructor and cache
its contents, to avoid the overhead.
Change-Id: I86986dc81eaa32833b738ffa6df2a5de30159482
Instead of recomputing these every time we do a request, cache them
and reuse to avoid the object construction time, when we do not need
different constructor arguments over time.
Change-Id: I4d6039fc312a4e453a9eac6d59fe28f877613a6b
The to/from_json() are deprecated functions, which we should not be
using. Switch to the new ones, which also means we can stop encoding
the strings to and from UTF-8 explicitly.
Change-Id: Ie29371d532a51a3a62d54c35d22a6d488fe1b513
* it is important that next_page() retains the original
query params via links->next->href as otherwise
that leads to unpredicted results and no filtering
Change-Id: I8606a9fa03758eb214c7aa38958f158f2cc1a16e