diff options
author | bjoernr-de <bjoern.roland@gmail.com> | 2015-03-27 20:13:22 +0100 |
---|---|---|
committer | bjoernr-de <bjoern.roland@gmail.com> | 2015-03-27 20:13:22 +0100 |
commit | 6817fa2c960fd399e6d64702eb5cfe595b560924 (patch) | |
tree | 13acb14ca1a0216ca706cab2b6cbb12cf72c09aa | |
parent | 3130e3cbf7a86517bfa8b935c3eb6f5a4614406e (diff) | |
download | php-ssllabs-api-6817fa2c960fd399e6d64702eb5cfe595b560924.zip php-ssllabs-api-6817fa2c960fd399e6d64702eb5cfe595b560924.tar.gz php-ssllabs-api-6817fa2c960fd399e6d64702eb5cfe595b560924.tar.bz2 |
Update README.mdHEADorigin/masterorigin/HEADmaster
-rw-r--r-- | README.md | 34 |
1 files changed, 24 insertions, 10 deletions
@@ -7,28 +7,32 @@ It's build upon the official API documentation at https://github.com/ssllabs/ssl require_once 'sslLabsApi.php'; +//Return API response as JSON string $api = new sslLabsApi(); +//Return API response as JSON object +//$api = new sslLabsApi(true); + //Set content-type header for JSON output header('Content-Type: application/json'); //get API information -echo $api->fetchApiInfo(); +var_dump($api->fetchApiInfo()); ?> ``` - -## fetchApiInfo() +## Methods +### fetchApiInfo() No parameters needed Returns an Info object (see https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#info). -## fetchStatusCodes() +### fetchStatusCodes() No parameters needed Returns a StatusCodes instance (see https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#statuscodes). -## fetchHostInformation() +### fetchHostInformation() See https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#invoke-assessment-and-check-progress for parameter description. | Parameter | Type | Default value | | @@ -45,7 +49,7 @@ Returns a Host object (see https://github.com/ssllabs/ssllabs-scan/blob/master/s Make sure to check the 'status' attribute inside Host object. -## fetchHostInformationCached() +### fetchHostInformationCached() You can also use fetchHostInformation() with the proper parameters, this is just a helper function. | Parameter | Type | Default value | | @@ -59,7 +63,7 @@ Returns a Host object (see https://github.com/ssllabs/ssllabs-scan/blob/master/s Also make sure to check the 'status' attribute inside Host object. -## fetchEndpointData() +### fetchEndpointData() See https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#retrieve-detailed-endpoint-information for parameter description. | Parameter | Type | Default value | | @@ -70,7 +74,7 @@ See https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#retr Returns an Endpoint object (see https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#endpoint). -## Custom API calls +### Custom API calls Use sendApiRequest() method to create custom API calls. | Parameter | Type | Default value | | @@ -82,7 +86,17 @@ Use sendApiRequest() method to create custom API calls. $api->sendApiRequest('apiCallName', array('p1' => 'p1_value', 'p2' => 'p2_value')); ``` -## Example output +### getReturnJsonObjects() +Getter for returnJsonObjects + +### setReturnJsonObjects() +Setter for returnJsonObjects + +| Parameter | Type | Default value | | +|-----------------------|---------|---------------|----------| +| **returnJsonObjects** | boolean | | Required | + +## Example output (as JSON strings) ### Get API information ```PHP $api->fetchApiInfo(); @@ -220,4 +234,4 @@ $api->fetchEndpointData('https://www.google.de', '74.125.239.111'); ``` # Terms and Conditions -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
\ No newline at end of file +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
\ No newline at end of file |