-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathClient.php
More file actions
29 lines (24 loc) · 926 Bytes
/
Client.php
File metadata and controls
29 lines (24 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
require_once __DIR__ . '/ressources/job/Job.php';
require_once __DIR__ . '/ressources/profile/Profile.php';
require_once __DIR__ . '/ressources/source/Source.php';
require_once __DIR__ . '/ressources/webhook/Webhook.php';
require_once __DIR__ . '/ressources/GuzzleWrapper.php';
class Client
{
public $DEFAULT_HOST = "https://api.hrflow.ai/";
public $DEFAULT_HOST_BASE = "v1/";
public function __construct($apiSecret, $webhookSecret=null) {
$this->auth = array();
$this->webhookSecret = $webhookSecret;
$this->_rest = new GuzzleWrapper(array(
"base_url" => $this->DEFAULT_HOST . $this->DEFAULT_HOST_BASE,
"headers" => ["X-API-KEY" => $apiSecret],
), $this->DEFAULT_HOST . $this->DEFAULT_HOST_BASE);
$this->job = new Job($this);
$this->profile = new Profile($this);
$this->source = new Source($this);
$this->webhooks = new Webhook($this);
}
}
?>