LCCommonHttp.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. //
  2. // LCCommonHttp.h
  3. // LiveChat
  4. //
  5. // Created by 张灿 on 2018/4/11.
  6. // Copyright © 2018年 caicai. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "YOUPAILZStsModel.h"
  10. typedef void(^succressBlock)(NSArray*);
  11. @interface LCCommonHttp : NSObject
  12. //上传JPG图片
  13. + (void)uploadImages:(NSArray*)images type:(NSString*)type succress:(succressBlock)succress;
  14. //点赞和取消点赞
  15. + (void)dynamicLike:(NSString*)dynamicId type:(NSInteger)type;
  16. //关注
  17. + (void)followUserId:(NSString*)userId liveId:(NSString *)liveId;
  18. + (void)followUserId:(NSString*)userId;
  19. //拉黑
  20. + (void)blackUserId:(NSString*)userId liveId:(NSString *)liveId;
  21. + (void)blackUserId:(NSString*)userId;
  22. /// 获取sts凭证
  23. /// @param type 类型
  24. /// album 个人相册
  25. /// anchor 女神认证
  26. /// game/img 游戏陪玩上传战绩截图等
  27. /// game/mp3 游戏陪玩上传15秒录音
  28. /// dynamic 动态
  29. /// @param succress 成功回调
  30. + (void)loadStsWithType:(NSString *)type successBlock:(void (^)(YOUPAILZStsModel *model))succress;
  31. /// 上传视频文件
  32. /// @param videoPath 视频文件目录
  33. /// @param type 类型
  34. /// album 个人相册
  35. /// anchor 女神认证
  36. /// game/img 游戏陪玩上传战绩截图等
  37. /// game/mp3 游戏陪玩上传15秒录音
  38. /// dynamic 动态
  39. /// @param succress 成功回调
  40. + (void)uploadWithVideoPath:(NSString *)videoPath Type:(NSString *)type successBlock:(void (^)(NSString *ossFilePath))succress;
  41. /// 上传音频文件
  42. /// @param videoPath 音频文件目录
  43. /// @param type 类型
  44. /// album 个人相册
  45. /// anchor 女神认证
  46. /// game/img 游戏陪玩上传战绩截图等
  47. /// game/mp3 游戏陪玩上传15秒录音
  48. /// dynamic 动态
  49. /// @param succress 成功回调
  50. + (void)uploadWithAudioPath:(NSString *)videoPath Type:(NSString *)type successBlock:(void (^)(NSString *ossFilePath))succress;
  51. /// 上传AAC格式音频
  52. + (void)uploadWithAACAudioPath:(NSString *)audioPath successBlock:(void (^)(NSString *ossFilePath))succress;
  53. /// 上传图片
  54. /// @param images 图片数组 只能传递UIImage 或者 NSdata
  55. /// @param type 类型
  56. /// album 个人相册
  57. /// anchor 女神认证
  58. /// game/img 游戏陪玩上传战绩截图等
  59. /// game/mp3 游戏陪玩上传15秒录音
  60. /// dynamic 动态
  61. /// @param succress 成功回调
  62. /// 上传到OSS
  63. + (void)uploadWithImages:(NSArray *)images Type:(NSString *)type successBlock:(void (^)(NSArray <NSString *>*ossImagePaths))succress;
  64. + (void)uploadWithLocalFile:(NSString *)localPath successBlock:(void (^)(NSString *ossFilePath))succress;
  65. @end