Page MenuHomePhabricator

Automatically select between the production URL or the testing URL
Open, NormalPublic

Description

Automatically select which URL to use, instead of always using the testing one

Event Timeline

CLOVIS triaged this task as Normal priority.Mar 7 2020, 2:42 PM
CLOVIS created this task.

This should not be automatically selected. Instead it should default to production and the API base constructor should take a URL to change the base request URL.

CLOVIS added a comment.EditedMar 9 2020, 12:07 PM

So something like

fun connect(username: String, password: String, url: String = "https://api.wildfyre.net/")

// In tests
val api: () -> WildFyre
  get() = { WildFyre.connect(testing_username, testing_password, testing_api) }

Just like that, yeah. Maybe with @JvmOverloads too, but that's a minor thing