No description or website provided.
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Model/Datasource
.semver
README.md

README.md

Installation

app/Config/bootstap.php

<?php
CakePlugin::load('Rest');
?>

Database config

<?php
class DATABASE_CONFIG {

        public $sample = array(
                'datasource'            => 'Rest.RestSource',
                'host'                  => 'http://api.example.com',
                'format'                => 'json',
                'encoding'              => 'utf-8',
        );

}
?>

Examlpes

Cake inflection REST endpoint

<?php
class User extends AppModel {

        public $useDbConfig = 'sample';

        public $remoteResource = 'users';

}
?>
User::find('all')               == GET    http://api.example.com/users.json
User::read(null, $id)           == GET    http://api.example.com/users/$id.json
User::save()                    == POST   http://api.example.com/users.json
User::save(array('id' => $id))  == PUT    http://api.example.com/users/$id.json
User::delete($id)               == DELETE http://api.example.com/users/$id.json

More to come later