交友房初步完成
This commit is contained in:
@@ -327,6 +327,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
gift_id:(NSString*)gift_id
|
||||
gift_num:(NSString*)gift_num
|
||||
to_uid:(NSString*)to_uid
|
||||
heart_id:(NSString*)heart_id
|
||||
type:(NSString*)type
|
||||
pit_number:(NSString*)pit_number
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
@@ -969,6 +970,49 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
#pragma mark - 交友房
|
||||
/**
|
||||
交友房开始
|
||||
*/
|
||||
+(void)friendRoomStartWithRoomId:(NSString*)room_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
|
||||
/**
|
||||
交友房结束
|
||||
*/
|
||||
+(void)friendRoomEndWithRoomId:(NSString*)room_id
|
||||
friendId:(NSString*)friend_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
|
||||
/**
|
||||
交友房延时
|
||||
*/
|
||||
+(void)friendRoomDelayWithRoomId:(NSString*)room_id
|
||||
friendId:(NSString*)friend_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
交友房创建关系
|
||||
*/
|
||||
+(void)friendRoomCreateRelationWithRoomId:(NSString*)room_id
|
||||
friendId:(NSString*)friend_id
|
||||
user1Id:(NSString*)user1_id
|
||||
user2Id:(NSString*)user2_id
|
||||
relationId:(NSString*)relation_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
退出私密小屋
|
||||
*/
|
||||
+(void)friendRoomQuitWithRoomid:(NSString*)room_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -661,17 +661,19 @@
|
||||
gift_id:(NSString*)gift_id
|
||||
gift_num:(NSString*)gift_num
|
||||
to_uid:(NSString*)to_uid
|
||||
heart_id:(NSString*)heart_id
|
||||
type:(NSString*)type
|
||||
pit_number:(NSString*)pit_number
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"room_id":room_id,
|
||||
@"gift_id":gift_id,
|
||||
@"gift_num":gift_num,
|
||||
@"to_uid":to_uid,
|
||||
@"type":type,
|
||||
@"pit_number":pit_number,
|
||||
@"room_id":room_id?room_id:@"",
|
||||
@"gift_id":gift_id?gift_id:@"",
|
||||
@"gift_num":gift_num?gift_num:@"",
|
||||
@"to_uid":to_uid?to_uid:@"",
|
||||
@"type":type?type:@"",
|
||||
@"pit_number":pit_number?pit_number:@"",
|
||||
@"heart_id":heart_id?heart_id:@""
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXSendGift parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
@@ -1889,4 +1891,110 @@
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - 交友房
|
||||
/**
|
||||
交友房开始
|
||||
*/
|
||||
+(void)friendRoomStartWithRoomId:(NSString*)room_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"room_id":room_id?room_id:@"",
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXRoomFriendStart parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
successBlock(responseObject[@"data"]);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
交友房结束
|
||||
*/
|
||||
+(void)friendRoomEndWithRoomId:(NSString*)room_id
|
||||
friendId:(NSString*)friend_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"room_id":room_id?room_id:@"",
|
||||
@"friend_id":friend_id?friend_id:@""
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXRoomFriendEnd parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
successBlock(responseObject[@"data"]);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
交友房延时
|
||||
*/
|
||||
+(void)friendRoomDelayWithRoomId:(NSString*)room_id
|
||||
friendId:(NSString*)friend_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"room_id":room_id?room_id:@"",
|
||||
@"friend_id":friend_id?friend_id:@""
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXRoomFriendDelay parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
successBlock(responseObject[@"data"]);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
交友房创建关系
|
||||
*/
|
||||
+(void)friendRoomCreateRelationWithRoomId:(NSString*)room_id
|
||||
friendId:(NSString*)friend_id
|
||||
user1Id:(NSString*)user1_id
|
||||
user2Id:(NSString*)user2_id
|
||||
relationId:(NSString*)relation_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"room_id":room_id?room_id:@"",
|
||||
@"friend_id":friend_id?friend_id:@"",
|
||||
@"user1_id":user1_id?user1_id:@"",
|
||||
@"user2_id":user2_id?user2_id:@"",
|
||||
@"relation_id":relation_id?relation_id:@"",
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXRoomFriendCreateRelation parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
successBlock(responseObject[@"data"]);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
退出私密小屋
|
||||
*/
|
||||
+(void)friendRoomQuitWithRoomid:(NSString*)room_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"room_id":room_id?room_id:@"",
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXRoomFriendRoomQuit parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
successBlock(responseObject[@"data"]);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user