Files
RSSHub/lib/routes/vgtime/release.js
2019-05-15 15:27:15 +08:00

21 lines
639 B
JavaScript
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.
const axios = require('@/utils/axios');
module.exports = async (ctx) => {
const response = await axios({
method: 'get',
url: `http://app02.vgtime.com:8080/vgtime-app/api/v2/game/last/sales`,
});
const data = response.data.data.gameList;
ctx.state.data = {
title: `游戏时光游戏发售表`,
link: `https://www.vgtime.com/game/release.jhtml`,
item: data.map((item) => ({
title: item.title,
description: `平台:${item.platformsText}${item.introduction}`,
pubDate: item.publishDate,
link: item.shareUrl,
})),
};
};