mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-06 13:08:14 +08:00
Update user.js
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
// 发起 HTTP GET 请求
|
||||
module.exports = async (ctx) => {
|
||||
// 传入参数
|
||||
const username = String(ctx.params.username);
|
||||
// 添加参数username
|
||||
|
||||
// 添加参数username 和 发起 HTTP GET 请求
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: `https://faexport.spangle.org.uk/user/${username}.json`,
|
||||
@@ -16,7 +16,6 @@ module.exports = async (ctx) => {
|
||||
const data = response.data;
|
||||
|
||||
// 收集传入的数据
|
||||
const id = data.id;
|
||||
const name = data.name;
|
||||
const profile = data.profile;
|
||||
const account_type = data.profile;
|
||||
@@ -25,7 +24,6 @@ module.exports = async (ctx) => {
|
||||
const artist_type = data.artist_type;
|
||||
const user_title = data.user_title;
|
||||
const registered_since = data.registered_since;
|
||||
const registered_at = data.registered_at;
|
||||
const current_mood = data.current_mood;
|
||||
const artist_profile = data.artist_profile;
|
||||
const pageviews = data.pageviews;
|
||||
@@ -71,9 +69,9 @@ module.exports = async (ctx) => {
|
||||
}
|
||||
}
|
||||
|
||||
const description = `Id: ${id} <br> Name: ${name} <br> Profile: ${profile} <br> Account Type: ${account_type} <br>
|
||||
const description = `Name: ${name} <br> Profile: ${profile} <br> Account Type: ${account_type} <br>
|
||||
Avatar: ${avatar} <br> Full Name: ${full_name} <br> Artist Type: ${artist_type} <br> User Title: ${user_title} <br>
|
||||
Registered Since: ${registered_since} <br> Registered at: ${registered_at} <br> Current Mood: ${current_mood} <br> <br> Artist Profile: <br> ${artist_profile} <br> <br>
|
||||
Registered Since: ${registered_since} <br> Current Mood: ${current_mood} <br> <br> Artist Profile: <br> ${artist_profile} <br> <br>
|
||||
Pageviews: ${pageviews} <br> Submissions: ${submissions} <br> Comments_Received: ${comments_received} <br> Comments Given: ${comments_given} <br>
|
||||
Journals: ${journals} <br> Favorite: ${favorite} <br> <br> Artist Information: <br> Species: ${species} <br> Personal Quote: ${personal_quote} <br> Music Type/Genre: ${music_type_genre} <br>
|
||||
Favorite Movie: ${favorites_movie} <br> Favorite Game: ${favorites_game} <br> Favorite Game Platform: ${favorites_game_platform} <br> Favorite Artist: ${favorites_artist} <br>
|
||||
|
||||
Reference in New Issue
Block a user