Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
48 | function getFromSiteWithStartAndEnd($siteProperty,$timeUnit,$startDate,$endDate,$withTime = false){ |
||
49 | if(!$withTime) { |
||
50 | $request = |
||
51 | Curl::to($this->endpoint . 'site/' . $this->id . '/' . $siteProperty . |
||
52 | $this->key . |
||
53 | '&startDate=' . $startDate . |
||
54 | '&endDate=' . $endDate . |
||
55 | '&timeUnit=' . $timeUnit |
||
56 | )->asJson()->get()->{$siteProperty}; |
||
57 | } |
||
58 | else { |
||
59 | $request = |
||
60 | Curl::to($this->endpoint . 'site/' . $this->id . '/' . $siteProperty . |
||
61 | $this->key . |
||
62 | '&startTime=' . $startDate . |
||
63 | '&endTime=' . $endDate |
||
64 | )->asJson()->get()->{$siteProperty}; |
||
65 | } |
||
66 | |||
67 | return $request; |
||
68 | } |
||
69 | } |