From 1981dee5aec45793d3c4ebdbc4e637528c71b3c5 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 03 二月 2021 19:20:47 +0800 Subject: [PATCH] 'PPTV' --- BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java | 143 ++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 132 insertions(+), 11 deletions(-) diff --git a/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java b/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java index 28bde51..dc8e570 100644 --- a/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java +++ b/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java @@ -326,6 +326,88 @@ } /** + * 鐢佃瘽鍙风爜缁戝畾 + * + * @param context + * @param loginUid + * @param phone + * @param code + * @param accessToken + * @param handler + */ + + public static void bindPhone(Context context, String loginUid, String phone, String code, String accessToken, ResponseHandlerInterface handler) { + LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); + params.put("Method", "bindPhone"); + params.put("loginUid", loginUid); + if (phone != null) + params.put("phone", phone); + if (code != null) + params.put("code", code); + if (accessToken != null) + params.put("accessToken", accessToken); + commonPost(context, BASE_URL + "user", params, handler); + } + + + /** + * 缁戝畾QQ + * + * @param context + * @param loginUid + * @param name + * @param portrait + * @param openId + * @param handler + */ + public static void bindQQ(Context context, String loginUid, String name, String portrait, String openId, ResponseHandlerInterface handler) { + LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); + params.put("Method", "bindQQ"); + params.put("loginUid", loginUid); + if (name != null) + params.put("Name", name); + if (portrait != null) + params.put("Portrait", portrait); + if (openId != null) + params.put("OpenId", openId); + commonPost(context, BASE_URL + "user", params, handler); + } + + + /** + * 鏄惁鍏佽涓�閿櫥褰� + * + * @param context + * @param loginUid + * @param handler + */ + public static void allowOneKeyLogin(Context context, String loginUid, ResponseHandlerInterface handler) { + LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); + params.put("Method", "allowOneKeyLogin"); + params.put("loginUid", loginUid); + commonPost(context, BASE_URL + "user", params, handler); + } + + + /** + * 缁戝畾寰俊 + * + * @param context + * @param loginUid + * @param code + * @param handler + */ + public static void bindWX(Context context, String loginUid, String code, ResponseHandlerInterface handler) { + LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); + params.put("Method", "bindWX"); + params.put("loginUid", loginUid); + if (code != null) + params.put("code", code); + commonPost(context, BASE_URL + "user", params, handler); + } + + + /** * 鑾峰彇楠岃瘉鐮� * * @param context @@ -338,6 +420,23 @@ params.put("Method", "sendVerifyCode"); params.put("Uid", uid); params.put("Email", name); + commonPost(context, BASE_URL + "user", params, handler); + } + + /** + * 鍙戦�佺粦瀹氶獙璇佺爜 + * + * @param context + * @param loginUid + * @param phone + * @param handler + */ + public static void sendBindVerifyCode(Context context, String loginUid, String phone, + ResponseHandlerInterface handler) { + LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); + params.put("Method", "sendBindVerifyCode"); + params.put("loginUid", loginUid); + params.put("phone", phone); commonPost(context, BASE_URL + "user", params, handler); } @@ -371,10 +470,9 @@ public static void getPersonInfo(Context context, String uid, String loginUid, ResponseHandlerInterface handler) { LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); - params.put("Method", "getLoginUserInfo"); params.put("Uid", uid); - params.put("LoginUid", loginUid); - commonPost(context, BASE_URL + "user", params, handler); + params.put("loginUid", loginUid); + commonPost(context, BASE_URL + "user/getUserInfo", params, handler); } /** @@ -388,15 +486,19 @@ String personSign, String portrait, String nickName, ResponseHandlerInterface handler) { LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); - params.put("Method", "updateLoginUserInfo"); params.put("Uid", uid); - params.put("LoginUid", loginUid); - params.put("Sex", sex); - params.put("BirthDay", birthday); - params.put("PersonalSign", personSign); - params.put("Portrait", portrait); - params.put("NickName", nickName); - commonPost(context, BASE_URL + "user", params, handler); + params.put("loginUid", loginUid); + if (sex != null) + params.put("sex", sex); + if (birthday != null) + params.put("birthday", birthday); + if (personSign != null) + params.put("personSign", personSign); + if (portrait != null) + params.put("portrait", portrait); + if (nickName != null) + params.put("nickName", nickName); + commonPost(context, BASE_URL + "user/updateUserInfo", params, handler); } /** @@ -1003,6 +1105,17 @@ } + //鎾斁缁熻 + public static void playStatistic(Context context, String videoId, String resourceId, + ResponseHandlerInterface handler) { + LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); + params.put("Method", "playStatistic"); + params.put("VideoId", videoId); + params.put("ResourceId", resourceId); + commonPost(context, BASE_URL + "other", params, handler); + } + + public static void isCollect(Context context, String uid, String videoId, String thirdType, ResponseHandlerInterface handler) { LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); @@ -1066,6 +1179,14 @@ } + public static void getFuntvAuthCode(Context context, + ResponseHandlerInterface handler) { + LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); + params.put("Method", "getFuntvAuthCode"); + commonPost(context, BASE_URL + "other", params, handler); + } + + public static void getBaiDuNewsTypeList(Context context, ResponseHandlerInterface handler) { LinkedHashMap<String, String> params = new LinkedHashMap<>(); -- Gitblit v1.8.0