Merge pull request #3068 from kinglozzer/patch-1

DOCS: Minor fixes to RestfulService documentation
This commit is contained in:
Damian Mooyman 2014-04-29 09:04:29 +12:00
commit a46f5f133a

View File

@ -19,7 +19,7 @@ RestfulService (see [flickrservice](http://silverstripe.org/flickr-module/) and
$twitter = new RestfulService("http://twitter.com/statuses/user_timeline/user.xml", $cache_expiry );
$params = array('count' => 1);
$twitter->setQueryString($params);
$conn = $twitter->connect();
$conn = $twitter->request();
$msgs = $twitter->getValues($conn, "status");
@ -45,12 +45,12 @@ RestfulService (see [flickrservice](http://silverstripe.org/flickr-module/) and
$service->httpHeader('Accept: application/xml');
$service->httpHeader('Content-Type: application/xml');
$peopleXML = $service->connect('/people');
$peopleXML = $service->request('/people');
$people = $service->getValues($peopleXML, 'user');
// ...
$taskXML = $service->connect('/tasks');
$taskXML = $service->request('/tasks');
$tasks = $service->getValues($taskXML, 'task');
@ -76,7 +76,7 @@ for example you can traverse
<entry id='15'>Ted</entry>
<entry id='30'>Matt</entry>
<entry id='22'>John</entry>
<entries>
</entries>
to extract the id attributes of the entries use: