__construct() public method

public __construct ( $key, $secret, $endpoint, Client $client )
$client GuzzleHttp\Client
コード例 #1
0
ファイル: YouTube.php プロジェクト: phanan/koel
 /**
  * Construct an instance of YouTube service.
  *
  * @param string      $key    The YouTube API key
  * @param Client|null $client The Guzzle HTTP client
  */
 public function __construct($key = null, Client $client = null)
 {
     parent::__construct($key ?: config('koel.youtube.key'), null, 'https://www.googleapis.com/youtube/v3', $client ?: new Client());
 }
コード例 #2
0
ファイル: Lastfm.php プロジェクト: Hebilicious/koel
 /**
  * Construct an instance of Lastfm service.
  *
  * @param string $key    Last.fm API key.
  * @param string $secret Last.fm API shared secret.
  * @param Client $client The Guzzle HTTP client.
  */
 public function __construct($key = null, $secret = null, Client $client = null)
 {
     parent::__construct($key ?: env('LASTFM_API_KEY'), $secret ?: env('LASTFM_API_SECRET'), 'https://ws.audioscrobbler.com/2.0', $client ?: new Client());
 }
コード例 #3
0
ファイル: Lastfm.php プロジェクト: phanan/koel
 /**
  * Construct an instance of Lastfm service.
  *
  * @param string $key    Last.fm API key.
  * @param string $secret Last.fm API shared secret.
  * @param Client $client The Guzzle HTTP client.
  */
 public function __construct($key = null, $secret = null, Client $client = null)
 {
     parent::__construct($key ?: config('koel.lastfm.key'), $secret ?: config('koel.lastfm.secret'), 'https://ws.audioscrobbler.com/2.0', $client ?: new Client());
 }