This PH7CMS class helps to retrieve the data from the API (natively integrated to pH7CMS) from another app (iOS/Android Apps, websites, etc.).
If your app or website that you want to integrate pH7CMS's data is coded is Java, Python, Ruby, C# or in another language, you can easily transform this class to another language by taking inspiration from the class. After that, it would be great if you can send the class by making a pull request on this Git repo.
Here's a basic example:
<?php
require 'PH7CMS.class.php';
$oPH7CMSApi = new PH7\External\Api\PH7CMS('YourPrivateApiKey', 'http://your-ph7cms-site.com');
/***** Log a user *****/
$aUserLogin = [
'email' => '[email protected]',
'password' => '123456pH7CMS89'
];
// Login the user
$aRes = $oPH7CMSApi->post('api/user/login', $aUserLogin);
// Show the response
echo var_dump( $oPH7CMSApi->getResponse(PH7\External\Api\PH7CMS::ARR_TYPE) ); // Get the response in Array
How To Use the RESTful API and Add new Endpoints
Pierre-Henry Soria
By email at: phy [AT] hizup [D0T] uk or at: ph7software [AT] gmail [D0T] com
License: General Public License 3 or later; See the PH7.LICENSE.txt and PH7.COPYRIGHT.txt files for more details.