1
- # SwaggerClient-php
2
- This API gives You the ability to build Your own application and integrate it with Docplanner services.
3
-
4
- This PHP package is automatically generated by the [ Swagger Codegen] ( https://github.com/swagger-api/swagger-codegen ) project:
5
-
6
- - API version: 0.0.1c
7
- - Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
8
-
9
1
## Requirements
10
2
11
- PHP 5.5 and later
3
+ PHP >= 5.5
4
+
5
+ Guzzle/guzzle >= 6.2
12
6
13
7
## Installation & Usage
14
8
### Composer
15
9
16
- To install the bindings via [ Composer] ( http://getcomposer.org/ ) , add the following to ` composer.json ` :
17
-
18
- ```
19
- {
20
- "repositories": [
21
- {
22
- "type": "git",
23
- "url": "https://github.com/DocPlanner/integrations-api-sdk-php.git"
24
- }
25
- ],
26
- "require": {
27
- "DocPlanner/integrations-api-sdk-php": "*@dev"
28
- }
29
- }
30
- ```
31
-
32
- Then run ` composer install `
10
+ To install the bindings via [ Composer] ( http://getcomposer.org/ ) , run ` composer require docplanner/integrations-api-sdk-php ` .
33
11
34
12
### Manual Installation
35
13
36
14
Download the files and include ` autoload.php ` :
37
15
38
16
``` php
39
- require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
40
- ```
41
-
42
- ## Tests
43
-
44
- To run the unit tests:
45
-
46
- ```
47
- composer install
48
- ./vendor/bin/phpunit
17
+ require_once('/path/to/DocPlanner/Client/vendor/autoload.php');
49
18
```
50
-
51
19
## Getting Started
52
20
53
21
Please follow the [ installation procedure] ( #installation--usage ) and then run the following:
54
22
55
23
``` php
56
24
<?php
57
25
require_once(__DIR__ . '/vendor/autoload.php');
26
+ //Get OAuth2 access token
27
+ $authorization = new DocPlanner\Client\Authorization('AUTHORIZATION_URL');
28
+ $accessToken = $authorization->getAccessToken('YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET');
58
29
59
- // Configure OAuth2 access token for authorization: oauth2_client_credentials
60
- $config = DocPlanner\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN' );
30
+ // Configure access token for authorization
31
+ $config = DocPlanner\Client\Configuration::getDefaultConfiguration()->setAccessToken($accessToken );
61
32
62
33
$apiInstance = new DocPlanner\Client\Api\AddressesApi(
63
34
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
@@ -68,7 +39,7 @@ $apiInstance = new DocPlanner\Client\Api\AddressesApi(
68
39
$facility_id = 56; // int | ID of the Facility
69
40
$doctor_id = 56; // int | ID of a doctor in a facility
70
41
$address_id = 56; // int | ID of a doctor`s address in a facility
71
- $with = array(new \DocPlanner\Client\Model\AddressesScopes()) ; // \DocPlanner\Client\Model\AddressesScopes [] |
42
+ $with = array(\DocPlanner\Client\Model\AddressScopes::VISIT_PAYMENT) ; // string [] |
72
43
73
44
try {
74
45
$result = $apiInstance->getAddress($facility_id, $doctor_id, $address_id, $with);
77
48
echo 'Exception when calling AddressesApi->getAddress: ', $e->getMessage(), PHP_EOL;
78
49
}
79
50
80
- // Configure OAuth2 access token for authorization: oauth2_client_credentials
81
- $config = DocPlanner\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN' );
51
+ // Configure access token for authorization
52
+ $config = DocPlanner\Client\Configuration::getDefaultConfiguration()->setAccessToken($accessToken );
82
53
83
54
$apiInstance = new DocPlanner\Client\Api\AddressesApi(
84
55
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
@@ -88,7 +59,7 @@ $apiInstance = new DocPlanner\Client\Api\AddressesApi(
88
59
);
89
60
$facility_id = 56; // int | ID of the Facility
90
61
$doctor_id = 56; // int | ID of a doctor in a facility
91
- $with = array(new \ DocPlanner\Client\Model\AddressesScopes()) ; // \DocPlanner\Client\Model\AddressesScopes [] |
62
+ $with = DocPlanner\Client\Model\AddressesScopes::getAllowableEnumValues() ; // string [] |
92
63
93
64
try {
94
65
$result = $apiInstance->getAddresses($facility_id, $doctor_id, $with);
@@ -181,20 +152,3 @@ Class | Method | HTTP request | Description
181
152
- [ Specialization] ( docs/Model/Specialization.md )
182
153
- [ Specializations] ( docs/Model/Specializations.md )
183
154
- [ UpdateAddressServiceRequest] ( docs/Model/UpdateAddressServiceRequest.md )
184
-
185
- ## Documentation For Authorization
186
-
187
-
188
- ## oauth2_client_credentials
189
-
190
- - ** Type** : OAuth
191
- - ** Flow** : application
192
- - ** Authorization URL** :
193
- - ** Scopes** :
194
- - **** :
195
-
196
-
197
- ## Author
198
-
199
-
200
-
0 commit comments