Skip to content

Commit 92b8af4

Browse files
committed
doc: added missing phpdoc documentation
1 parent 707b54b commit 92b8af4

File tree

4 files changed

+80
-11
lines changed

4 files changed

+80
-11
lines changed

src/API.class.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,17 @@
1010

1111
namespace SinusBot;
1212

13+
/**
14+
* Class API
15+
*
16+
* API is the main class which will be used to connect to the SinusBot
17+
*/
1318
class API extends RestClient
1419
{
20+
/**
21+
* UUID stores the SinusBot Bot UUID
22+
* @var string
23+
*/
1524
public $uuid = null;
1625

1726
/**
@@ -403,7 +412,8 @@ public function getInstances()
403412
/**
404413
* createInstance
405414
*
406-
* @param string $nickname Nickname
415+
* @param string $nickname Name of the Bot
416+
* @param string $backend SinusBot backend (Discord or TS³)
407417
* @return array status
408418
*/
409419
public function createInstance($nickname = "SinusBot MusicBot", $backend = "ts3")
@@ -452,9 +462,9 @@ public function getThumbnail($thumbnail)
452462
/**
453463
* __construct
454464
*
455-
* @access private
456-
* @param string $url http://127.0.0.1:8087
457-
* @param string $uuid 4852efdc-9705-4706-e469-cfvf77favf33
465+
* @param string $url SinusBot Bot URL
466+
* @param string $uuid SinusBot Bot UUID
467+
* @param string $timeout HTTP Timeout which is used to perform HTTP API requests
458468
* @return void
459469
*/
460470
public function __construct($url = 'http://127.0.0.1:8087', $uuid = null, $timeout = 8000)

src/Instance.class.php

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,32 @@
1010

1111
namespace SinusBot;
1212

13+
/**
14+
* Class Instance
15+
*
16+
* Instance represents a single instance of the SinusBot
17+
*/
1318
class Instance extends RestClient
1419
{
20+
/**
21+
* UUID stores the SinusBot Instance UUID
22+
* @var string
23+
*/
1524
public $uuid = null;
25+
/**
26+
* Instance holds the Instance array
27+
* @var array
28+
*/
1629
public $instance = null;
30+
/**
31+
* __construct
32+
*
33+
* @param string $token SinusBot auth token
34+
* @param string $url SinusBot Bot URL
35+
* @param int $timeout HTTP Timeout which is used to perform HTTP API requests
36+
* @param array $instance SinusBot Instance array.
37+
* @return void
38+
*/
1739
public function __construct($token, $url, $timeout, $instance)
1840
{
1941
$this->token = $token;
@@ -135,9 +157,8 @@ public function getVolume()
135157
/**
136158
* setVolume
137159
*
138-
* @param string $volume {0-100}
139-
* @param string $instanceUUID 6421eedc-9705-4706-a269-cf6f38fa1a33
140-
* @return array status
160+
* @param string $volume {0-100}
161+
* @return array status
141162
* @api
142163
*/
143164
public function setVolume($volume = 50)
@@ -286,7 +307,7 @@ public function prependQueueTrack($trackUUID)
286307
* @param integer $trackPosition first entry = 0
287308
* @return array status
288309
*/
289-
public function deleteQueueTrack($trackPosition, $instanceUUID)
310+
public function deleteQueueTrack($trackPosition)
290311
{
291312
$currentTracks = $this->getQueueTracks();
292313
if ($currentTracks == null or !is_array($currentTracks)) {
@@ -327,9 +348,8 @@ public function say($text, $locale)
327348
/**
328349
* playTrack
329350
*
330-
* @param string $trackUUID 6da519a3-5aa3-4f5e-9e2d-81c88e9159ea
331-
* @param string $instanceUUID 6421eedc-9705-4706-a269-cf6f38fa1a33
332-
* @return array status
351+
* @param string $trackUUID UUID of the track
352+
* @return array status
333353
*/
334354
public function playTrack($trackUUID)
335355
{

src/Playlist.class.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,32 @@
1010

1111
namespace SinusBot;
1212

13+
/**
14+
* Playlist Instance
15+
*
16+
* Playlist represents a single Playlist of the SinusBot
17+
*/
1318
class Playlist extends RestClient
1419
{
20+
/**
21+
* Playlist holds the Playlist array
22+
* @var array
23+
*/
1524
public $playlist = null;
25+
/**
26+
* UUID holds the Playlist UUID
27+
* @var array
28+
*/
1629
public $uuid = null;
30+
/**
31+
* __construct
32+
*
33+
* @param string $token SinusBot auth token
34+
* @param string $url SinusBot Bot URL
35+
* @param int $timeout HTTP Timeout which is used to perform HTTP API requests
36+
* @param array $playlist SinusBot Playlist array.
37+
* @return void
38+
*/
1739
public function __construct($token, $url, $timeout, $playlist)
1840
{
1941
$this->token = $token;

src/RestClient.class.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,27 @@
1010

1111
namespace SinusBot;
1212

13+
/**
14+
* Class RestClient
15+
*
16+
* RestClient is used to perform the http requests to the SinusBot API
17+
*/
1318
class RestClient
1419
{
20+
/**
21+
* Timeout represents the HTTP timeout when HTTP requests to the SinusBot API are performed
22+
* @var int
23+
*/
1524
protected $timeout = null;
25+
/**
26+
* Token is the SinusBot auth token which will be there temporary stored.
27+
* @var string
28+
*/
1629
protected $token = null;
30+
/**
31+
* URL is the SinusBot URL with the port and the HTTP protocol
32+
* @var string
33+
*/
1734
protected $url = null;
1835
/**
1936
* request executes a request to the SinusBot API

0 commit comments

Comments
 (0)