From bfd738cd86e2aa6f63cf6ed81986ecc6b6019bb0 Mon Sep 17 00:00:00 2001 From: Arnaud Ligny Date: Fri, 23 Jan 2015 00:03:42 +0100 Subject: [PATCH] Update README.md Adding a link to HiFi CMS official website + PHP syntax highlighting. --- README.md | 62 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 9835f28..bfe6a20 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,46 @@ # HiFi CMS API component for PHP -This is the official HiFi CMS API component for PHP. It lets you fetch, put, and delete HiFi CMS website content from a remote destination. +This is the official [HiFi CMS](http://www.gethifi.com) API component for PHP. It lets you fetch, put, and delete HiFi CMS website content from a remote destination. ## Install Install the HiFi CMS API component with Composer: - composer require nmcteam/hifi-api +```console +composer require nmcteam/hifi-api +``` ## Usage - get([ - 'type' => 'page' - ]); - foreach ($hits as $hit) { - echo $hit->title; - } - - // Create or update content - $hifi->post([ - [ - 'type' => 'page', - 'title' => 'New page', - 'content' => 'Content goes here', - 'parent' => 'a24c85d34ce9437bbfc9db696ccee814' - ] - ]); - - // Delete content - $hifi->delete([ - [ - 'id' => 'a24c85d34ce9437bbfc9db696ccee814' - ] - ]); +```php +get([ + 'type' => 'page' +]); +foreach ($hits as $hit) { + echo $hit->title; +} + +// Create or update content +$hifi->post([ + [ + 'type' => 'page', + 'title' => 'New page', + 'content' => 'Content goes here', + 'parent' => 'a24c85d34ce9437bbfc9db696ccee814' + ] +]); + +// Delete content +$hifi->delete([ + [ + 'id' => 'a24c85d34ce9437bbfc9db696ccee814' + ] +]); +``` ## Author