Files
jackwener__opencli/docs/adapters/browser/v2ex.md
AstroHan a83027d19c feat(v2ex): add node, user, member, replies, nodes commands (#282)
* feat(v2ex): add node, user, member, replies, nodes commands

Add 5 new public API commands to the v2ex adapter:
- node: browse topics by node name
- user: list topics by username
- member: show user profile
- replies: list topic replies
- nodes: list all nodes sorted by topic count

All commands use strategy: public, browser: false.

* test(v2ex): add E2E tests for node, user, member, replies, nodes commands

* docs(v2ex): update adapter docs with new commands

* fix(v2ex): address review findings - rate-limit guards, sort verification, docs

* docs(v2ex): update README command tables and add user example

* test(v2ex): improve test quality - soft guards, value assertions, smoke tests

- Replace isExpectedChineseSiteRestriction with if(code===0) soft guard
  (V2EX is globally accessible; YAML fetch doesn't throw FETCH_ERROR)
- Add value assertions: member username===Livid, limit effectiveness
- Add smoke tests for node, member, replies, nodes commands

* fix(v2ex): add url field to node/user commands, add missing user smoke test

- Add url to node.yaml and user.yaml pipeline map steps and columns
  (V2EX API provides item.url; improves usability for follow-up lookups)
- Add v2ex user smoke test (other 4 new commands all had smoke tests; user was missing)
- Update E2E assertions to verify url field in node/user results

---------

Co-authored-by: jackwener <jakevingoo@gmail.com>
2026-03-23 17:45:02 +08:00

1.3 KiB

V2EX

Mode: 🌐 / 🔐 · Domain: v2ex.com

Commands

Command Description
opencli v2ex hot Hot topics
opencli v2ex latest Latest topics
opencli v2ex topic <id> Topic detail
opencli v2ex node <name> Topics by node
opencli v2ex user <username> Topics by user
opencli v2ex member <username> User profile
opencli v2ex replies <id> Topic replies
opencli v2ex nodes All nodes (sorted by topic count)
opencli v2ex daily Daily hot
opencli v2ex me My profile (auth required)
opencli v2ex notifications My notifications (auth required)

Usage Examples

# Hot topics
opencli v2ex hot --limit 5

# Browse topics in a node
opencli v2ex node python

# View topic replies
opencli v2ex replies 1000

# User's topics
opencli v2ex user Livid

# User profile
opencli v2ex member Livid

# List all nodes
opencli v2ex nodes --limit 10

# JSON output
opencli v2ex hot -f json

Prerequisites

Most commands (hot, latest, topic, node, user, member, replies, nodes) use the public V2EX API and require no browser or login.

For daily, me, and notifications: