userRank static method

dynamic userRank(
  1. String userId,
  2. int type,
  3. dynamic onSuccess(
    1. dynamic data
    ),
  4. dynamic onError(
    1. String errStr
    )?,
)

直播间排行榜 userId 当前直播间主播用户ID type 排行榜类型1日榜,2周榜,3月榜,4总榜

Implementation

static userRank(
  String userId,
  int type,
  Function(dynamic data) onSuccess,
  Function(String errStr)? onError,
) {
  DioManager().request<dynamic>(RequestType.POST, RequestApi.apiContributionRank, params: {'userId': userId, 'type': type}, onSuccess: (data) {
    onSuccess(data);
  }, onError: (error) {
    if (onError != null) {
      onError(error.message);
    }
  });
}