Total Complexity | 5 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class QueryHandler extends APIHandler implements QueryInterface { |
||
8 | |||
9 | private $query = '/query'; |
||
10 | private $api = '/api'; |
||
11 | private $v1 = '/v1'; |
||
|
|||
12 | private $v2 = '/v2'; |
||
13 | |||
14 | protected $headers = [ |
||
15 | 'content-type' => 'application/json' |
||
16 | ]; |
||
17 | |||
18 | function __construct($id = null) { |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Learning Locker: Request Organisation Details |
||
25 | * |
||
26 | * @return $response |
||
27 | */ |
||
28 | public function get() { |
||
29 | try { |
||
30 | $url = $this->url . $this->api . $this->v2 . $this->query . '/' . $this->id ?? $this->id; |
||
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 | } |
||
53 |