mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 21:30:14 +02:00
bridges: Replace returnError function with more specific
Replacements depend on original error code: 400: returnClientError 404: returnServerError 500: returnServerError 501: returnServerError
This commit is contained in:
@@ -12,7 +12,7 @@ class GithubIssueBridge extends BridgeAbstract{
|
||||
$this->name = 'Github Issue';
|
||||
$this->uri = '';
|
||||
$this->description = 'Returns the comments of a github project issue';
|
||||
$this->update = '2016-08-09';
|
||||
$this->update = '2016-08-17';
|
||||
|
||||
$this->parameters[]=
|
||||
'[
|
||||
@@ -35,7 +35,7 @@ class GithubIssueBridge extends BridgeAbstract{
|
||||
public function collectData(array $param){
|
||||
$uri = 'https://github.com/'.$param['u'].'/'.$param['p'].'/issues/'.$param['i'];
|
||||
$html = file_get_html($uri)
|
||||
or $this->returnError('No results for Github Issue '.$param['i'].' in project '.$param['u'].'/'.$param['p'], 404);
|
||||
or $this->returnServerError('No results for Github Issue '.$param['i'].' in project '.$param['u'].'/'.$param['p']);
|
||||
|
||||
foreach($html->find('.js-comment-container') as $comment){
|
||||
|
||||
|
Reference in New Issue
Block a user