PQRequestURLUtil.swift 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. //
  2. // PQRequestURLUtil.swift
  3. // PQSpeed
  4. //
  5. // Created by SanW on 2020/9/21.
  6. // Copyright © 2020 BytesFlow. All rights reserved.
  7. //
  8. import UIKit
  9. // 票圈视频主域名-线上环境
  10. public let onlineLongvideoapi = "https://speed.piaoquantv.com/longvideoapi/"
  11. // 通用域名-eg:数据上报-线上环境
  12. public let onlineCommonapi = "https://common.piaoquantv.com/commonapi/"
  13. // 视频创作相关域名-线上环境
  14. public let onlineClipapiApi = "https://clipapi.piaoquantv.com/longvideoapi/"
  15. // 创作工具搜索素材相关域名-线上环境
  16. public let onlineMaterialSearchApi = "https://search-material.piaoquantv.com/"
  17. // 消息相关域名-线上环境
  18. public let onlineMessageApi = "https://messageapi.piaoquantv.com/"
  19. // 票圈视频主域名-预发布环境
  20. public let preLongvideoapi = "https://prespeed.piaoquantv.com/longvideoapi/"
  21. // 通用域名-eg:数据上报-预发布环境
  22. public let preCommonapi = "https://precommon.piaoquantv.com/commonapi/"
  23. // 创作工具搜索素材相关域名-预发布环境
  24. public let preMaterialSearchApi = "https://search-material-pre.piaoquantv.com/"
  25. // 消息相关域名-预发布环境
  26. public let preMessageApi = "https://messageapipre.piaoquantv.com/"
  27. // 票圈视频主域名-测试环境
  28. public let testLongvideoapi = "https://videotest.yishihui.com/longvideoapi/"
  29. // 通用域名-eg:数据上报-测试环境
  30. public let testCommonapi = "https://videotest.yishihui.com/commonapi/"
  31. // 创作工具搜索素材相关域名-测试环境
  32. public let testMaterialSearchApi = "https://search-material.yishihui.com/"
  33. // 消息相关域名-测试环境
  34. public let testMessageApi = "https://messageapitest.yishihui.com/"
  35. // 票圈视频主域名-北京预发布环境
  36. public let preBJLongvideoapi = "https://videoprebeijing.piaoquantv.com/longvideoapi/"
  37. // 通用域名-eg:数据上报-北京预发布环境
  38. public let preBJCommonapi = "https://precommon.piaoquantv.com/commonapi/"
  39. public let categroyVideoList = "video/distribute/category/videoList/v2"
  40. public let recommandPageList = "video/recommend/app/recommandPage/list"
  41. /// 白名单展示
  42. public let datashowAllowUrl = "datashow/allow"
  43. // 获取登陆背景图
  44. public let loginBackgroundUrl = "community/login/background"
  45. /// 登录
  46. public let login = "login/app"
  47. /// 新增虚拟账号
  48. public let generateVirtualUserUrl = "user/virtual/app/generateVirtualUser"
  49. /// 手机号注册
  50. public let phoneRegisterUrl = "register/app/check"
  51. /// 手机号登录
  52. public let phoneLoginUrl = "login/app/check"
  53. /// 苹果账号登录
  54. public let appleLoginUrl = "app/iphone/login"
  55. /** 退出登录 */
  56. public let logoutUrl = "logout/app"
  57. /** 注销账号 */
  58. public let cancellationAccUrl = "user/info/addMockData"
  59. /** 更新用户个人信息 */
  60. public let updateUserinfoUrl = "user/info/update"
  61. /** 更新用户个人扩展信息 */
  62. public let updateExtUserinfoUrl = "user/info/saveExtInfo"
  63. /** 查询用户状态 1有效,2 已删除,3 已屏蔽,4 敏感 */
  64. public let userStatusUrl = "user/info/getUserStatus"
  65. /** 更新用户个人信息 */
  66. public let ossTempTokenUrl = "oss/getOssTempToken"
  67. // add by ak 取 STS token uri
  68. public let getStsTokenUrl = "oss/getStsToken"
  69. /** 谁的关注 */
  70. public let idolsUrl = "user/idols"
  71. /** 谁的粉丝 */
  72. public let fansUrl = "user/fans"
  73. /** 我的订阅列表 */
  74. public let mySubscribesUrl = "user/mySubscribes"
  75. /** 订阅我的列表 */
  76. public let otherSubscribesUrl = "user/otherSubscribes"
  77. /** 个人主页头部信息 */
  78. public let homepageHeadUrl = "user/info/homepageHead"
  79. /** 获取用户扩展信息 */
  80. public let userInfoExtUrl = "user/info/getUserInfoExt"
  81. /** 某人的收藏夹集合 */
  82. public let userVideoFavoritesUrl = "videoFavorite/loadUserVideoFavorites"
  83. /** 发送手机验证码 */
  84. public let sendIndetifyCodeUrl = "sendIndetifyCode"
  85. /** 验证手机验证码 */
  86. public let checkIndetifyCodeUrl = "checkIndetifyCode"
  87. /** 修改手机号 */
  88. public let updatePhoneUrl = "savePhone"
  89. /** 最热列表 */
  90. public let hotByCollectionIdUrl = "video/v2/loadHotVideosByCollectionId"
  91. /** 最新列表 */
  92. public let latelyByCollectionIdUrl = "video/v2/loadLatelyVideosByCollectionId"
  93. /** 自己喜欢列表 */
  94. public let favoriteUrl = "video/v2/favorite/list"
  95. /** 视频分享列表 */
  96. public let shareRecordListUrl = "video/shareRecordList"
  97. /** 关注某人 */
  98. public let followUrl = "user/follow"
  99. /** 取消关注某人 */
  100. public let unfollowUrl = "user/unfollow"
  101. /** 订阅某人 */
  102. public let subscribeUrl = "user/subscribe"
  103. /** 取消订阅某人 */
  104. public let unsubscribe = "user/unsubscribe"
  105. /** 收藏视频 */
  106. public let favoriteVideoUrl = "video/favorite"
  107. /** 视频详情 */
  108. public let videoDetailUrl = "video/v2/detail"
  109. /** 批量请求视频详情 */
  110. public let videosDetailUrl = "video/v2/appCache/detail"
  111. /** 发布视频 */
  112. public let videoSendUrl = "video/send"
  113. /** 修改视频 */
  114. public let updateVideoUrl = "video/updateVideo"
  115. /** 删除视频 */
  116. public let deleteVideoUrl = "video/deleteVideo"
  117. /// 获取视频封面
  118. public let vodeoCoverImageUrl = "video/getCoverImagePaths"
  119. /// 关注人列表
  120. public let followedSingleUrl = "user/followed/single"
  121. /// 关注视频列表
  122. public let attendtionUrl = "user/followed/list"
  123. /// 关注视频更新数量(小红点)
  124. public let attendtionInfoUrl = "user/followed/info"
  125. /** 取消收藏视频 */
  126. public let unfavoriteVideoUrl = "video/unfavorite"
  127. /** 关注人头像 */
  128. public let idolsUpdatedUrl = "user/idolsUpdated"
  129. /** 关注人卡片 */
  130. public let recommendUserCardUrl = "user/info/getRecommendUserCard"
  131. /** 关注人卡片不喜欢 */
  132. public let userCardunFollowUrl = "user/info/unFollowUid"
  133. /** 举报视频原因列表 */
  134. public let reportVideoListUrl = "video/report/reason/list"
  135. /** 举报用户原因列表 */
  136. public let reportUserListUrl = "user/info/report/reason/list"
  137. /** 举报某个视频 */
  138. public let reportVideoUrl = "video/report"
  139. /** 举报某个用户 */
  140. public let reportUserUrl = "user/info/report"
  141. /** 拉黑某个用户 */
  142. public let bannedUserUrl = "user/info/black"
  143. /** 取消拉黑某个用户 */
  144. public let unBannedUserUrl = "user/info/unBlack"
  145. /** 某个用户是否被拉黑 */
  146. public let isBannedUserUrl = "user/info/isBlack"
  147. /** 黑明单列表 */
  148. public let bannedUserListUrl = "user/info/blackList"
  149. /** 不感兴趣某个视频 */
  150. public let hateVideoUrl = "videoHated/hate"
  151. /** 获取分享h5页面 */
  152. public let h5ShareLinkUrl = "video/app/share/getVideoH5ShareLink"
  153. /** 获取分享微信好友数据 */
  154. public let wxFriendUrl = "video/app/share/getVideoAppShareWxFriendData"
  155. /** 视频播放上报 */
  156. public let reportPlayUrl = "measure/report/play"
  157. /** 系统设置 */
  158. public let systemConfigUrl = "sys/config"
  159. /** 系统设置(新) */
  160. public let systemAppConfigUrl = "sys/app/config"
  161. /** 取 APP 的常规配置参数 如推荐的10个标题 */
  162. public let getBaseConfigURL = "frontConfig/getBaseConfig"
  163. /** 用户协议 */
  164. public let cUserProtocol = "https://weapppiccdn.yishihui.com/resources/agreements/videoservice.html?type=15"
  165. /** 隐私政策 */
  166. public let cPrivacy = "https://weapppiccdn.yishihui.com/resources/agreements/videoagreement.html?type=15"
  167. /** 互联网管理规定 */
  168. public let cNetManagePrivacy = "http://www.cac.gov.cn/2017-08/25/c_1121541842.htm"
  169. // ***************** 埋点上报地址 **********************//
  170. public let downLoadUrl = "https://rescdn.yishihui.com/"
  171. // 记录播放的视频
  172. public let videoPlayReportUrl = "video/played"
  173. // 记录realPlay播放的视频
  174. public let videoRealPlayReportUrl = "video/realPlayed"
  175. // 记录刷过的视频
  176. public let videoViewReportUrl = "video/view"
  177. // 上报视频动作记录
  178. public let videoActionReportUrl = "video/videoActionReport"
  179. // 通用上报
  180. public let staticsFrontendReportUrl = "statistics/uploadLogFromFrontend"
  181. // 通用上报-行为上报
  182. public let staticsloadcLickReportUrl = "statistics/uploadcLickInfo"
  183. // 上传行为上报
  184. public let uploadOperationInfoReportUrl = "statistics/uploadOperationInfo"
  185. // 用户分享的上报
  186. public let userShareReportUrl = "user/share/report"
  187. // 上报分享视频给微信朋友的行为
  188. public let userShareFriendReportUrl = "video/shared/weixin/friend"
  189. // 上报分享视频给朋友圈的行为
  190. public let userShareH5ReportUrl = "video/shared/h5"
  191. // 推送点击上报
  192. public let pushActionReportUrl = "push/action/report"
  193. // 上报DeviceToken
  194. public let pushDeviceTokenReportUrl = "push/device/addOrUpdate"
  195. // ***************** 活动相关地址 **********************//
  196. // 参加活动
  197. public let payActivityMoneyUrl = "order/payActivityMoney"
  198. // 查询状态
  199. public let payOrderStatusUrl = "order/orderStatus"
  200. // 更新客户端状态
  201. public let updatePayStatusUrl = "order/updateClientPayStatus"
  202. // 活动入口&触达
  203. public let activityInfoUrl = "app/activity/getActivityInfo"
  204. // 立即报名
  205. public let joinActivityUrl = "app/activity/joinActivity"
  206. // 手动改变活动状态
  207. public let updateActivityStatusUrl = "app/activity/updateWxAppActivityByStatus"
  208. /// 邀请好友
  209. public let inviteFriendJoinUrl = "app/activity/inviteFriendJoin"
  210. // ***************** 搜索相关地址 **********************//
  211. // 搜索用户跟视频
  212. public let searchUserAndVideoUrl = "search/app/userandvideo/list"
  213. // 搜索用户
  214. public let searchUserUrl = "search/app/user/list"
  215. // 搜索视频
  216. public let searchVideoUrl = "search/app/video/list"
  217. // 热门视频
  218. public let searchHotVideoUrl = "search/app/hot/videos"
  219. // 热门词
  220. public let searchHotWordsUrl = "search/app/hot/words"
  221. // 搜索的上报
  222. public let searchReportUrl = "search/app/report"
  223. // ***************** 视频编辑相关地址 **********************//
  224. // 取发音人
  225. public let listAllVoicesUrl = "producevideo/voice/listAllVoices"
  226. // 收藏发音人
  227. public let favoriteVoiceUrl = "producevideo/voice/favoriteVoice"
  228. // 取消收藏发音人
  229. public let unFavoriteVoiceUrl = "producevideo/voice/unFavoriteVoice"
  230. // 试听文字语音
  231. public let listeningTextSpeechUrl = "producevideo/listeningTextSpeech"
  232. // 文字转语音
  233. public let sectionTextSpeechSynthesizeUrl = "producevideo/sectionTextSpeechSynthesize"
  234. // 取草稿箱列表
  235. public let listUserDraftboxUrl = "producevideo/draftbox/listUserDraftbox"
  236. // 取草稿箱信息
  237. public let draftboxGetSdataUrl = "producevideo/draftbox/getSdata"
  238. // 收藏列表
  239. public let listUserfavoriteVoicesUrl = "producevideo/voice/listUserfavoriteVoices"
  240. // 取nsl token
  241. public let getNlsAccessTokenUrl = "producevideo/voice/getNlsAccessToken"
  242. // 取发音人的详细信息
  243. public let getVoiceInfoUrl = "producevideo/voice/getVoiceInfo"
  244. // 获取所有引导视频
  245. public let guideVideosUrl = "producevideo/guide/listAllGuideVideos"
  246. // 获取背景音乐分类
  247. public let bgmCategoryListUrl = "producevideo/bgm/app/getAllBgmCates"
  248. // 获取某个分类下的背景音乐
  249. public let bgmListUrl = "producevideo/bgm/pageCateBgm"
  250. // 收藏背景音乐列表
  251. public let bgmFavoriteListUrl = "producevideo/bgm/listUserFavoriteBgms/v2"
  252. // 收藏某个背景音乐
  253. public let favoriteBGMUrl = "producevideo/bgm/favoriteBgm/v2"
  254. // 取消收藏某个背景音乐
  255. public let unFavoriteBGMUrl = "producevideo/bgm/unFavoriteBgm/v2"
  256. // 获取背景音乐信息
  257. public let getBgmInfoUrl = "producevideo/bgm/v2/getBgmInfo"
  258. /// 搜索素材推荐请求
  259. public let searchRecommendMaterialUrl = "v1/recommend/flow"
  260. /// 搜索素材请求
  261. public let searchMaterialUrl = "v1/search/flow"
  262. /// 搜索背景音乐
  263. public let searchBGMMaterialUrl = "music/search"
  264. // 取视频真地址如抖音
  265. public let getVideoAddressUrl = "v1/search/getVideoAddress"
  266. /// 通过md5查已上传的素材
  267. public let materialByContentMd5Url = "producevideo/material/getMaterialByContentMd5"
  268. /// 获取素材vod上传凭证
  269. public let materialUploadAuthUrl = "producevideo/material/createMaterialUploadAuth"
  270. /// 批量获取素材vod上传凭证
  271. public let batchMaterialUploadAuthUrl = "producevideo/material/batchCreateMaterialUploadAuth"
  272. /// 获取素材oss上传凭证
  273. public let materialUploadStsTokenUrl = "oss/producevideo/getStsToken"
  274. /// 保存素材
  275. public let saveMaterialUrl = "producevideo/material/saveMaterial"
  276. /// 音频素材转换成文字
  277. public let audioMaterialTransferTextUrl = "producevideo/material/audioMaterialTransferText"
  278. /// 素材所有者用户信息
  279. public let getMaterialOwnerUserInfoUrl = "producevideo/material/getMaterialOwnerUserInfo"
  280. /// 保存草稿箱
  281. public let saveDraftboxUrl = "producevideo/draftbox/save/v2"
  282. /// 删除草稿箱
  283. public let deleteDraftboxUrl = "producevideo/draftbox/delete"
  284. /// 批量删除草稿箱
  285. public let deleteMultiDraftboxUrl = "producevideo/draftbox/deleteMulti"
  286. /// 复制草稿箱
  287. public let copyDraftboxUrl = "producevideo/draftbox/copy"
  288. /// 修改草稿箱名称
  289. public let updateDraftboxTitleUrl = "producevideo/draftbox/updateTitle"
  290. /// 草稿箱数量
  291. public let draftboxUserCountUrl = "producevideo/draftbox/countUserDraftbox"
  292. /// 保存合成视频项目数据
  293. public let saveProjectUrl = "producevideo/saveProject"
  294. /// 更新合成视频项目数据
  295. public let updateProjectUrl = "producevideo/updateProject"
  296. /// 发布视频后上报
  297. public let reportSendVideoUrl = "producevideo/reportSendVideo"
  298. // 文本断句 URL t1 to t2
  299. public let phraseSentenceURL = "producevideo/phraseSentence"
  300. // 再创作-从项目中复制草稿
  301. public let copyFromProjectURL = "producevideo/draftbox/copyFromProject"
  302. // 再创作视频列表
  303. public let listReproduceVideoURL = "producevideo/listReproduceVideo"
  304. // ***************** 站内消息相关地址 **********************//
  305. // 站内消息埋点上报
  306. public let messagePeportUrl = "message/report/station"
  307. // 消息未读数
  308. public let messageUnReadInfoUrl = "message/getUnReadInfo"
  309. // 常规消息列表
  310. public let messageNormalListUrl = "message/normal/list"
  311. // 删除消息
  312. public let messageDeleteUrl = "message/delete"
  313. // 常规消息已读
  314. public let messageNormalReadUrl = "message/normal/read"
  315. // 某种类型常规消息全部已读
  316. public let messageReadAllUrl = "message/normal/readAllByMsgType"
  317. // 分享空间消息列表
  318. public let messageShareSpaceListUrl = "message/sharespace/list"
  319. // 分享空间子类型消息列表
  320. public let messageShareSpaceSubListUrl = "message/sharespace/sub/list"
  321. /// 某条分享动态的子类型消息数量信息
  322. public let messageShareSpaceSubCountInfoUrl = "message/sharespace/getSubCountInfo"
  323. // 分享空间消息全部已读
  324. public let messageShareReadAllUrl = "message/sharespace/readAll"
  325. // 某条分享空间消息已读
  326. public let messageShareReadUrl = "message/sharespace/read"
  327. // 删除分享空间消息
  328. public let messageDeleteShareUrl = "message/sharespace/deleteRecord"
  329. // 分享空间某条动态的子类型消息全部已读
  330. public let messageReadAllBySubMsgTypeUrl = "message/sharespace/readAllBySubMsgType"
  331. // 分享空间某条动态的消息全部已读
  332. public let messageReadAllByShareIdUrl = "message/sharespace/readAllByShareId"
  333. // 某条分享动态的所有未读数 add by ak commentCount enjoinCount shareCount
  334. public let messageShareGetUnReadInfoUrl = "message/sharespace/getUnReadInfo"
  335. // 分享空间行为汇总数 API1
  336. public let messageSharespaceGetCountInfoUrl = "video/sharespace/app/getCountInfo"
  337. // 分享空间-评论列表 API1
  338. public let messagePageCommentRecordUrl = "video/sharespace/app/pageCommentRecord"
  339. // 分享空间-喜欢列表 API1
  340. public let messagePageFavoriteRecordUrl = "video/sharespace/app/pageFavoriteRecord"
  341. // 分享空间-播放列表 API1
  342. public let messagePagePlayRecordUrl = "video/sharespace/app/pagePlayRecord"
  343. // 分享空间-分享列表 API1
  344. public let messagePageShareRecordUrl = "video/sharespace/app/pageShareRecord"
  345. // ***************** 卡点视频相关地址 **********************//
  346. // 卡点音乐分类列表
  347. public let stuckPointMusicCategoryUrl = "/producevideo/music/listRhythmMusicTag"
  348. // 卡点音乐某个分类下列表
  349. public let stuckPointMusicPageUrl = "/producevideo/music/listRhythmMusic"
  350. // 获取某个音乐的卡点数据
  351. public let stuckPointMusicDetailUrl = "/producevideo/music/getRhythmMusicData"
  352. // 获取项目的卡点音乐信息
  353. public let stuckPointProjectMusicInfoUrl = "/producevideo/getProjectRhythmMusicInfo"
  354. // ***************** 广告相关地址 **********************//
  355. // 获取广告配置信息
  356. public let adPositionInfoUrl = "ad/position/info"
  357. // 意见反馈id
  358. public let feedbackAppId = "275642"
  359. // 意见反馈地址
  360. public let feedbackUrl = "https://support.qq.com/product/\(feedbackAppId)"
  361. // 意见反馈主页
  362. public let feedbackPageUrl = "https://support.qq.com/embed/phone/\(feedbackAppId)"
  363. // ***************** 评论相关地址 **********************//
  364. // 评论列表
  365. public let commendListUrl = "comment/app/page"
  366. // 二级评论列表
  367. public let commendSecondListUrl = "comment/second/page"
  368. // 保存一级评论
  369. public let saveTopCommendUrl = "comment/top/save"
  370. // 保存二级评论
  371. public let saveSecondCommendUrl = "comment/second/save"
  372. // 评论点赞或取消点赞
  373. public let commentPraiseUrl = "comment/praise"
  374. // 评论删除
  375. public let commentDeleteUrl = "comment/delete"
  376. // 评论举报
  377. public let commentReportUrl = "comment/report"
  378. // ***************** 话题相关地址 **********************//
  379. public let communityInitUrl = "community/init/feed"
  380. // 首页推荐Feed流
  381. public let communityRecommendUrl = "community/recommend/list"
  382. // 首页关注Feed流
  383. public let communityFollowingListUrl = "community/following/list"
  384. // 视频相关推荐
  385. public let communityRelatedListUrl = "community/recommend/relatedList"
  386. // 话题详情
  387. public let topicDetailUrl = "community/topic/detail"
  388. // 话题详情最热Feed流
  389. public let topicDeailHotlistUrl = "community/topic/content/hotlist"
  390. // 话题详情最新Feed流
  391. public let topicDeailNewlistUrl = "community/topic/content/newlist"
  392. // 用户创建话题
  393. public let topicCreateUrl = "community/topic/create"
  394. // 热门话题
  395. public let topicHotlistUrl = "community/topic/hotlist"
  396. // 我加入的话题 视频列表
  397. public let topicMySubListUrl = "community/topic/mySubscribedList"
  398. // 话题推荐(新用户弹窗)
  399. public let topicRecommendUrl = "community/topic/recommend"
  400. // 话题推荐(发布页)
  401. public let topicRecoPublishUrl = "community/topic/recommendForPublish"
  402. // 搜索话题
  403. public let topicSearchUrl = "community/topic/search"
  404. // 加入话题(订阅话题)
  405. public let topicSubscribeUrl = "community/topic/subscribe"
  406. // 退出话题(取消订阅话题)
  407. public let topicUnSubscribeUrl = "community/topic/unsubscribe"
  408. // 信息收集
  409. public let personalizedUrl = "community/user/personalized/saveUserPersonalizedInfo"