2023-12-13 17:56:01 +08:00
|
|
|
//
|
|
|
|
// Api+DDDynamicApi.m
|
|
|
|
// DingDangApp
|
|
|
|
//
|
|
|
|
// Created by duoban on 2023/12/13.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "Api+DDDynamicApi.h"
|
|
|
|
|
2023-12-14 19:15:01 -08:00
|
|
|
@implementation Api (DDDynamicApi)
|
2023-12-14 19:08:53 -08:00
|
|
|
+ (void)dd_getDynamicRecommendList:(DDRequestToolCompletion)completion page:(NSString *)page pageSize:(NSString *)pageSize types:(NSString *)types {
|
2023-12-14 16:59:33 +08:00
|
|
|
NSString *url = [DDEncryptManager dd_aesDecryptWithText:@"2qK/TFxH7CmT0qabLIO/GqDsHEJxU6baoiALPp9GdoGIaemk6FEUSySzpRW3U6BX"];///dynamic/square/recommendDynamics
|
2023-12-14 19:08:53 -08:00
|
|
|
[self makeRequest:url method:DDRequestToolMethodGET completion:completion, __FUNCTION__, page, pageSize, types, nil];
|
2023-12-13 17:56:01 +08:00
|
|
|
}
|
2023-12-14 19:08:53 -08:00
|
|
|
+ (void)dd_getDynamicLatestList:(DDRequestToolCompletion)completion dynamicId:(NSString *)dynamicId pageSize:(NSString *)pageSize types:(NSString *)types {
|
2023-12-14 16:59:33 +08:00
|
|
|
NSString *url = [DDEncryptManager dd_aesDecryptWithText:@"2JAl2i0YEgWwLua1dq82YsvEzZjRxaUpRe4QOn//VDk="];///dynamic/square/latestDynamics
|
2023-12-14 19:08:53 -08:00
|
|
|
[self makeRequest:url method:DDRequestToolMethodGET completion:completion, __FUNCTION__, dynamicId, pageSize, types, nil];
|
|
|
|
|
2023-12-13 17:56:01 +08:00
|
|
|
}
|
2023-12-14 19:08:53 -08:00
|
|
|
+ (void)dd_getDynamicFollowerList:(DDRequestToolCompletion)completion dynamicId:(NSString *)dynamicId pageSize:(NSString *)pageSize types:(NSString *)types {
|
|
|
|
/// dynamic/square/followerDynamics
|
|
|
|
NSString *url = [DDEncryptManager dd_aesDecryptWithText:@"Rfu/SktHE9HjJk0oylLdPYyIsgtTedeVD+peB0Zy5ts="];
|
|
|
|
[self makeRequest:url method:DDRequestToolMethodGET completion:completion, __FUNCTION__, dynamicId, pageSize, types, nil];
|
2023-12-13 17:56:01 +08:00
|
|
|
}
|
2023-12-14 19:08:53 -08:00
|
|
|
+ (void)dd_getDynamicLike:(DDRequestToolCompletion)completion dynamicId:(NSString *)dynamicId uid:(NSString *)uid status:(NSString *)status likedUid:(NSString *)likedUid worldId:(NSString *)worldId {
|
|
|
|
/// dynamic/like
|
|
|
|
NSString *url = [DDEncryptManager dd_aesDecryptWithText:@"mhPt+ybyGJMytLYDUlasZg=="];
|
|
|
|
[self makeRequest:url method:DDRequestToolMethodPOST completion:completion, __FUNCTION__, dynamicId, uid, status, likedUid, worldId, nil];
|
2023-12-13 17:56:01 +08:00
|
|
|
}
|
2023-12-14 19:08:53 -08:00
|
|
|
+ (void)dd_getDynamicPublish:(DDRequestToolCompletion)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"];
|
|
|
|
}
|
|
|
|
|
2023-12-14 19:08:53 -08:00
|
|
|
/// dynamic/square/publish
|
|
|
|
NSString *url = [DDEncryptManager dd_aesDecryptWithText:@"JU9Cj+C3FU2fzPyOKeR8g6xZzxAfnY4jP/qOWKeMwD8="];
|
2023-12-14 19:15:01 -08:00
|
|
|
|
|
|
|
[DDRequestTool DD_Request_PostSkillCard:url params:dic.dd_toJSONString completion:completion];
|
2023-12-13 17:56:01 +08:00
|
|
|
}
|
|
|
|
@end
|