You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KodeStar edited this page Jun 12, 2019
·
4 revisions
<?php namespace App\SupportedApps\NZBHydra;
class NZBHydra extends \App\SupportedApps implements \App\SearchInterface {
public $type = 'external'; // Whether to go to the external site or display results locally
public function getResults($query, $provider)
{
$url = rtrim($provider->url, '/');
$q = urlencode($query);
return redirect($url.'/?category=All&mode=search&query='.$q);
}
}
public $type isn't currently implemented so should be set to external
The only current function is getResults which should redirect you to the url you need to hit.
$query is the text entered in the search bar
$provider brings back the details set in the app section, like the url.