Alipay+ Super App PlatformAlipay+ Super App Platform

pullSpaceContent

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

Method signature

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

copy
fun pullSpaceContent(input: SpacePullInfo, resultCallBack: BusinessCallBack?=null)

Request parameters

Name

Type

Description

input

SpacePullInfo

AnSpacePullInfoobject containing information about the requested space, including its code, pagination info, and any conditions or extended info.

resultCallBack

BusinessCallBack

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

copy
val spacePullInfo = SpacePullInfo()
spacePullInfo.spaceCode = "HK_MAGA_REC_SPACE"
ComponentManager.ASAP.getComponentBusiness()
    .pullSpaceContents(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")
                           }
                       })