HH/apps/social/utils/linkedin.py
2026-02-12 15:09:48 +03:00

28 lines
845 B
Python

class LinkedInConstants:
# API Configuration
# Using the versioned base path for Marketing/Community Management APIs
API_VERSION = "202411" # Latest version (YYYYMM format)
BASE_URL = "https://api.linkedin.com/rest"
# Authentication URLs
AUTH_URL = "https://www.linkedin.com/oauth/v2/authorization"
TOKEN_URL = "https://www.linkedin.com/oauth/v2/accessToken"
# Scopes
SCOPES = [
"r_organization_social",
"w_organization_social",
"rw_organization_admin"
]
# Rate Limiting
MAX_RETRIES = 3
RATE_LIMIT_SLEEP = 60 # seconds
# Pagination
DEFAULT_PAGE_SIZE = 50
MAX_PAGE_SIZE = 100
# Sync Configuration
INITIAL_SYNC_COMMENT_LIMIT = 200 # Comments per post for initial sync
DELTA_SYNC_INTERVAL = 900 # 15 minutes in secondsv