1 | <?php |
||
21 | class VideoPublisherClient |
||
22 | { |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $baseUrl; |
||
27 | |||
28 | /** |
||
29 | * @var ConnectionInterface - Class responsible for sending of payloads |
||
30 | */ |
||
31 | private $connection; |
||
32 | |||
33 | /** |
||
34 | * @var PayloadFactory - Factory that can create payloads |
||
35 | */ |
||
36 | private $payloadFactory; |
||
37 | |||
38 | /** |
||
39 | * @var Authentication - Class responsible for authentication |
||
40 | */ |
||
41 | private $authentication; |
||
42 | |||
43 | /** |
||
44 | * VideoPublisherClient constructor. |
||
45 | * |
||
46 | * @param Authentication $authentication - Your preferred authentication, default KeyPairAuthentication |
||
47 | * @param string $tokenCacheLocation - Your preferred token location on disk. This can be any folder, but make sure the application has sufficient rights. |
||
48 | * @param string $baseUrl - http://my.videopublisher.io/ |
||
49 | * @param ConnectionInterface $connection |
||
50 | * |
||
51 | * @throws TokenCacheNotWritableException |
||
52 | */ |
||
53 | public function __construct(Authentication $authentication, $tokenCacheLocation, $baseUrl = 'http://my.videopublisher.io/', ConnectionInterface $connection = null) |
||
67 | |||
68 | /** |
||
69 | * Returns a list of al your published streams, with basic information. |
||
70 | * |
||
71 | * @return SimpleStream[] |
||
72 | * @throws BadResponseException |
||
73 | */ |
||
74 | public function listStreams() |
||
90 | |||
91 | |||
92 | /** |
||
93 | * Returns a stream, based on Uuid. Contains basic information and playout url / video player |
||
94 | * |
||
95 | * @param string $uuid |
||
96 | * @return Stream |
||
97 | * @throws StreamNotFoundException |
||
98 | */ |
||
99 | public function getStream($uuid) |
||
111 | |||
112 | } |