On Fri, Nov 4, 2016 at 12:15 PM, Daniel Barrett <danb@cimpress.com> wrote:
Never mind, I got it working. Just add those URL query parameters to the WebRequest object that's being used:

        RequestContext::getMain()->getRequest()->setVal('bar', 1');

Then pass the WebRequest object to the DerivativeRequest (first parameter). Works great!

RequestContext::getMain()->getRequest() describes the current request, so you'll probably want to create a DerivativeRequest from that and then only change the parameters in the DerivativeRequest.
https://www.mediawiki.org/wiki/API:Calling_internally has examples.