Skip to content

When retrieving multiple game id's, description is parsed only for the first one #2

@Babanel

Description

@Babanel
 var collection = mutableListOf<Item?>()
    val items = mutableListOf( "173346", "526", "8790")
    val service = BggServiceFactory.getThingService()

    service.getThing(items.joinToString(), 1, 0, 0)
        .enqueue(object : Callback<Items?> {
            override fun onResponse(call: Call<Items?>, response: Response<Items?>) {
                val body = response.body()

                collection.addAll(body!!.items as Collection<Item>)
                collection.forEach {
                    println(it?.names?.get(0)?.value.toString())
                    println(it?.description)
                }
            }
            override fun onFailure(call: Call<Items?>, t: Throwable) {
                println(t)
            }
        })

When used like above, except the first item, all of them have null descriptions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions