1
0
Fork 0
mirror of synced 2024-09-20 03:17:30 +12:00
appwrite/docs/examples/1.1.x/client-android/kotlin/teams/get.md
2023-04-28 19:33:02 +05:30

26 lines
No EOL
808 B
Markdown

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import io.appwrite.Client
import io.appwrite.services.Teams
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val client = Client(applicationContext)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val teams = Teams(client)
GlobalScope.launch {
val response = teams.get(
teamId = "[TEAM_ID]"
)
val json = response.body?.string()
}
}
}