123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // XYXYActivityAPIManager.m
- // Timi
- //
- // Created by 翟玉磊 on 2021/12/14.
- //
- #import "XYXYActivityAPIManager.h"
- /// 巅峰家族-排行榜
- static NSString * const ACTIVITY_GET_PEAK_FAMILY_RANK = @"api-app/v1/activity/getPeakFamilyRank";
- /// 魅力花房-房间排行信息获取
- static NSString * const ACTIVITY_GET_FLOWER_ROOM_RANK = @"api-app/v1/activity/getFlowerRoomRank";
- @implementation XYXYActivityAPIManager
- /// 巅峰家族-排行榜
- /// @param activityId 活动id
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)getPeakFamilyRankWithActivityId:(NSString *)activityId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
- ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
- config.urlPath = [ACTIVITY_GET_PEAK_FAMILY_RANK copy];
- config.instructions = @"巅峰家族-排行榜";
- config.requestType = ZYLNetworkRequestTypeGet;
- config.requestParameters = @{@"activityId":activityId};
-
- return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
- }
- /// 魅力花房-房间排行信息获取
- /// @param activityId 活动id
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)getFlowerRoomRankWithActivityId:(NSString *)activityId subActivityId:(NSString *)subActivityId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
- ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
- config.urlPath = [ACTIVITY_GET_FLOWER_ROOM_RANK copy];
- config.instructions = @"魅力花房-房间排行信息获取";
- if (StringIsEmpty(subActivityId)) {
- config.requestParameters = @{@"activityId":activityId};
- }else {
- config.requestParameters = @{@"activityId":activityId, @"subActivityId":subActivityId};
- }
-
- return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
- }
- @end
|