|
@@ -92,30 +92,34 @@ public let kCommunityPostCommentsApi = "/community/post/comment"
|
|
|
/// 回复列表
|
|
|
public let kCommunityPostReplyApi = "/community/post/reply"
|
|
|
|
|
|
-//// MARK: - 评论&回复
|
|
|
+// MARK: - 评论&回复
|
|
|
///// 评论&回复
|
|
|
public let kCommunityPostCommentApi = "/community/post/comment"
|
|
|
|
|
|
-//// MARK: - 删除评论
|
|
|
-///// 删除评论
|
|
|
+// MARK: - 删除评论
|
|
|
+/// 删除评论
|
|
|
public let kCommunityPostDeleteCommentApi = "/community/post/comment"
|
|
|
|
|
|
-//// MARK: - 用户上传音乐
|
|
|
-///// 用户上传音乐
|
|
|
+// MARK: - 用户上传音乐
|
|
|
+/// 用户上传音乐
|
|
|
public let kCommunityUploadMusicApi = "/community/music/upload"
|
|
|
|
|
|
-//// MARK: - 热门推荐音乐列表
|
|
|
-///// 热门推荐音乐列表
|
|
|
+// MARK: - 热门推荐音乐列表
|
|
|
+/// 热门推荐音乐列表
|
|
|
public let kCommunityRecMusicListApi = "/community/musicList"
|
|
|
|
|
|
-//// MARK: - 获取音乐分类
|
|
|
-///// 获取音乐分类
|
|
|
+// MARK: - 获取音乐分类
|
|
|
+/// 获取音乐分类
|
|
|
public let kCommunityGetMusicCategoryApi = "/community/category/list"
|
|
|
|
|
|
-//// MARK: - 获取分类下所有音乐
|
|
|
-///// 获取分类下所有音乐
|
|
|
+// MARK: - 获取分类下所有音乐
|
|
|
+/// 获取分类下所有音乐
|
|
|
public let kCommunityCateMusicListApi = "/community/music"
|
|
|
|
|
|
+// MARK: - 圈子详情
|
|
|
+/// 圈子详情
|
|
|
+public let kCommunityCircleApi = "/community/circle"
|
|
|
+
|
|
|
/// 社区
|
|
|
///
|
|
|
/// - communityTopicCategory: 话题组列表
|
|
@@ -144,6 +148,8 @@ public let kCommunityCateMusicListApi = "/community/music"
|
|
|
/// - communityRecMusicList : 热门推荐音乐列表
|
|
|
/// - communityGetMusicCategory : 获取音乐分类
|
|
|
/// - communityCateMusicList : 获取分类下所有音乐
|
|
|
+/// - communityCircle : 圈子详情
|
|
|
+
|
|
|
|
|
|
public enum SwiftMoyaServiceCommunityApi {
|
|
|
case communityTopicCategory(parameters:Dictionary<String, Any>)
|
|
@@ -173,6 +179,7 @@ public enum SwiftMoyaServiceCommunityApi {
|
|
|
case communityRecMusicList(parameters:Dictionary<String, Any>)
|
|
|
case communityGetMusicCategory(parameters:Dictionary<String, Any>)
|
|
|
case communityCateMusicList(parameters:Dictionary<String, Any>)
|
|
|
+ case communityCircle(parameters:Dictionary<String, Any>)
|
|
|
}
|
|
|
|
|
|
extension SwiftMoyaServiceCommunityApi: TargetType {
|
|
@@ -205,7 +212,8 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
|
|
|
.communityUploadMusic,
|
|
|
.communityRecMusicList,
|
|
|
.communityGetMusicCategory,
|
|
|
- .communityCateMusicList
|
|
|
+ .communityCateMusicList,
|
|
|
+ .communityCircle
|
|
|
:
|
|
|
return URL(string: kApiDataPrefix())!
|
|
|
}
|
|
@@ -267,6 +275,8 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
|
|
|
return kCommunityGetMusicCategoryApi
|
|
|
case .communityCateMusicList:
|
|
|
return kCommunityCateMusicListApi
|
|
|
+ case .communityCircle:
|
|
|
+ return kCommunityCircleApi
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -297,7 +307,8 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
|
|
|
.communityPostReply,
|
|
|
.communityRecMusicList,
|
|
|
.communityGetMusicCategory,
|
|
|
- .communityCateMusicList
|
|
|
+ .communityCateMusicList,
|
|
|
+ .communityCircle
|
|
|
:
|
|
|
return .get
|
|
|
case .communityMemberFollowTopicCancelFollow,
|
|
@@ -338,7 +349,8 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
|
|
|
.communityUploadMusic(var parameters),
|
|
|
.communityRecMusicList(var parameters),
|
|
|
.communityGetMusicCategory(var parameters),
|
|
|
- .communityCateMusicList(var parameters)
|
|
|
+ .communityCateMusicList(var parameters),
|
|
|
+ .communityCircle(var parameters)
|
|
|
:
|
|
|
let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
|
|
|
parameters.updateValue(sign, forKey: "sign")
|
|
@@ -387,7 +399,8 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
|
|
|
.communityUploadMusic,
|
|
|
.communityRecMusicList,
|
|
|
.communityGetMusicCategory,
|
|
|
- .communityCateMusicList
|
|
|
+ .communityCateMusicList,
|
|
|
+ .communityCircle
|
|
|
:
|
|
|
return (headerParameters(headerType: .tokenHeader) as! [String : String])
|
|
|
}
|