Alipay+ Super App PlatformAlipay+ Super App Platform

pullSpaceContents

Use the pullSpaceContents API to retrieve the contents of specified spaces based on given input parameters.

Method signature

The following code shows the method signature of the pullSpaceContents API:

copy
fun pullSpaceContents(inputs: List<SpacePullInfo>, resultCallBack: BusinessCallBack?=null)

Request parameters

Name

Type

Description

inputs

List<SpacePullInfo>

An array of SpacePullInfo objects, each containing information about the requested space, including its code, pagination info, and any conditions or extended info.

resultCallBack

BusinessListCallBack?

A callback function. On success, onSuccesscontains the result of the PullSpaceContentsResponse object. On failure, onFailure is triggered.

Response parameters

N/A

Exception

Error Code

Error message

1200

A network error has occurred.

1201

A backend error has occurred.

1202

The user ID is empty.

1203

A response payload is unavailable.

Sample

Kotlin

copy
val spacePullInfo = SpacePullInfo()
spacePullInfo.spaceCode = "HK_MAGA_REC_SPACE"
spacePullInfo.conditions =mapOf("longitude" to "23.1234", "latitude" to "100.4567")
spacePullInfo.touchLandingInfo = TouchLandingInfo("touch-Delivery-TaskId_001")

ComponentManager.ASAP.getComponentBusiness()
    .pullSpaceContents(listOf(spacePullInfo), object :
                                   BusinessCallBack {
                                       override fun onSuccess(spaceContentsResponse: PullSpaceContentsResponse) {
                                           TODO("Not yet implemented")
                                       }

                                       override fun onFailure(code: Int, msg: String, throwable: Throwable?) {
                                           TODO("Not yet implemented")
                                       }


                                   })