summaryrefslogtreecommitdiffstats
path: root/app/src/main/java/com/example/alcagotchi/RequestTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/com/example/alcagotchi/RequestTest.kt')
-rw-r--r--app/src/main/java/com/example/alcagotchi/RequestTest.kt90
1 files changed, 45 insertions, 45 deletions
diff --git a/app/src/main/java/com/example/alcagotchi/RequestTest.kt b/app/src/main/java/com/example/alcagotchi/RequestTest.kt
index 513bb69..4f4535e 100644
--- a/app/src/main/java/com/example/alcagotchi/RequestTest.kt
+++ b/app/src/main/java/com/example/alcagotchi/RequestTest.kt
@@ -17,48 +17,48 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
-@Composable
-fun GetAmiiboItems(modifier: Modifier) {
- val amiiboList = remember { mutableStateOf<List<AmiiboItem>>(listOf()) }
- Column {
- Button(onClick = {
- asyncGetHttpRequest(
- endpoint = "https://www.amiiboapi.com/api/amiibo/",
- onSuccess = {
- amiiboList.value = it.response.amiibo
- Log.d("SUCCESS", amiiboList.toString())
- },
- onError = {
- Log.d("ERROR", it.message.toString())
- }
- )
- })
- {
- Text(
- text = "Get Amiibos"
- )
- }
- }
- Column(
-// modifier = Modifier.fillMaxSize(),
-// contentPadding = PaddingValues(16.dp)
- ) {
- Text(text = amiiboList.value.toString())
- }
-}
-class RequestTest : ComponentActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContent {
- AlcaGotchiTheme {
- // A surface container using the 'background' color from the theme
- Surface(
- color = MaterialTheme.colorScheme.background
- ) {
- // Let's create a composable function named GetAmiiboItems
- GetAmiiboItems(modifier = Modifier())
- }
- }
- }
- }
-} \ No newline at end of file
+// @Composable
+// fun GetAmiiboItems(modifier: Modifier) {
+// val amiiboList = remember { mutableStateOf<List<AmiiboItem>>(listOf()) }
+// Column {
+// Button(onClick = {
+// asyncGetHttpRequest(
+// endpoint = "https://www.amiiboapi.com/api/amiibo/",
+// onSuccess = {
+// amiiboList.value = it.response.amiibo
+// Log.d("SUCCESS", amiiboList.toString())
+// },
+// onError = {
+// Log.d("ERROR", it.message.toString())
+// }
+// )
+// })
+// {
+// Text(
+// text = "Get Amiibos"
+// )
+// }
+// }
+// Column(
+// // modifier = Modifier.fillMaxSize(),
+// // contentPadding = PaddingValues(16.dp)
+// ) {
+// Text(text = amiiboList.value.toString())
+// }
+// }
+// class RequestTest : ComponentActivity() {
+// override fun onCreate(savedInstanceState: Bundle?) {
+// super.onCreate(savedInstanceState)
+// setContent {
+// AlcaGotchiTheme {
+// // A surface container using the 'background' color from the theme
+// Surface(
+// color = MaterialTheme.colorScheme.background
+// ) {
+// // Let's create a composable function named GetAmiiboItems
+// GetAmiiboItems(modifier = Modifier())
+// }
+// }
+// }
+// }
+// } \ No newline at end of file