Skip to content

Instantly share code, notes, and snippets.

@jeremyrempel
Created February 18, 2019 17:13
Show Gist options
  • Save jeremyrempel/5d139d8130d8d7bfb708f23929b21a06 to your computer and use it in GitHub Desktop.
Save jeremyrempel/5d139d8130d8d7bfb708f23929b21a06 to your computer and use it in GitHub Desktop.
// provide dependency Api
bind<PhotoApi>("Api") with provider {
val client by kodein.instance<HttpClient>()
val clientId by kodein.instance<String>("ClientId")
val apiHost by kodein.instance<String>("ApiHost")
PhotoApiService(client, apiHost, clientId)
}
// request dependency Api
val api: PhotoApi by kodein.instance("Api")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment