コード例 #1
0
ファイル: Track.php プロジェクト: jamosaur/lastfm
 /**
  * Track constructor.
  *
  * @param string $apiKey
  * @param string $apiSecret
  * @param null $sessionKey
  */
 public function __construct($apiKey, $apiSecret, $sessionKey)
 {
     parent::__construct($apiKey, $apiSecret, $sessionKey);
     $this->__setSection('track');
 }
コード例 #2
0
ファイル: Album.php プロジェクト: jamosaur/lastfm
 /**
  * Get album info.
  *
  * @param string $artist | Artist Name | Required unless mbid is provided
  * @param string $album | Album Name | Required unless mbid is provided
  * @param string $mbid | musicbrainz ID
  * @param boolean $autocorrect | Corrects artist names
  * @param string $username | returns user's placount for album if provided
  * @param string $lang | Language to return biography in, uses ISO-639 alpha-2
  * @return array|object|string
  * @throws \Jamosaur\Lastfm\Exceptions\RequiresSessionAuthException
  * @throws \Jamosaur\Lastfm\Exceptions\RequiredParameterMissingException
  */
 public function getInfo($artist = null, $album = null, $mbid = null, $autocorrect = false, $username = null, $lang = null)
 {
     $this->requiredUnlessMBID($artist, $album, $mbid);
     $this->__setCall('getInfo');
     return $this->__makeCall(['artist' => $artist, 'album' => $album, 'mbid' => $mbid, 'autocorrect' => $autocorrect, 'username' => $username, 'lang' => parent::getLanguage() ? parent::getLanguage() : $lang]);
 }