imsamurai/freebase-source

Freebase (http://www.freebase.com/) source for CakePHP (HttpSource)

1.0.0 2014-02-07 14:08 UTC

This package is not auto-updated.

Last update: 2024-11-09 15:44:54 UTC


README

Build Status Coverage Status Latest Stable Version Total Downloads Latest Unstable Version License

CakePHP FreebaseSource Plugin with DataSource for http://www.freebase.com/

Installation

Step 1: Clone or download HttpSource

Step 2: Clone or download to Plugin/FreebaseSource

cd my_cake_app/app git://github.com/imsamurai/cakephp-freebasesource-datasource.git Plugin/FreebaseSource

or if you use git add as submodule:

cd my_cake_app
git submodule add "git://github.com/imsamurai/cakephp-freebasesource-datasource.git" "app/Plugin/FreebaseSource"

then update submodules:

git submodule init
git submodule update

Step 3: Add your configuration to database.php and set it to the model

:: database.php ::
public $freebase = array(
  'datasource' => 'FreebaseSource.Http/FreebaseSource', 
        'host' => 'www.googleapis.com/freebase/v1',
        'port' => 443
);

Then make model

:: Freebase.php ::
public $useDbConfig = 'freebase';
public $useTable = '<desired api url ending, for ex: "search">';

Step 4: Load plugin

:: bootstrap.php ::
CakePlugin::load('HttpSource', array('bootstrap' => true, 'routes' => false));
CakePlugin::load('FreebaseSource');

#Documentation

Please read HttpSource Plugin README