interface TweetFetcherInterface in Media entity Twitter 8
Same name and namespace in other branches
- 8.2 src/TweetFetcherInterface.php \Drupal\media_entity_twitter\TweetFetcherInterface
Defines a wrapper around the Twitter API.
Hierarchy
- interface \Drupal\media_entity_twitter\TweetFetcherInterface
Expanded class hierarchy of TweetFetcherInterface
All classes that implement TweetFetcherInterface
2 files declare their use of TweetFetcherInterface
- ThumbnailTest.php in tests/
src/ Kernel/ ThumbnailTest.php - Twitter.php in src/
Plugin/ MediaEntity/ Type/ Twitter.php
File
- src/
TweetFetcherInterface.php, line 8
Namespace
Drupal\media_entity_twitterView source
interface TweetFetcherInterface {
/**
* Retrieves a tweet by its ID.
*
* @param int $id
* The tweet ID.
* @return array
* The tweet information.
*
* @throws \Drupal\media_entity_twitter\Exception\TwitterApiException
* If the Twitter API returns errors in the response.
*/
public function fetchTweet($id);
/**
* Returns the current Twitter API credentials.
*
* @return array
* The API credentials. Will be an array with consumer_key, consumer_secret,
* oauth_access_token, and oauth_access_token_secret elements.
*/
public function getCredentials();
/**
* Sets the credentials for accessing Twitter's API.
*
* @param string $consumer_key
* The consumer key.
* @param $consumer_secret
* The consumer secret.
* @param string $oauth_access_token
* The OAuth access token.
* @param string $oauth_access_token_secret
* The OAuth access token secret.
*/
public function setCredentials($consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TweetFetcherInterface:: |
public | function | Retrieves a tweet by its ID. | 1 |
TweetFetcherInterface:: |
public | function | Returns the current Twitter API credentials. | 1 |
TweetFetcherInterface:: |
public | function | Sets the credentials for accessing Twitter's API. | 1 |