manifest / integrations / cz-article-api
CZ Article API
Public API for retrieving articles on Cigno Zen
★ 0stars
Install
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.zipNo 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
GETbasato su post ID. - Risposta normalizzata con autore, titolo, sottotitolo, contenuto HTML, volume principale e tag.
- Supporto ACF per
sottotitolocon fallback supost_meta. - Integrazione con
cz-volumeper recuperare il titolo del volume principale.
Requisiti
- WordPress 6.0+
- PHP 7.4+
Installazione
- Copia la cartella
cz-article-apiinwp-content/plugins/. - Attiva il plugin da Plugin > Plugin installati.
- 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:
subtitlepuo esserenullse non presente.volumepuo esserenullse il post non e associato a un volume.tagse sempre un array; e vuoto se il post non ha tag.
Errori
400ID post non valido404post non trovato