WP Manifestindependent plugin directory
manifest / integrations / cz-article-api

CZ Article API

Public API for retrieving articles on Cigno Zen

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/erremauro/cz-article-api/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

CZ Article API espone un endpoint REST pubblico per ottenere il contenuto di un singolo post tramite ID, in formato JSON.


Funzionalita principali

  • Endpoint pubblico GET basato su post ID.
  • Risposta normalizzata con autore, titolo, sottotitolo, contenuto HTML, volume principale e tag.
  • Supporto ACF per sottotitolo con fallback su post_meta.
  • Integrazione con cz-volume per recuperare il titolo del volume principale.

Requisiti

  • WordPress 6.0+
  • PHP 7.4+

Installazione

  1. Copia la cartella cz-article-api in wp-content/plugins/.
  2. Attiva il plugin da Plugin > Plugin installati.
  3. Usa l'endpoint REST dal tuo client (browser, app, servizi esterni).

Endpoint REST

Namespace: cz-article-api/v1

  • GET /post/{id}

Esempio:

/wp-json/cz-article-api/v1/post/123


Response

{
  "author": "Nome Autore",
  "title": "Titolo Post",
  "subtitle": "Sottotitolo opzionale",
  "content": "<p>Contenuto HTML del post...</p>",
  "volume": "Titolo Volume Principale",
  "tags": ["Zen", "Bodhidharma"]
}

Note:

  • subtitle puo essere null se non presente.
  • volume puo essere null se il post non e associato a un volume.
  • tags e sempre un array; e vuoto se il post non ha tag.

Errori

  • 400 ID post non valido
  • 404 post non trovato