Skip to content

Commit

Permalink
spouts\twitter: Fix timeline listing
Browse files Browse the repository at this point in the history
During the DI rewrite, we forgot to call parent constructor.
  • Loading branch information
jtojnar committed Aug 4, 2020
1 parent 664481d commit cc9bdf1
Showing 1 changed file with 46 additions and 48 deletions.
94 changes: 46 additions & 48 deletions src/spouts/twitter/listtimeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,52 @@
* @author Nicola Malizia <[email protected]>
*/
class listtimeline extends \spouts\twitter\usertimeline {
public function __construct() {
$this->name = 'Twitter: list timeline';
$this->description = 'Fetch the timeline of a given list.';
$this->params = [
'consumer_key' => [
'title' => 'Consumer Key',
'type' => 'text',
'default' => '',
'required' => true,
'validation' => ['notempty']
],
'consumer_secret' => [
'title' => 'Consumer Secret',
'type' => 'password',
'default' => '',
'required' => true,
'validation' => ['notempty']
],
'access_token' => [
'title' => 'Access Token (optional)',
'type' => 'text',
'default' => '',
'required' => false,
'validation' => []
],
'access_token_secret' => [
'title' => 'Access Token Secret (optional)',
'type' => 'password',
'default' => '',
'required' => false,
'validation' => []
],
'slug' => [
'title' => 'List Slug',
'type' => 'text',
'default' => '',
'required' => true,
'validation' => ['notempty']
],
'owner_screen_name' => [
'title' => 'Username',
'type' => 'text',
'default' => '',
'required' => true,
'validation' => ['notempty']
]
];
}
public $name = 'Twitter: list timeline';
public $description = 'Fetch the timeline of a given list.';
public $params = [
'consumer_key' => [
'title' => 'Consumer Key',
'type' => 'text',
'default' => '',
'required' => true,
'validation' => ['notempty']
],
'consumer_secret' => [
'title' => 'Consumer Secret',
'type' => 'password',
'default' => '',
'required' => true,
'validation' => ['notempty']
],
'access_token' => [
'title' => 'Access Token (optional)',
'type' => 'text',
'default' => '',
'required' => false,
'validation' => []
],
'access_token_secret' => [
'title' => 'Access Token Secret (optional)',
'type' => 'password',
'default' => '',
'required' => false,
'validation' => []
],
'slug' => [
'title' => 'List Slug',
'type' => 'text',
'default' => '',
'required' => true,
'validation' => ['notempty']
],
'owner_screen_name' => [
'title' => 'Username',
'type' => 'text',
'default' => '',
'required' => true,
'validation' => ['notempty']
]
];

public function load(array $params) {
$this->client = $this->getHttpClient($params['consumer_key'], $params['consumer_secret'], $params['access_token'], $params['access_token_secret']);
Expand Down

0 comments on commit cc9bdf1

Please sign in to comment.