1 | <?php |
||
16 | class Service extends BaseService |
||
17 | { |
||
18 | /** |
||
19 | * Is the client authorized via OAuth2.0 |
||
20 | * |
||
21 | * @var bool |
||
22 | */ |
||
23 | protected $authorized = false; |
||
24 | |||
25 | /** |
||
26 | * @var Session |
||
27 | */ |
||
28 | protected $spotifySession; |
||
29 | |||
30 | /** |
||
31 | * @var Artist |
||
32 | */ |
||
33 | protected $artist; |
||
34 | |||
35 | /** |
||
36 | * @var Track |
||
37 | */ |
||
38 | protected $track; |
||
39 | |||
40 | /** |
||
41 | * @var Album |
||
42 | */ |
||
43 | protected $album; |
||
44 | |||
45 | 11 | /** |
|
46 | * {@inheritdoc} |
||
47 | 11 | */ |
|
48 | 11 | public function init($config = []) |
|
66 | |||
67 | /** |
||
68 | 11 | * @param $scopes |
|
69 | * |
||
70 | 11 | * @return mixed |
|
71 | */ |
||
72 | 11 | public function requestCredentialsToken($scopes) |
|
78 | |||
79 | /** |
||
80 | * @param Request $request |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | public function requestAccessToken(Request $request) |
||
91 | |||
92 | /** |
||
93 | * @return bool |
||
94 | */ |
||
95 | public function refreshTokens() |
||
99 | 11 | ||
100 | /** |
||
101 | 11 | * @return mixed |
|
102 | */ |
||
103 | protected function setAccessTokenFromSession() |
||
107 | 1 | ||
108 | /** |
||
109 | 1 | * @return Artist |
|
110 | */ |
||
111 | public function getArtist() |
||
115 | 1 | ||
116 | /** |
||
117 | 1 | * @return Track |
|
118 | */ |
||
119 | public function getTrack() |
||
123 | |||
124 | /** |
||
125 | * @return Album |
||
126 | */ |
||
127 | public function getAlbum() |
||
131 | |||
132 | /** |
||
133 | 2 | * @return Session |
|
134 | */ |
||
135 | 2 | public function getSpotifySession() |
|
139 | |||
140 | /** |
||
141 | * @return boolean |
||
142 | */ |
||
143 | public function isAuthorized() |
||
147 | |||
148 | /** |
||
149 | * @return Artist |
||
150 | */ |
||
151 | public function artist() |
||
155 | |||
156 | /** |
||
157 | * @return Track |
||
158 | */ |
||
159 | public function track() |
||
163 | |||
164 | /** |
||
165 | * @return Album |
||
166 | */ |
||
167 | public function album() |
||
171 | |||
172 | } |