Files
jackwener__opencli/clis/linkedin/posts.js
jakevin b6965a5973 feat(linkedin): consolidate read commands
Consolidates PRs #1722, #1723, #1724, #1725, #1726, and #1727 after B-group lead+aux review.\n\nReviewed-by: codex-mini1\nReviewed-by: First-principles-1
2026-05-23 17:01:56 +08:00

23 lines
863 B
JavaScript

import { cli, Strategy } from '@jackwener/opencli/registry';
import {
collectPosts,
DEFAULT_POSTS_LIMIT,
MAX_POSTS_LIMIT,
} from './posts-core.js';
cli({
site: 'linkedin',
name: 'posts',
access: 'read',
description: 'Export visible posts from a LinkedIn profile activity page with engagement metrics',
domain: 'www.linkedin.com',
strategy: Strategy.COOKIE,
browser: true,
args: [
{ name: 'profile-url', type: 'string', required: false, help: 'LinkedIn /in/<handle>/ profile URL. Defaults to /in/me/.' },
{ name: 'limit', type: 'int', default: DEFAULT_POSTS_LIMIT, help: `Maximum posts to return (1-${MAX_POSTS_LIMIT})` },
],
columns: ['rank', 'author', 'posted_at', 'body', 'reactions', 'comments', 'reposts', 'impressions', 'media', 'media_urls', 'url', 'raw_text'],
func: async (page, args) => collectPosts(page, args),
});