Skip to content

Commit 28913df

Browse files
committed
Update README.textile
Add syntax highlighting and highlight code and filenames for better readability
1 parent 70b96b0 commit 28913df

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.textile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ h2. Overview
99

1010
The SoftLayer API PHP client classes provide a simple method for connecting to and making calls from the SoftLayer API and provides support for many of the SoftLayer API's features. Method calls and client management are handled by the PHP SOAP and XML-RPC extensions.
1111

12-
Making API calls using the \SoftLayer\SoapClient or \SoftLayer\XmlRpcClient classes is done in the following steps:
12+
Making API calls using the `\SoftLayer\SoapClient` or `\SoftLayer\XmlRpcClient` classes is done in the following steps:
1313

14-
# Instantiate a new \SoftLayer\SoapClient or \SoftLayer\XmlRpcClient object using the \SoftLayer\SoapClient::getClient() or \SoftLayer\XmlRpcClient::getClient() methods. Provide the name of the service that you wish to query, an optional id number of the object that you wish to instantiate, your SoftLayer API username, your SoftLayer API key, and an optional API endpoint base URL. The client classes default to connect over the public Internet. Enter \SoftLayer\SoapClient::API_PRIVATE_ENDPOINT or \SoftLayer\XmlRpcClient::API_PRIVATE_ENDPOINT to connect to the API over SoftLayer's private network. The system making API calls must be connected to SoftLayer's private network (eg. purchased from SoftLayer or connected via VPN) in order to use the private network API endpoints.
14+
# Instantiate a new `\SoftLayer\SoapClient` or `\SoftLayer\XmlRpcClient` object using the `\SoftLayer\SoapClient::getClient()` or `\SoftLayer\XmlRpcClient::getClient()` methods. Provide the name of the service that you wish to query, an optional id number of the object that you wish to instantiate, your SoftLayer API username, your SoftLayer API key, and an optional API endpoint base URL. The client classes default to connect over the public Internet. Enter `\SoftLayer\SoapClient::API_PRIVATE_ENDPOINT` or `\SoftLayer\XmlRpcClient::API_PRIVATE_ENDPOINT` to connect to the API over SoftLayer's private network. The system making API calls must be connected to SoftLayer's private network (eg. purchased from SoftLayer or connected via VPN) in order to use the private network API endpoints.
1515
# Define and add optional headers to the client, such as object masks and result limits.
1616
# Call the API method you wish to call as if it were local to your client object. This class throws exceptions if it's unable to execute a query, so it's best to place API method calls in try / catch statements for proper error handling.
1717

@@ -21,7 +21,7 @@ The most up to date version of this library can be found on the SoftLayer github
2121

2222
h2. System Requirements
2323

24-
The \SoftLayer\SoapClient class requires at least PHP 5.3.0 and the PHP SOAP enxtension installed. The \SoftLayer\XmlRpcClient class requires PHP at least PHP 5 and the PHP XML-RPC extension installed.
24+
The `\SoftLayer\SoapClient` class requires at least PHP 5.3.0 and the PHP SOAP enxtension installed. The `\SoftLayer\XmlRpcClient` class requires PHP at least PHP 5 and the PHP XML-RPC extension installed.
2525

2626
A valid API username and key are required to call the SoftLayer API. A connection to the SoftLayer private network is required to connect to SoftLayer's private network API endpopints.
2727

@@ -34,11 +34,11 @@ composer require softlayer/softlayer-api-php-client:~1.0@dev
3434

3535
h2. Usage
3636

37-
These examples use the \SoftLayer\SoapClient class. If you wish to use the XML-RPC API then replace mentions of SoapClient.class.php with XmlrpcClient.class.php and \SoftLayer\SoapClient with \SoftLayer\XmlRpcClient.
37+
These examples use the `\SoftLayer\SoapClient` class. If you wish to use the XML-RPC API then replace mentions of `SoapClient.class.php` with `XmlrpcClient.class.php` and `\SoftLayer\SoapClient` with `\SoftLayer\XmlRpcClient`.
3838

3939
Here's a simple usage example that retrieves account information by calling the "getObject()":http://sldn.softlayer.com/reference/services/SoftLayer_Account/getObject method in the "SoftLayer_Account":http://sldn.softlayer.com/reference/services/SoftLayer_Account service:
4040

41-
<pre><code>
41+
```php
4242
<?php
4343

4444
require_once __DIR__.'/vendor/autoload.php';
@@ -56,11 +56,11 @@ try {
5656
} catch (\Exception $e) {
5757
die('Unable to retrieve account information: ' . $e->getMessage());
5858
}
59-
</code></pre>
59+
```
6060

6161
For a more complex example we'll retrieve a support ticket with id 123456 along with the ticket's updates, the user it's assigned to, the servers attached to it, and the datacenter those servers are in. We'll retrieve our extra information using a nested object mask. After we have the ticket we'll update it with the text 'Hello!'.
6262

63-
<pre><code>
63+
```php
6464
<?php
6565

6666
require_once __DIR__.'/vendor/autoload.php';
@@ -95,7 +95,7 @@ try {
9595
} catch (\Exception $e) {
9696
die('Unable to update ticket: ' . $e->getMessage());
9797
}
98-
</code></pre>
98+
```
9999

100100
h2. Author
101101

0 commit comments

Comments
 (0)