implements setting apiURL, fixes #19