Skip to content

Commit 8a5106f

Browse files
committed
docs: added comments
1 parent 363bf4f commit 8a5106f

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

src/Instance.class.php

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public function __construct($token, $url, $timeout, $instance)
4545
$this->uuid = $instance["uuid"];
4646
}
4747
/**
48-
* isPlaying
48+
* isPlaying returns true when the instance is playing something
4949
*
50-
* @param string $instanceUUID 6421eedc-9705-4706-a269-cf6f38fa1a33
50+
* @param string $instanceUUID UUID of the SinusBot instance
5151
* @return boolean
5252
*/
5353
public function isPlaying()
@@ -56,9 +56,9 @@ public function isPlaying()
5656
}
5757

5858
/**
59-
* isRunning
59+
* isRunning returns true when the instance is running
6060
*
61-
* @param string $instanceUUID 6421eedc-9705-4706-a269-cf6f38fa1a33
61+
* @param string $instanceUUID UUID of the SinusBot instance
6262
* @return boolean
6363
*/
6464
public function isRunning()
@@ -67,7 +67,7 @@ public function isRunning()
6767
}
6868

6969
/**
70-
* deleteInstance
70+
* delete deletes the instance
7171
*
7272
* @return array status
7373
*/
@@ -78,7 +78,7 @@ public function delete()
7878

7979

8080
/**
81-
* spawnInstance
81+
* spawn starts the instance
8282
*
8383
* @return array status
8484
*/
@@ -88,7 +88,7 @@ public function spawn()
8888
}
8989

9090
/**
91-
* respawnInstance
91+
* respawn restarts the instance
9292
*
9393
* @return array status
9494
*/
@@ -98,9 +98,9 @@ public function respawn()
9898
}
9999

100100
/**
101-
* killInstance
101+
* kill kills the instance
102102
*
103-
* @param string $instanceUUID 6421eedc-9705-4706-a269-cf6f38fa1a33
103+
* @param string $instanceUUID UUID of the SinusBot instance
104104
* @return array status
105105
*/
106106
public function kill()
@@ -109,11 +109,11 @@ public function kill()
109109
}
110110

111111
/**
112-
* getWebStream
112+
* getWebStream returns the webstream URL of the instance
113113
*
114114
* requires: EnableWebStream = true
115115
*
116-
* @param string $instanceUUID 6421eedc-9705-4706-a269-cf6f38fa1a33
116+
* @param string $instanceUUID UUID of the SinusBot instance
117117
* @return string url (opus-encoded-ogg-stream)
118118
* @api
119119
*/
@@ -128,11 +128,11 @@ public function getWebStream()
128128
}
129129

130130
/**
131-
* getWebStreamToken
131+
* getWebStreamToken returns the webstream token
132132
*
133133
* requires: EnableWebStream = true
134134
*
135-
* @param string $instanceUUID 6421eedc-9705-4706-a269-cf6f38fa1a33
135+
* @param string $instanceUUID UUID of the SinusBot instance
136136
* @return string token
137137
* @api
138138
*/
@@ -143,7 +143,7 @@ public function getWebStreamToken()
143143
}
144144

145145
/**
146-
* getVolume
146+
* getVolume returns the current volume
147147
*
148148
* @return integer
149149
* @api
@@ -155,7 +155,7 @@ public function getVolume()
155155

156156

157157
/**
158-
* setVolume
158+
* setVolume sets the volume to a given one
159159
*
160160
* @param string $volume {0-100}
161161
* @return array status
@@ -168,7 +168,7 @@ public function setVolume($volume = 50)
168168

169169

170170
/**
171-
* setVolumeUp
171+
* setVolumeUp increases the volume by 5
172172
*
173173
* @return array status
174174
* @api
@@ -179,7 +179,7 @@ public function setVolumeUp()
179179
}
180180

181181
/**
182-
* setVolumeDown
182+
* setVolumeDown reduces the volume by 5
183183
*
184184
* @return array status
185185
* @api
@@ -190,7 +190,7 @@ public function setVolumeDown()
190190
}
191191

192192
/**
193-
* getStatus
193+
* getStatus returns the current instance status
194194
*
195195
* @return array status
196196
* @api
@@ -202,18 +202,18 @@ public function getStatus()
202202
}
203203

204204
/**
205-
* getInstanceLog
205+
* getLog returns the instance log
206206
*
207207
* @return array log
208208
* @api
209209
*/
210-
public function getInstanceLog()
210+
public function getLog()
211211
{
212212
return $this->request('/bot/i/'.$this->uuid.'/log');
213213
}
214214

215215
/**
216-
* getSettings
216+
* getSettings returns the instance settings
217217
*
218218
* @return array users
219219
* @api
@@ -224,7 +224,7 @@ public function getSettings()
224224
}
225225

226226
/**
227-
* setSettings
227+
* setSettings updates the instance settings
228228
*
229229
* @param array $data array of properties
230230
* @return array status
@@ -237,7 +237,7 @@ public function setSettings($data)
237237

238238

239239
/**
240-
* getChannels
240+
* getChannels returns the channels of the connected TS³ or Discord server
241241
*
242242
* @return array channels
243243
* @api
@@ -248,18 +248,18 @@ public function getChannels()
248248
}
249249

250250
/**
251-
* uploadAvatar
251+
* uploadAvatar uploads a avatar from a local file
252252
*
253253
* @param string $path /var/www/image.jpg
254254
* @return array status
255255
*/
256256
public function uploadAvatar($path)
257257
{
258-
return $this->request('/bot/i/'.$this->uuid.'/avatar', 'POST', file_get_contents($path));
258+
return $this->request('/bot/i/'.$this->uuid.'/avatar', 'POST', file_get_contents($path), True);
259259
}
260260

261261
/**
262-
* deleteAvatar
262+
* deleteAvatar deletes the current avatar
263263
*
264264
* @return array status
265265
*/
@@ -269,7 +269,7 @@ public function deleteAvatar()
269269
}
270270

271271
/**
272-
* getQueueTracks
272+
* getQueueTracks returns the tracks in the queue
273273
*
274274
* @return array files
275275
*/
@@ -279,7 +279,7 @@ public function getQueueTracks()
279279
}
280280

281281
/**
282-
* appendQueueTrack
282+
* appendQueueTrack adds a track to the queue
283283
*
284284
* @param string $trackUUID uuid of the track
285285
* @return array status
@@ -290,7 +290,7 @@ public function appendQueueTrack($trackUUID)
290290
}
291291

292292
/**
293-
* prependQueueTrack
293+
* prependQueueTrack adds a track to the beginning of the queue
294294
*
295295
* @param string $trackUUID track uuid
296296
* @return array status
@@ -302,7 +302,7 @@ public function prependQueueTrack($trackUUID)
302302

303303

304304
/**
305-
* deleteQueueTrack
305+
* deleteQueueTrack deletes a track in the queue
306306
*
307307
* @param integer $trackPosition first entry = 0
308308
* @return array status
@@ -320,7 +320,7 @@ public function deleteQueueTrack($trackPosition)
320320

321321

322322
/**
323-
* deleteQueueTracks
323+
* deleteQueueTracks deletes all the tracks in the queue
324324
*
325325
* @return array status
326326
*/
@@ -331,7 +331,7 @@ public function deleteQueueTracks()
331331

332332

333333
/**
334-
* say
334+
* say will say the given text via the tts
335335
*
336336
* @param string $text Welcome
337337
* @param string $locale en
@@ -346,7 +346,7 @@ public function say($text, $locale)
346346
}
347347

348348
/**
349-
* playTrack
349+
* playTrack will play the given track
350350
*
351351
* @param string $trackUUID UUID of the track
352352
* @return array status
@@ -358,7 +358,7 @@ public function playTrack($trackUUID)
358358

359359

360360
/**
361-
* playURL
361+
* playURL will play the given URL
362362
*
363363
* @param string $url stream url
364364
* @return array status
@@ -370,7 +370,7 @@ public function playURL($url)
370370

371371

372372
/**
373-
* playPlaylist
373+
* playPlaylist will play the given playlist
374374
*
375375
* @param string $playlistUUID uuid of a playlist
376376
* @param string $playlistIndex 0
@@ -382,7 +382,7 @@ public function playPlaylist($playlistUUID, $playlistIndex = 0)
382382
}
383383

384384
/**
385-
* playPrevious
385+
* playPrevious will play the previous track
386386
*
387387
* @return array status
388388
*/
@@ -393,7 +393,7 @@ public function playPrevious()
393393

394394

395395
/**
396-
* playNext
396+
* playNext will play the next track
397397
*
398398
* @return array status
399399
*/
@@ -403,7 +403,7 @@ public function playNext()
403403
}
404404

405405
/**
406-
* playRepeat
406+
* playRepeat enables the play repeat
407407
*
408408
* @param integer $repeatState {0=disable,1=enable}
409409
* @return array status
@@ -414,7 +414,7 @@ public function playRepeat($repeatState = 1)
414414
}
415415

416416
/**
417-
* playShuffle
417+
* playShuffle enables the shuffly functionality
418418
*
419419
* @param integer $shuffleState {0=disable,1=enable}
420420
* @return array status
@@ -426,7 +426,7 @@ public function playShuffle($shuffleState = 1)
426426

427427

428428
/**
429-
* stop
429+
* stop stops the instance
430430
*
431431
* @return array status
432432
*/
@@ -437,7 +437,7 @@ public function stop()
437437

438438

439439
/**
440-
* seekPlayback
440+
* seekPlayback seeks to a given position
441441
*
442442
* @param integer $position 0
443443
* @return array status
@@ -449,7 +449,7 @@ public function seekPlayback($position = 0)
449449

450450

451451
/**
452-
* getPlayedTracks
452+
* getPlayedTracks will return the played tracks
453453
*
454454
* @return array array of uuids
455455
*/

src/Playlist.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function rename($playlistName)
5858
]);
5959
}
6060
/**
61-
* getPlaylistTracks returns the tracks of the given playlist
61+
* getPlaylistTracks returns the tracks of the playlist
6262
*
6363
* @return array files
6464
*/
@@ -68,7 +68,7 @@ public function getPlaylistTracks()
6868
}
6969

7070
/**
71-
* addPlaylistTrack adds a track to the given playlist
71+
* addPlaylistTrack adds a track to the playlist
7272
*
7373
* @param string $trackUUID uuid of the track
7474
* @return array status
@@ -81,7 +81,7 @@ public function addPlaylistTrack($trackUUID)
8181
}
8282

8383
/**
84-
* deleteTrack
84+
* deleteTrack deletes a track from the playlist
8585
*
8686
* @param integer $trackPosition first entry = 0
8787
* @return array status
@@ -92,7 +92,7 @@ public function deleteTrack($trackPosition)
9292
}
9393

9494
/**
95-
* deleteTracks
95+
* deleteTracks deletes all the tracks in the playlist
9696
*
9797
* @return array status
9898
*/

0 commit comments

Comments
 (0)