每日精品限免 / 促销应用 (#717)

https://github.com/DIYgod/RSSHub/issues/709
This commit is contained in:
Andie
2018-09-17 11:15:12 +08:00
committed by DIYgod
parent ef649def5e
commit d6f81ff635
3 changed files with 30 additions and 0 deletions

View File

@@ -863,6 +863,8 @@ GitHub 官方也提供了一些 RSS:
<route name="内购价格更新(限免)" author="HenryQW" example="/appstore/iap/cn/id953286746" path="/appstore/iap/:country/:id" :paramsDesc="['App Store 国家, 必选, 如 Darkroom Photo Editor 的链接为 https://itunes.apple.com/cn/app/id953286746, 则 country 为 `cn`', 'App Store app id, 必选, 如 Darkroom Photo Editor 的链接为 https://itunes.apple.com/cn/app/id953286746, 则 id 为 `id953286746`']"/> <route name="内购价格更新(限免)" author="HenryQW" example="/appstore/iap/cn/id953286746" path="/appstore/iap/:country/:id" :paramsDesc="['App Store 国家, 必选, 如 Darkroom Photo Editor 的链接为 https://itunes.apple.com/cn/app/id953286746, 则 country 为 `cn`', 'App Store app id, 必选, 如 Darkroom Photo Editor 的链接为 https://itunes.apple.com/cn/app/id953286746, 则 id 为 `id953286746`']"/>
<route name="每日精品限免 / 促销应用" author="Andiedie" example="/appstore/xianmian" path="/appstore/xianmian"/>
### Greasy Fork ### Greasy Fork
<route name="脚本更新" author="imlonghao" example="/greasyfork/zh-CN/bilibili.com" path="/greasyfork/:language/:domain?" :paramsDesc="['语言, 可在网站右上角找到, `all` 为所有语言', '按脚本生效域名过滤, 可选']"/> <route name="脚本更新" author="imlonghao" example="/greasyfork/zh-CN/bilibili.com" path="/greasyfork/:language/:domain?" :paramsDesc="['语言, 可在网站右上角找到, `all` 为所有语言', '按脚本生效域名过滤, 可选']"/>

View File

@@ -429,6 +429,7 @@ router.get('/imuseum/:city/:type', require('./routes/imuseum'));
router.get('/appstore/update/:country/:id', require('./routes/appstore/update')); router.get('/appstore/update/:country/:id', require('./routes/appstore/update'));
router.get('/appstore/price/:country/:type/:id', require('./routes/appstore/price')); router.get('/appstore/price/:country/:type/:id', require('./routes/appstore/price'));
router.get('/appstore/iap/:country/:id', require('./routes/appstore/in-app-purchase')); router.get('/appstore/iap/:country/:id', require('./routes/appstore/in-app-purchase'));
router.get('/appstore/xianmian', require('./routes/appstore/xianmian'));
// Hopper // Hopper
router.get('/hopper/:lowestOnly/:from/:to?', require('./routes/hopper/index')); router.get('/hopper/:lowestOnly/:from/:to?', require('./routes/hopper/index'));

View File

@@ -0,0 +1,27 @@
const axios = require('../../utils/axios');
module.exports = async (ctx) => {
const {
data: { objects: data },
} = await axios.get('http://app.so/api/v5/appso/discount/?platform=web&limit=20');
ctx.state.data = {
title: '每日精品限免 / 促销应用',
link: 'http://app.so/xianmian/',
description: '鲜面连线 by AppSo每日精品限免 / 促销应用',
item: data.map((item) => ({
title: item.app.name,
description: `
<img referrerpolicy="no-referrer" src="${item.app.icon.image}"/>
<br/>
原价:${item.discount_info[0].discounted_price} -> 现售:${item.discount_info[0].original_price}
<br/>
平台:${item.app.download_link[0].device}
<br/>
${item.content}
`,
pubDate: new Date(item.updated_at).toUTCString(),
link: item.app.download_link[0].link,
})),
};
};