1 | <?php |
||
9 | class Wakatime |
||
10 | { |
||
11 | use Macroable; |
||
12 | |||
13 | protected $client; |
||
14 | |||
15 | /** |
||
16 | * Create a new Wakatime Instance. |
||
17 | */ |
||
18 | public function __construct(WakatimeClient $client) |
||
22 | |||
23 | public function setApiKey(string $apiKey) |
||
29 | |||
30 | public function getApiKey() : string |
||
34 | |||
35 | public function getBaseUrl() : string |
||
39 | |||
40 | public function setBaseUrl(string $baseUrl) |
||
46 | |||
47 | /** |
||
48 | * Fetches the User's durations for the specified Date |
||
49 | * |
||
50 | * |
||
51 | * @param DateTime $date |
||
52 | * @param string $user |
||
53 | * @param array $optionalQuery |
||
54 | * project (optional) Only show duration for this project |
||
55 | * branches (optional) Only show durations for these branches: |
||
56 | * comma separated list of branch names |
||
57 | * @return Collection |
||
58 | */ |
||
59 | public function fetchUserDurations(DateTime $date, string $user = 'current', array $optionalQuery = []) : Collection |
||
66 | |||
67 | |||
68 | public function performRequest($resource, array $query = [], array $headers = []) |
||
72 | |||
73 | } |
||
74 |