@@ -15,7 +15,7 @@ that will help to use the SoftLayer API.
1515
1616 >>> import SoftLayer
1717 >>> client = SoftLayer.create_client_from_env(username="username", api_key="api_key")
18- >>> resp = client[ 'Account']. getObject( )
18+ >>> resp = client.call( 'Account', ' getObject' )
1919 >>> resp['companyName']
2020 'Your Company'
2121
@@ -92,7 +92,7 @@ method on the
9292service.
9393::
9494
95- client[ 'Account']. getObject( )
95+ client.call( 'Account', ' getObject' )
9696
9797For a more complex example we'll retrieve a support ticket with id 123456 along
9898with the ticket's updates, the user it's assigned to, the servers attached to
@@ -102,7 +102,7 @@ using an `object mask <http://developer.softlayer.com/article/Extended-Object-Ma
102102Retrieve a ticket using object masks.
103103::
104104
105- ticket = client[ 'Ticket']. getObject(
105+ ticket = client.call( 'Ticket', ' getObject',
106106 id=123456, mask="updates, assignedUser, attachedHardware.datacenter")
107107
108108
@@ -112,19 +112,19 @@ This uses a parameter, which translate to positional arguments in the order
112112that they appear in the API docs.
113113::
114114
115- update = client[ 'Ticket']. addUpdate( {'entry' : 'Hello!'}, id=123456)
115+ update = client.call( 'Ticket', ' addUpdate', {'entry' : 'Hello!'}, id=123456)
116116
117117Let's get a listing of virtual guests using the domain example.com
118118::
119119
120- client[ 'Account']. getVirtualGuests(
120+ client.call( 'Account', ' getVirtualGuests',
121121 filter={'virtualGuests': {'domain': {'operation': 'example.com'}}})
122122
123123This call gets tickets created between the beginning of March 1, 2013 and
124124March 15, 2013.
125125::
126126
127- client[ 'Account']. getTickets(
127+ client.call( 'Account', ' getTickets',
128128 filter={
129129 'tickets': {
130130 'createDate': {
@@ -141,16 +141,16 @@ March 15, 2013.
141141SoftLayer's XML-RPC API also allows for pagination.
142142::
143143
144- client[ 'Account']. getVirtualGuests( limit=10, offset=0) # Page 1
145- client[ 'Account']. getVirtualGuests( limit=10, offset=10) # Page 2
144+ client.call( 'Account', ' getVirtualGuests', limit=10, offset=0) # Page 1
145+ client.call( 'Account', ' getVirtualGuests', limit=10, offset=10) # Page 2
146146
147147Here's how to create a new Cloud Compute Instance using
148148`SoftLayer_Virtual_Guest.createObject <http://developer.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject >`_.
149149Be warned, this call actually creates an hourly virtual server so this will
150150have billing implications.
151151::
152152
153- client[ 'Virtual_Guest']. createObject( {
153+ client.call( 'Virtual_Guest', ' createObject', {
154154 'hostname': 'myhostname',
155155 'domain': 'example.com',
156156 'startCpus': 1,
0 commit comments