103 lines
4.2 KiB
Objective-C
103 lines
4.2 KiB
Objective-C
//
|
|
// Api+Gift.m
|
|
// xplan-ios
|
|
//
|
|
// Created by 冯硕 on 2021/11/9.
|
|
//
|
|
|
|
#import "Api+Gift.h"
|
|
#import "NSMutableDictionary+Saft.h"
|
|
@implementation Api (Gift)
|
|
|
|
|
|
/// 请求背包礼物
|
|
/// @param complection 完成
|
|
/// @param uid 用户uid
|
|
/// @param ticket 用户ticket
|
|
+ (void)requestPackGiftList:(HttpRequestHelperCompletion)complection uid:(NSString *)uid ticket:(NSString *)ticket {
|
|
[self makeRequest:@"backpack/listUserBackpackV2" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, ticket, nil];
|
|
}
|
|
|
|
/// 请求普通礼物列表
|
|
/// @param complection 完成
|
|
/// @param roomUid 房间的roomuid
|
|
+ (void)requestNormalGiftList:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid {
|
|
[self makeRequest:@"gift/listV5" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, roomUid, nil];
|
|
}
|
|
|
|
/// 请求福袋全服礼物全服记录
|
|
/// @param complection 完成
|
|
+ (void)requestLuckGiftServerBagRecord:(HttpRequestHelperCompletion)complection {
|
|
[self makeRequest:@"gift/luckyBag/serviceMsg/record" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, nil];
|
|
}
|
|
|
|
|
|
/// 送礼物的接口
|
|
/// @param complection 完成
|
|
/// @param targetUids 送给谁的
|
|
/// @param giftNum 送的个数
|
|
/// @param sendType 送的类型
|
|
/// @param giftId 礼物的id
|
|
/// @param giftSource 礼物的来源
|
|
/// @param giftType 礼物的类型
|
|
/// @param roomUid 房间的ID
|
|
/// @param msg 喊话的
|
|
/// @param uid 用户的id
|
|
+ (void)requestSendGift:(HttpRequestHelperCompletion)complection
|
|
targetUids:(NSString *)targetUids
|
|
giftNum:(NSString *)giftNum
|
|
sendType:(NSString *)sendType
|
|
giftId:(NSString *)giftId
|
|
giftSource:(NSString *)giftSource
|
|
giftType:(NSString *)giftType
|
|
roomUid:(NSString *)roomUid
|
|
msg:(NSString *)msg
|
|
uid:(NSString *)uid {
|
|
NSString *method = @"gift/sendV4";
|
|
[self makeRequest:method method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, targetUids, giftNum, sendType, giftId, giftSource, giftType, roomUid, msg, uid, nil];
|
|
}
|
|
/// 送特权卡
|
|
/// - Parameters:
|
|
/// - complection: 完成
|
|
/// - cardId: 特权卡ID
|
|
/// - roomUid: 房间ID
|
|
/// - sendUid: 赠送用户UID
|
|
+ (void)requestsendPrivilegeCard:(HttpRequestHelperCompletion)complection cardId:(NSString *)cardId roomUid:(NSString *)roomUid sendUid:(NSString *)sendUid{
|
|
[self makeRequest:@"privilegeCard/send" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__,cardId,roomUid,sendUid, nil];
|
|
}
|
|
/// 送粉丝团入团礼物的接口
|
|
/// @param completion 完成
|
|
/// @param targetUids 送给谁的
|
|
/// @param giftNum 送的个数
|
|
/// @param sendType 送的类型
|
|
/// @param giftId 礼物的id
|
|
/// @param giftSource 礼物的来源
|
|
/// @param giftType 礼物的类型
|
|
/// @param roomUid 房间的ID
|
|
/// @param msg 喊话的
|
|
/// @param uid 用户的id
|
|
+ (void)requestSendAnchorFansGift:(HttpRequestHelperCompletion)completion
|
|
targetUids:(NSString *)targetUids
|
|
giftNum:(NSString *)giftNum
|
|
sendType:(NSString *)sendType
|
|
giftId:(NSString *)giftId
|
|
giftSource:(NSString *)giftSource
|
|
giftType:(NSString *)giftType
|
|
roomUid:(NSString *)roomUid
|
|
msg:(NSString *)msg
|
|
uid:(NSString *)uid {
|
|
[self makeRequest:@"anchorFansTeam/sendJoinTeamGift" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, targetUids, giftNum, sendType, giftId, giftSource, giftType, roomUid, msg, uid, nil];
|
|
}
|
|
|
|
/// 请求星座礼物信息
|
|
+ (void)requestTwelveStarFirst:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid {
|
|
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
|
[params safeSetObject:roomUid forKey:@"roomUid"];
|
|
[HttpRequestHelper request:@"twelveStar/getLastRankFirst" method:HttpRequestHelperMethodGET params:params completion:completion];
|
|
}
|
|
///请求特权卡
|
|
+(void)requestGiftPrivilegeCard:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid uid:(NSString *)uid{
|
|
[self makeRequest:@"privilegeCard/tab" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,roomUid, uid, nil];
|
|
}
|
|
@end
|