Created
March 6, 2022 20:52
-
-
Save KhomDrake/7032ee756171d6d64227370830faf43e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
suspend fun makeLogin(login: String, password: String) : Token { | |
// request login | |
return token | |
} | |
suspend fun loadMovies(token: Token) : List<Movie> { | |
val token = makeLogin("someValue", "someValue") | |
// request movies with token | |
return movies | |
} | |
fun someFunction() { | |
GlobalScope.launch { | |
val token = makeLogin("someValue", "someValue") | |
val movies = loadMovies(token) | |
printMovies(movies) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment