102 lines
4.6 KiB
Dart
102 lines
4.6 KiB
Dart
final class ApiConst {
|
||
ApiConst._();
|
||
|
||
static const appName = 'Glimzo';
|
||
static const int pageSize = 12;
|
||
// https://api-glimzodf.glimzodf.com/glimzodf
|
||
static const String apiLink = 'https://api-glimzodf.glimzodf.com/glimzodf';
|
||
|
||
// https://glimzodf.com
|
||
static String webPrefix = "glimzodf.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";
|
||
}
|
||
|
||
|