From aca5cd4830f57b7e117ec6cf2941d188e0cd7708 Mon Sep 17 00:00:00 2001 From: Dan Walker Date: Fri, 2 Mar 2018 16:24:00 +0000 Subject: [PATCH] Adds support for doctors (#5) --- readme.md | 15 +++++++++++++++ src/Endpoints/Doctors.php | 11 +++++++++++ src/Endpoints/Schools.php | 6 ++++++ 3 files changed, 32 insertions(+) create mode 100644 src/Endpoints/Doctors.php diff --git a/readme.md b/readme.md index e5aa8d6..68535c5 100644 --- a/readme.md +++ b/readme.md @@ -585,6 +585,21 @@ foreach ($school->medicalEvents->all() as $medicalEvent) { } ``` +### Doctors + +```php +$client = new \Wonde\Client('TOKEN_GOES_HERE'); + +$school = $client->school('SCHOOL_ID_GOES_HERE'); + +// Get doctors +foreach ($school->doctors->all() as $doctor) { + echo $doctor->surname . PHP_EOL; + echo $doctor->practice_name . PHP_EOL; + echo $doctor->telephone . PHP_EOL; +} +``` + ### Periods ```php diff --git a/src/Endpoints/Doctors.php b/src/Endpoints/Doctors.php new file mode 100644 index 0000000..3449896 --- /dev/null +++ b/src/Endpoints/Doctors.php @@ -0,0 +1,11 @@ +contacts = new Contacts($token, $this->uri); $this->counts = new Counts($token, $this->uri); $this->deletions = new Deletions($token, $this->uri); + $this->doctors = new Doctors($token, $this->uri); $this->employees = new Employees($token, $this->uri); $this->employeeAbsences = new EmployeeAbsences($token, $this->uri); $this->events = new Events($token, $this->uri);