Skip to content

Commit 6817fa2

Browse files
committed
Update README.md
1 parent 3130e3c commit 6817fa2

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

README.md

+24-10
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,32 @@ It's build upon the official API documentation at https://github.com/ssllabs/ssl
77

88
require_once 'sslLabsApi.php';
99

10+
//Return API response as JSON string
1011
$api = new sslLabsApi();
1112

13+
//Return API response as JSON object
14+
//$api = new sslLabsApi(true);
15+
1216
//Set content-type header for JSON output
1317
header('Content-Type: application/json');
1418

1519
//get API information
16-
echo $api->fetchApiInfo();
20+
var_dump($api->fetchApiInfo());
1721

1822
?>
1923
```
20-
21-
## fetchApiInfo()
24+
## Methods
25+
### fetchApiInfo()
2226
No parameters needed
2327

2428
Returns an Info object (see https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#info).
2529

26-
## fetchStatusCodes()
30+
### fetchStatusCodes()
2731
No parameters needed
2832

2933
Returns a StatusCodes instance (see https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#statuscodes).
3034

31-
## fetchHostInformation()
35+
### fetchHostInformation()
3236
See https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#invoke-assessment-and-check-progress for parameter description.
3337

3438
| Parameter | Type | Default value | |
@@ -45,7 +49,7 @@ Returns a Host object (see https://github.com/ssllabs/ssllabs-scan/blob/master/s
4549

4650
Make sure to check the 'status' attribute inside Host object.
4751

48-
## fetchHostInformationCached()
52+
### fetchHostInformationCached()
4953
You can also use fetchHostInformation() with the proper parameters, this is just a helper function.
5054

5155
| Parameter | Type | Default value | |
@@ -59,7 +63,7 @@ Returns a Host object (see https://github.com/ssllabs/ssllabs-scan/blob/master/s
5963

6064
Also make sure to check the 'status' attribute inside Host object.
6165

62-
## fetchEndpointData()
66+
### fetchEndpointData()
6367
See https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#retrieve-detailed-endpoint-information for parameter description.
6468

6569
| Parameter | Type | Default value | |
@@ -70,7 +74,7 @@ See https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#retr
7074

7175
Returns an Endpoint object (see https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#endpoint).
7276

73-
## Custom API calls
77+
### Custom API calls
7478
Use sendApiRequest() method to create custom API calls.
7579

7680
| Parameter | Type | Default value | |
@@ -82,7 +86,17 @@ Use sendApiRequest() method to create custom API calls.
8286
$api->sendApiRequest('apiCallName', array('p1' => 'p1_value', 'p2' => 'p2_value'));
8387
```
8488

85-
## Example output
89+
### getReturnJsonObjects()
90+
Getter for returnJsonObjects
91+
92+
### setReturnJsonObjects()
93+
Setter for returnJsonObjects
94+
95+
| Parameter | Type | Default value | |
96+
|-----------------------|---------|---------------|----------|
97+
| **returnJsonObjects** | boolean | | Required |
98+
99+
## Example output (as JSON strings)
86100
### Get API information
87101
```PHP
88102
$api->fetchApiInfo();
@@ -220,4 +234,4 @@ $api->fetchEndpointData('https://www.google.de', '74.125.239.111');
220234
```
221235

222236
# Terms and Conditions
223-
As this is just a PHP library for SSL Labs API please refer to SSL Labs Terms and Conditions at https://www.ssllabs.com/about/terms.html
237+
As this is just a PHP library for SSL Labs API please refer to SSL Labs terms and conditions at https://www.ssllabs.com/about/terms.html

0 commit comments

Comments
 (0)