Skip to content

Commit

Permalink
chore: add more popular social media routes
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoyu committed Oct 23, 2024
1 parent 01c0e1c commit 686a21f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions lib/routes/douban/people/status.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Route } from '@/types';
import { Route, ViewType } from '@/types';
import cache from '@/utils/cache';
import querystring from 'querystring';
import got from '@/utils/got';
import { fallback, queryToBoolean, queryToInteger } from '@/utils/readable-social';
import { config } from '@/config';
export const route: Route = {
path: '/people/:userid/status/:routeParams?',
categories: ['social-media'],
categories: ['social-media', 'popular'],
view: ViewType.SocialMedia,
example: '/douban/people/75118396/status',
parameters: { userid: '整数型用户 id', routeParams: '额外参数;见下' },
name: '用户广播',
Expand Down
5 changes: 3 additions & 2 deletions lib/routes/plurk/top.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Route } from '@/types';
import { Route, ViewType } from '@/types';
import cache from '@/utils/cache';
import got from '@/utils/got';
import { baseUrl, getPlurk } from './utils';
Expand All @@ -8,7 +8,8 @@ const categoryList = new Set(['topReplurks', 'topFavorites', 'topResponded']);

export const route: Route = {
path: '/top/:category?/:lang?',
categories: ['social-media'],
categories: ['social-media', 'popular'],
view: ViewType.SocialMedia,
example: '/plurk/top/topReplurks',
parameters: { category: 'Category, see the table below, `topReplurks` by default', lang: 'Language, see the table below, `en` by default' },
features: {
Expand Down
5 changes: 3 additions & 2 deletions lib/routes/plurk/topic.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Route } from '@/types';
import { Route, ViewType } from '@/types';
import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
import { baseUrl, fetchFriends, getPlurk } from './utils';

export const route: Route = {
path: '/topic/:topic',
categories: ['social-media'],
categories: ['social-media', 'popular'],
view: ViewType.SocialMedia,
example: '/plurk/topic/standwithukraine',
parameters: { topic: 'Topic ID, can be found in URL' },
features: {
Expand Down
5 changes: 3 additions & 2 deletions lib/routes/plurk/user.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Route } from '@/types';
import { Route, ViewType } from '@/types';
import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
import { baseUrl, fetchFriends, getPlurk } from './utils';

export const route: Route = {
path: '/user/:user',
categories: ['social-media'],
categories: ['social-media', 'popular'],
view: ViewType.SocialMedia,
example: '/plurk/user/plurkoffice',
parameters: { user: 'User ID, can be found in URL' },
features: {
Expand Down

0 comments on commit 686a21f

Please sign in to comment.