You are here

function twitter_drush_command in Twitter 7.3

Same name and namespace in other branches
  1. 6.5 twitter.drush.inc \twitter_drush_command()
  2. 7.6 twitter.drush.inc \twitter_drush_command()
  3. 7.4 twitter.drush.inc \twitter_drush_command()
  4. 7.5 twitter.drush.inc \twitter_drush_command()

Implements COMMANDFILE_drush_command()

File

./twitter.drush.inc, line 10
Drush commands for the Twitter module.

Code

function twitter_drush_command() {
  $items = array();
  $items['twitter-search'] = array(
    'description' => 'Searches the Twitter API for something.',
    'arguments' => array(
      'keyword' => 'The keyword you are searching for. Add @ for usernames and # for hashtags.',
    ),
    'required-arguments' => TRUE,
    'options' => array(
      'limit' => 'Limit the number of results to be printed.',
      'randomize' => 'Randomize the result.',
    ),
    'examples' => array(
      'drush twitter-search \'#drupal\'' => 'Pull tweets containing the hashtag #drupal.',
      'drush twitter-search \'#drupalconmunich\' --limit=1 --randomize' => 'Picks a random tweet containing \'#drupalconmunich\'.',
    ),
    'aliases' => array(
      'tws',
    ),
    'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_SITE,
  );
  return $items;
}