| | |
| | | } |
| | | |
| | | |
| | | public static void getHomeAd(Context context, String uid, String vtid, |
| | | public static void getHomeAd(Context context, String uid, String vtid, String dataKey, |
| | | ResponseHandlerInterface handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("Method", "getHomeAd"); |
| | | params.put("Uid", uid); |
| | | params.put("Vtid", vtid); |
| | | if (dataKey != null) { |
| | | params.put("DataKey", dataKey); |
| | | } |
| | | commonPost(context, BASE_URL + "recommend", params, handler); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | public static void getHomeType(Context context, String uid, String vtid, |
| | | public static void getHomeType(Context context, String uid, String vtid, String dataKey, int page, int pageSize, |
| | | ResponseHandlerInterface handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("Method", "getHomeType"); |
| | | params.put("Method", "getHomeTypeNew"); |
| | | params.put("Uid", uid); |
| | | params.put("Vtid", vtid); |
| | | params.put("Page", page + ""); |
| | | params.put("PageSize", pageSize + ""); |
| | | if (dataKey != null) { |
| | | params.put("DataKey", dataKey); |
| | | } |
| | | commonPost(context, BASE_URL + "recommend", params, handler); |
| | | } |
| | | |
| | | |
| | | public static void getHomeVideoList(Context context, String id, int page, |
| | | ResponseHandlerInterface handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("Method", "getHomeVideoList"); |
| | | params.put("Id", id); |
| | | params.put("Page", page + ""); |
| | | commonPost(context, BASE_URL + "recommend", params, handler); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | public static void uploadSession(Context context, String sessionId, |
| | | String type, |
| | | ResponseHandlerInterface handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("Method", "uploadSession"); |
| | | if (sessionId != null) |
| | | params.put("sessionId", sessionId); |
| | | if (type != null) |
| | | params.put("type", type); |
| | | commonPost(context, BASE_URL + "session", params, handler); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取剧集列表 |
| | | * |
| | |
| | | * @param handler |
| | | */ |
| | | public static void getVideoEpisodeList(Context context, String uid, |
| | | String ResourceId, String videoId, int page, |
| | | String ResourceId, String videoId, int page,int pageSize, |
| | | ResponseHandlerInterface handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("Method", "getVideoEpisodeList"); |
| | | params.put("Uid", uid); |
| | | params.put("Page", page + ""); |
| | | params.put("PageSize", pageSize + ""); |
| | | params.put("VideoId", videoId); |
| | | params.put("ResourceId", ResourceId); |
| | | commonPost(context, BASE_URL + "recommend", params, handler); |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 付费视频的购买活动 |
| | | * |
| | | * @param context |
| | | * @param cid |
| | | * @param vid |
| | | * @param handler |
| | | */ |
| | | public static void getPPTVVIPVideoActivity(Context context, String url, String cid, String vid, |
| | | ResponseHandlerInterface handler) { |
| | | String loginUid = UserUtil.getLoginUid(context); |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (loginUid != null) |
| | | params.put("loginUid", loginUid); |
| | | if (url != null) { |
| | | params.put("url", url); |
| | | } |
| | | params.put("cid", cid); |
| | | params.put("vid", vid); |
| | | commonPost(context, BASE_URL + "video/play/getPPTVVIPVideoActivity", params, handler); |
| | | } |
| | | |
| | | |
| | | public static LinkedHashMap<String, String> validateParams( |
| | | LinkedHashMap<String, String> params, Context context) { |
| | | params.put("System", "1"); |