The repository provides a command line interface tool to debug or inspect the Deputy API via the Deputy API Wrapper.
Clone this repository to your development environment:
git clone https://github.com/communityds/deputy-api-console.gitWithin the cloned repository, install all Composer packages:
composer installCopy the configuration template and customise the configuration to include the authentication and target details of the wrapper:
cp config.php.dist config.phpRun the me command to confirm the configuration looks correct:
./console meInformation regarding the user should appear.
Run the ./console command to display the usage information.
To view raw responses from the Deputy API when running any command, increase the verbosity of the command by passing in the -vvv option. For example:
./console me -vvvTo determine what schema is being used by the wrapper, run the following command:
./console schema RESOURCE
# e.g. ./console schema CompanyThe output of this command includes both what is returned via the INFO endpoints as well as any customisations made to the schema.
Any difference between the schemas is indicated by the * character.
To view the details of a particular record, run the following command:
./console record RESOURCE ID
# e.g. ./console record Company 1The output will show what fields and relationships are available for the record.
The top section of each model class includes a series of @property PHPDoc tags.
These reflect the fields, joins and associations that are reported by the Resource INFO endpoints.
If there is a change to these, then run the following command to generate the tags for that model and copy and paste that into the model class.
./console phpdoc RESOURCE
# e.g. ./console phpdoc CompanyNote that there may be some conflicting property names. Use the existing tags of the model to determine how to resolve the issue.
Also ensure that any custom properties (i.e. those with get or set methods) should remain.