[TwitterBridge] fix bridge name and bridge uri
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
117031bf0f
commit
c34fdfa7fb
1 changed files with 26 additions and 0 deletions
|
@ -40,6 +40,32 @@ class TwitterBridge extends BridgeAbstract{
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getName(){
|
||||||
|
switch($this->queriedContext){
|
||||||
|
case 'By keyword or hashtag':
|
||||||
|
$specific='search ';
|
||||||
|
$param='q';
|
||||||
|
break;
|
||||||
|
case 'By username':
|
||||||
|
$specific='@';
|
||||||
|
$param='u';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 'Twitter '.$specific
|
||||||
|
.$this->parameters[$this->queriedContext][$param]['value'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getURI(){
|
||||||
|
$params=$this->parameters[$this->queriedContext];
|
||||||
|
switch($this->queriedContext){
|
||||||
|
case 'By keyword or hashtag':
|
||||||
|
return $this->uri.'search?q='.urlencode($params['q']['value']);
|
||||||
|
case 'By username':
|
||||||
|
return $this->uri.urlencode($params['u']['value']).
|
||||||
|
(isset($params['norep']['value'])?'':'/with_replies');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function collectData(){
|
public function collectData(){
|
||||||
$param=$this->parameters[$this->queriedContext];
|
$param=$this->parameters[$this->queriedContext];
|
||||||
$html = '';
|
$html = '';
|
||||||
|
|
Loading…
Reference in a new issue