You are here

interface TwitterProfileInterface in Twitter Profile Widget 8

Same name and namespace in other branches
  1. 8.2 src/TwitterProfileInterface.php \Drupal\twitter_profile_widget\TwitterProfileInterface
  2. 3.x src/TwitterProfileInterface.php \Drupal\twitter_profile_widget\TwitterProfileInterface

Interface TwitterProfileInterface.

@package Drupal\twitter_profile_widget

Hierarchy

Expanded class hierarchy of TwitterProfileInterface

All classes that implement TwitterProfileInterface

File

src/TwitterProfileInterface.php, line 12

Namespace

Drupal\twitter_profile_widget
View source
interface TwitterProfileInterface {

  /**
   * Pull tweets from the Twitter API.
   *
   * @param TwitterWidget $entity
   *   The called node entity.
   *
   * @return str[]
   *    An array of Twitter objects.
   */
  public function pull(TwitterWidget $entity);

  /**
   * Helper query to check whether the credentials are valid.
   *
   * @param string $key
   *    Twitter API key.
   * @param string $secret
   *    Twitter API secret.
   *
   * @return bool|string
   *    Whether or not the connection is valid. If error message, return that.
   */
  public function checkConnection($key = '', $secret = '');

}

Members

Namesort descending Modifiers Type Description Overrides
TwitterProfileInterface::checkConnection public function Helper query to check whether the credentials are valid. 1
TwitterProfileInterface::pull public function Pull tweets from the Twitter API. 1