feat: taibai trending command (Milestone 6a) #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add
taibai trending [statuses|accounts|tags|links] [--limit N]with instance-type guard (Mastodon-only trending APIs).Relevant longwei methods (v1.5.0):
get_trending_statuses(limit, offset) -> list[Status]get_trending_accounts(limit, offset) -> list[Account]get_trending_hashtags(limit, offset) -> list[Tag]get_trending_links(limit, offset) -> list[Card]Exploration findings:
get_trending_hashtags(limit, offset) -> list[Tag](hitsGET /api/v1/trends/tags);Tagmodel hasnameandurlfields.ap.instance_typeafterAPClient.create()— constantsINSTANCE_TYPE_MASTODON,INSTANCE_TYPE_PLEROMA,INSTANCE_TYPE_SNACinlongwei.constants. Trending is Mastodon-specific; guard all variants._render_status_table(); accounts/tags/links → new custom Rich tables.Plan of attack:
pyproject.tomllongwei constraint~=1.4.3→~=1.5.0, update lockfile.tests/test_trending.py) — CLI layer (mockrun_async) + async layer (httpx_mock).src/taibai/commands/trending.py: single-function command dispatching onLiteral["statuses","accounts","tags","links"], default"statuses". Guard:die()ifap.instance_type != INSTANCE_TYPE_MASTODON.src/taibai/cli.pyasapp.command(name="trending")(trending_command).docs/trending.md+mkdocs.ymlnav entry.