mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #3068 from kinglozzer/patch-1
DOCS: Minor fixes to RestfulService documentation
This commit is contained in:
commit
a46f5f133a
@ -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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user