Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVP AppConfiguration #406

Closed
sync-by-unito bot opened this issue Sep 1, 2021 · 0 comments
Closed

MVP AppConfiguration #406

sync-by-unito bot opened this issue Sep 1, 2021 · 0 comments
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Sep 1, 2021

Add minimum API for AppConfiguration

  • AppId
  • BaseUrl (required for testing)
class AppConfiguration {    val foo = bar
  class Builder {
    constructor(appId: String)
    fun baseUrl(url: String) // Or if better URL abstraction exits
  }
}

// usage (same as Java)
val app = App(AppConfiguration.Builder(appId).baseUrl(myUrl).build())

In Realm Java baseUrl accepted a String because URL throws a checked exception and that was too annoying to deal with for the safety it provided. We should probably re-evaluate if we can use URL or URI for Kotlin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant