You are here

function drush_wsdata_get_endpoint in Web Service Data 7

Get an endpoint by type.

File

./wsdata.drush.inc, line 144
Drush implementation for the wsconfig module.

Code

function drush_wsdata_get_endpoint() {
  if ($args = func_get_args()) {
  }
  elseif (empty($args[0])) {
    return drush_set_error('arguments_invalid', dt('Machine name of a wsconfig type not provided.  See drush help wsdata-get-endpoint'));
  }
  $wsconfig_type = wsconfig_type_load($args[0]);
  if (!$wsconfig_type) {
    return drush_set_error('arguments_invalid', dt('WSConfig type !type was not found.  Run "drush wsdata-list-types" for a list of available types.', array(
      '!type' => $type,
    )));
  }
  drush_print($wsconfig_type->data['endpoint']);
}