Files
yinmeng-ios-store/yinmeng-ios/DingDangApp/YingMeng/DDMain/DDDynamic/DDDynamicApi/Api+DDDynamicApi.m

41 lines
2.4 KiB
Mathematica
Raw Normal View History

2023-12-13 17:56:01 +08:00
//
// Api+DDDynamicApi.m
// DingDangApp
//
// Created by duoban on 2023/12/13.
//
#import "Api+DDDynamicApi.h"
@implementation Api (DDDynamicApi)
2023-12-14 16:36:49 +08:00
+ (void)dd_getDynamicRecommendList:(HttpRequestHelperCompletion)completion page:(NSString *)page pageSize:(NSString *)pageSize types:(NSString *)types {
2023-12-14 16:47:25 +08:00
NSString *url = [DDEncryptManager dd_aesDecryptWithText:@"2V6SHBhw9p5Qv4Kg4FUjGSIeuz3U6YJFtsAl3fGDtCEHV/X5/Lyq6M1ODs/kQAKU"];///dynamic/square/recommendDynamics
[self makeRequest:url method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, page, pageSize, types, nil];
2023-12-13 17:56:01 +08:00
}
2023-12-14 16:36:49 +08:00
+ (void)dd_getDynamicLatestList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId pageSize:(NSString *)pageSize types:(NSString *)types {
2023-12-14 16:47:25 +08:00
NSString *url = [DDEncryptManager dd_aesDecryptWithText:@"4g3QhLlnyPbb8Xv/nRhrnApn1K4OZMNzXvVN2gSUUWo="];///dynamic/square/latestDynamics
[self makeRequest:url method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, dynamicId, pageSize, types, nil];
2023-12-13 17:56:01 +08:00
}
2023-12-14 16:36:49 +08:00
+ (void)dd_getDynamicFollowerList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId pageSize:(NSString *)pageSize types:(NSString *)types {
2023-12-13 17:56:01 +08:00
[self makeRequest:@"dynamic/square/followerDynamics" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, dynamicId, pageSize, types, nil];
}
2023-12-14 16:36:49 +08:00
+ (void)dd_getDynamicLike:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId uid:(NSString *)uid status:(NSString *)status likedUid:(NSString *)likedUid worldId:(NSString *)worldId {
2023-12-13 17:56:01 +08:00
[self makeRequest:@"dynamic/like" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, dynamicId, uid, status, likedUid, worldId, nil];
}
2023-12-14 16:36:49 +08:00
+ (void)dd_getDynamicPublish:(HttpRequestHelperCompletion)completion uid:(NSString *)uid type:(NSString *)type worldId:(NSString *)worldId content:(NSString *)content resList:(NSArray *)resList {
2023-12-13 17:56:01 +08:00
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
[dic setObject:uid forKey:@"uid"];
[dic setObject:type forKey:@"type"];
[dic setObject:content.length > 0 ? content : @"" forKey:@"content"];
if (worldId.length > 0) {
[dic setObject:worldId forKey:@"worldId"];
}
if (resList.count > 0) {
[dic setObject:resList forKey:@"resList"];
}
[HttpRequestHelper postSkillCard:@"dynamic/square/publish" params:dic.dd_toJSONString completion:completion];
}
@end