Total Complexity | 5 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class OrganisationHandler extends APIHandler implements OrganisationInterface { |
||
8 | |||
9 | private $organisation = '/organisation'; |
||
10 | private $api = '/api'; |
||
11 | private $v2 = '/v2'; |
||
12 | |||
13 | protected $headers = [ |
||
14 | 'Accept' => 'application/json', |
||
15 | 'Content-Type' => 'application/json' |
||
16 | ]; |
||
17 | |||
18 | function __construct($id = null) { |
||
19 | parent::__construct(); |
||
20 | $this->id = $id; |
||
|
|||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Learning Locker: Get Organisation Details |
||
25 | * |
||
26 | * @return $response |
||
27 | */ |
||
28 | public function get() { |
||
29 | try { |
||
30 | $url = $this->url . $this->api . $this->v2 . $this->organisation; |
||
31 | $response = $this->request($url); |
||
32 | return $response; |
||
33 | } catch (Exception $e) { |
||
34 | return $e; |
||
35 | } |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Learning Locker: Request Organisation Details |
||
40 | * |
||
41 | * @return $response |
||
42 | */ |
||
43 | public function update($data) { |
||
50 | } |
||
51 | } |
||
52 | |||
54 |