- Clone/download the plugin to
plugins/codaset
- Clone/download the apis plugin to
plugins/apis
- Add your configuration to
database.php
and set it to the model
:: database.php ::
var $codaset = array(
'datasource' => 'Apis.Apis',
'driver' => 'Codaset.Codaset',
// These are only required for authenticated requests (write-access)
'login' => '--Your API Key--',
'password' => '--Your API Secret--',
);
:: my_model.php ::
var $useDbConfig = 'codaset';
There are a variety of options available to you, however some combinations are required (for example 'wiki' requires 'username' and 'project') You can get an idea what's available to you by reading the Codaset API Documentation
Conditions:
- username
- project
Fields: pass only one of these at a time as a string
- General
- projects
- User specific (username required)
- projects
- collaborations
- followers
- followings
- friends
- bookmarks
- Project specific (username and project conditions required)
- wiki
- tickets
- milestones
- blog
Example:
$data = $this->Model->find('all', array(
'conditions' => array(
'username' => 'codaset',
'project' => 'codaset'
),
'fields' => 'blog',
));
Bold items are required
Bold items are required
Unfollow a user
Fields:
- follow => username
Bold items are required
Create Project
Fields:
- type => project
- username => The username of the project owner.
- title => Title of the new project.
- description => Description of the project.
- state => The state of the project. Possible values are 'public' (default), 'semi-private' or 'private'.
- fork => A publicly accessible URL of an external Git repository that will be cloned to create this project. Example: git://external-domain.com/repository.git
Follow a user
Fields:
- type => follow
- follow => username