HSLG Media

WordPressContentClient.ts

WordPressContentClient.ts

Source file: packages/content-wordpress/src/WordPressContentClient.ts

Module: package-content-wordpress

Size: 62 lines

SHA-256: 6738985d71daa29074240288ac23df93bc53fb02c575e8b3dffb9b15b1adfe41

Responsibility

Loads published editorial content over configurable HTTPS WordPress REST endpoints.

Declared entry points

  • WordPressContentConfiguration — source line 7.
  • WordPressContentClient — source line 16.
  • route — source line 34.
  • url — source line 36.
  • response — source line 42.
  • r — source line 48.
  • title — source line 49.
  • content — source line 50.
  • totalPages — source line 58.

Imports and dependencies

  • Line 1: import type { ContentProvider, ContentPage, EditorialContent } from '../../app-core/src/contracts/ContentProvider.js';

Behaviour and audit locations

  • Line 24: throw new Error('CMS base must be an HTTPS REST URL without credentials, query or fragment.');
  • Line 42: const response = await this.request(url, { credentials: 'omit', signal, headers: { Accept: 'application/json' } });

Relationship to the system

This page is the file-level source reference, not the architecture rationale. Read the module explanation, the corresponding architecture decision and user guide before changing behaviour. Names and line locations above are extracted from this exact source version; they are reference points, not proof that an external service or a phone feature works.

Change verification

Review the entry points and errors in this file, then run the module’s associated tests, source dependency gate, history gate and documentation coverage check. If the file changes an API response, user interaction, data model, deployment or third-party dependency, revise those human explanations and disaster recovery/licensing when relevant. Do not infer actual native or external API operation from source presence.