skywood/lib/global/request/api_const.dart

100 lines
4.5 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

final class ApiConst {
ApiConst._();
static const appName = 'skywood';
static const int pageSize = 12;
static const String apiLink = 'https://api-quickeltv.quickeltv.com/quickeltv';
static String webPrefix = "quickeltv.com";
static String webIndex = "https://$webPrefix";
static String webPrivacy = "https://$webPrefix/private";
static String webAgreement = "https://$webPrefix/user_policy";
static String webmemberAgreement = "https://$webPrefix/member_ship_agreement";
static String webHelpIndex = "https://campaign.$webPrefix/pages/leave/index";
static String webHelpList = "https://campaign.$webPrefix/pages/leave/list";
static String webHelpDetail =
"https://campaign.$webPrefix/pages/leave/detail";
static String iosDownloadUrl = "";
static String androidDownloadUrl = "";
}
class ApiString {
static const String login = "/customer/login";
// /customer/register
static const String register = "/customer/register";
// /customer/info
static const String userInfo = "/customer/info";
// /customer/signout
static const String signOut = "/customer/signout";
// /customer/logoff
static const String logOff = "/customer/logoff";
/// events
// eventCreateHistory POST /createHistory 上报播放历史
// eventUserEnterApp POST /customer/enterTheApp 用户进入 App
// eventUserOnline POST /customer/onLine 用户在线,可带 prevToken
// eventUserLeaveApp POST /customer/leaveApp 用户离开 App可带 prevToken
// eventPlaySeconds POST /uploadHistorySeconds 上报单集播放秒数
// eventWatchTime POST /watchShortDuration 上报短剧观看时长
// eventReport POST /event/add 通用事件上报,目前枚举只有 force_update
static const String eventCreateHistory = "/createHistory";
static const String eventUserEnterApp = "/customer/enterTheApp";
static const String eventUserOnline = "/customer/onLine";
static const String eventUserLeaveApp = "/customer/leaveApp";
static const String eventPlaySeconds = "/uploadHistorySeconds";
static const String eventWatchTime = "/watchShortDuration";
static const String eventReport = "/event/add";
}
class ApiStringPlay {
// getRecommandsList GET /getRecommands 推荐列表,分页参数 current_page/page_size可带 revolution
// getVideoDetail GET /getVideoDetails 获取剧详情query: short_play_id, video_id
// getDetailsRecommand GET /getDetailsRecommand 详情页推荐列表;注意方法参数 page/pageSize/data 当前没有传入请求
static const String getRecommandsList = "/getRecommands";
static const String getVideoDetail = "/getVideoDetails";
static const String getDetailsRecommand = "/getDetailsRecommand";
/// getHomeModules GET /home/all-modules 首页全部模块数据
// getRankingList POST /homeRanking 首页榜单body 带 type支持 most_trending/top_searched/new_releases
/// getCategoriesList GET /getCategories 分类列表
// getCategoriesDetail GET /videoList 分类详情/剧列表,分页 + extraParams
// getWaterflowList POST /newShortPlay 首页瀑布流,分页 + extraParams
static const String getHomeModules = "/home/all-modules";
static const String getRankingList = "/homeRanking";
static const String getCategoriesList = "/getCategories";
static const String getCategoriesDetail = "/videoList";
static const String getWaterflowList = "/newShortPlay";
/// getSearchHots GET /search/hots 搜索热门列表
// getSearch GET /search 关键词搜索query: search
// collect POST /collect 收藏body: short_play_id, video_id
// cancelCollect POST /cancelCollect 取消收藏body: short_play_id
// getMyCollections GET /myCollections 我的收藏列表,分页
// getMyHistorys GET /myHistorys 播放历史列表,分页
// getNoticeNum POST /noticeNum 获取通知数量
// versionControl GET /customer/versionControl 版本检查
// getLanguges GET /languges 获取语言列表,接口名拼写就是 languges
// getTranslates GET /translates 获取语言包query: lang_key默认 en
static const String getSearchHots = "/search/hots";
static const String getSearch = "/search";
static const String collect = "/collect";
static const String cancelCollect = "/cancelCollect";
static const String getCollections = "/myCollections";
static const String getHistories = "/myHistorys";
static const String getNoticeNum = "/noticeNum";
static const String versionControl = "/customer/versionControl";
static const String getLanguges = "/languges";
static const String getTranslates = "/translates";
}