Skip to content

Commit

Permalink
Adds support for doctors (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwalker109 authored and Hodglim committed Mar 2, 2018
1 parent cde5e00 commit aca5cd4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
15 changes: 15 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions src/Endpoints/Doctors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Wonde\Endpoints;

class Doctors extends BootstrapEndpoint
{
/**
* @var string
*/
public $uri = 'doctors/';
}
6 changes: 6 additions & 0 deletions src/Endpoints/Schools.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ class Schools extends BootstrapEndpoint
*/
public $events;

/**
* @var Doctors
*/
public $doctors;

/**
* Schools constructor.
*
Expand All @@ -151,6 +156,7 @@ public function __construct($token, $id = false)
$this->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);
Expand Down

0 comments on commit aca5cd4

Please sign in to comment.