-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spouts\twitter: Fix timeline listing
During the DI rewrite, we forgot to call parent constructor.
- Loading branch information
Showing
1 changed file
with
46 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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']); | ||
|