function salesforce_drush_command in Salesforce Suite 7.3
Same name and namespace in other branches
- 8.4 salesforce.drush.inc \salesforce_drush_command()
- 8.3 salesforce.drush.inc \salesforce_drush_command()
- 5.0.x salesforce.drush.inc \salesforce_drush_command()
Implements hook_drush_command().
File
- ./
salesforce.drush.inc, line 11 - Drush integration for Salesforce.
Code
function salesforce_drush_command() {
$items['sf-rest-version'] = array(
'description' => 'Displays information about the current REST API version',
'aliases' => array(
'sfrv',
),
);
$items['sf-list-objects'] = array(
'description' => 'List the objects that are available in your organization and available to the logged-in user.',
'aliases' => array(
'sflo',
),
);
$items['sf-describe-object'] = array(
'description' => 'Retrieve all the metadata for an object, including information about each field, URLs, and child relationships.',
'aliases' => array(
'sfdo',
),
'arguments' => array(
'object' => 'The object name in Salesforce.',
),
'options' => array(
'fields' => 'Display information about fields that are part of the object.',
'field-data' => 'Display information about a specific field that is part of an object',
),
);
$items['sf-read-object'] = array(
'description' => 'Retrieve all the data for an object with a specific ID.',
'aliases' => array(
'sfro',
),
'arguments' => array(
'object' => 'The object name in Salesforce (e.g. Account).',
'id' => 'The object ID in Salesforce.',
),
'options' => array(
'format' => array(
'description' => 'Format to output the object. Use "print_r" for print_r (default), "export" for var_export, and "json" for JSON.',
'example-value' => 'export',
),
),
);
$items['sf-create-object'] = array(
'description' => 'Create an object with specified data.',
'aliases' => array(
'sfco',
),
'arguments' => array(
'object' => 'The object type name in Salesforce (e.g. Account).',
'data' => 'The data to use when creating the object (default is JSON format). Use \'-\' to read the data from STDIN.',
),
'options' => array(
'format' => array(
'description' => 'Format to parse the object. Use "json" for JSON (default) or "query" for data formatted like a query string, e.g. \'Company=Foo&LastName=Bar\'.',
'example-value' => 'json',
),
),
);
$items['sf-query-object'] = array(
'description' => 'Query an object using SOQL with specified conditions.',
'aliases' => array(
'sfqo',
),
'arguments' => array(
'object' => 'The object type name in Salesforce (e.g. Account).',
),
'options' => array(
'format' => array(
'description' => 'Format to output the objects. Use "print_r" for print_r (default), "export" for var_export, and "json" for JSON.',
'example-value' => 'export',
),
'where' => array(
'description' => 'A WHERE clause to add to the SOQL query',
'example-value' => 'isDeleted = TRUE',
),
'fields' => array(
'description' => 'A comma-separated list fields to select in the SOQL query. If absent, an API call is used to find all fields',
'example-value' => 'Id, LastName',
),
),
);
$items['sf-list-resources'] = array(
'description' => 'Lists the resources available for the specified API version. It provides the name and URI of each resource.',
'aliases' => array(
'sflr',
),
);
$items['sf-execute-query'] = array(
'description' => 'Execute a SOQL query.',
'aliases' => array(
'sfeq',
'soql',
),
'arguments' => array(
'query' => 'The query to execute.',
),
);
return $items;
}