From ff867f60f72861ed15cf35b74b5d9150dadc9c0d Mon Sep 17 00:00:00 2001 From: Dmytro Zhyvonitko Date: Wed, 14 Jul 2021 22:25:42 +0300 Subject: [PATCH 1/2] Add HIPAA Forms support --- JotForm.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/JotForm.php b/JotForm.php index 836367a..4863a70 100644 --- a/JotForm.php +++ b/JotForm.php @@ -15,15 +15,20 @@ class JotForm { private $outputType; private $apiVersion = 'v1'; - public function __construct($apiKey = '', $outputType = 'json', $debugMode = false) { + public function __construct($apiKey = '', $outputType = 'json', $debugMode = false, $hipaaSupport = false) { $this->apiKey = $apiKey; $this->debugMode = $debugMode; $this->outputType = strtolower($outputType); - $user = $this->getUser(); - # set base url for EU users - if (isset($user['euOnly'])) { - $this->baseURL = 'https://eu-api.jotform.com'; + + if ($hipaaSupport) { + $this->baseURL = 'https://hipaa-api.jotform.com'; + } else { + $user = $this->getUser(); + # set base url for EU users + if (isset($user['euOnly'])) { + $this->baseURL = 'https://eu-api.jotform.com'; + } } } From 41c44ac2b150b6b3f19067bd936d582976f4be8d Mon Sep 17 00:00:00 2001 From: Dmytro Zhyvonitko Date: Wed, 14 Jul 2021 22:32:44 +0300 Subject: [PATCH 2/2] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 5c96746..a447f17 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,18 @@ JotForm API requires API key for all user related calls. You can create your API ### Examples +Create a new instance of JotForm client + +```php + +``` + Print all forms of the user ```php