forked from blallo/rss-bridge
[TwitchApiBridge] code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
f79d699a59
commit
fa294e2b4c
1 changed files with 2 additions and 4 deletions
|
@ -39,11 +39,9 @@ class TwitchApiBridge extends BridgeAbstract{
|
||||||
|
|
||||||
$context = stream_context_create($opts);
|
$context = stream_context_create($opts);
|
||||||
|
|
||||||
if(!$this->getInput('limit') ||
|
$limit = $this->getInput('limit');
|
||||||
empty($this->getInput('limit'))){
|
if(!$limit){
|
||||||
$limit = TWITCH_LIMIT;
|
$limit = TWITCH_LIMIT;
|
||||||
}else{
|
|
||||||
$limit = (int)$this->getInput('limit');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The Twitch API allows a limit between 1 .. 100. Therefore any value below must be set to 1, any greater must result in multiple requests.
|
// The Twitch API allows a limit between 1 .. 100. Therefore any value below must be set to 1, any greater must result in multiple requests.
|
||||||
|
|
Loading…
Reference in a new issue