1 | <?php |
||
2 | |||
3 | namespace Ijeffro\Laralocker\LearningLocker\Downloads; |
||
4 | |||
5 | use Ijeffro\Laralocker\LearningLocker\API\APIHandler; |
||
6 | |||
7 | class DownloadHandler extends APIHandler implements DownloadInterface { |
||
8 | |||
9 | private $download = '/download'; |
||
10 | private $api = '/api'; |
||
11 | private $v1 = '/v1'; |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
12 | private $v2 = '/v2'; |
||
13 | |||
14 | protected $headers = [ |
||
15 | 'content-type' => 'application/json' |
||
16 | ]; |
||
17 | |||
18 | /** |
||
19 | * Learning Locker: Request Organisation Details |
||
20 | * |
||
21 | * @return $response |
||
0 ignored issues
–
show
|
|||
22 | */ |
||
23 | public function get() { |
||
24 | try { |
||
25 | $url = $this->url . $this->api . $this->v2 . $this->download; |
||
26 | $response = $this->request($url); |
||
27 | return $response; |
||
28 | } catch (Exception $e) { |
||
0 ignored issues
–
show
|
|||
29 | return $e; |
||
30 | } |
||
31 | } |
||
32 | |||
33 | } |
||
34 |