Skip to content

Commit e4466c7

Browse files
author
Artem Stepin
committed
updated docs
1 parent 1b576f6 commit e4466c7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ use CloudPlayDev\ConfluenceClient\Curl;
2424
use CloudPlayDev\ConfluenceClient\Entity\ConfluencePage;
2525

2626
//Create and configure a curl web client
27-
$curl = new Curl('confluence_host_url','username','password');
27+
$httpClient = new Curl('confluence_host_url','username','password');
2828
// $curl = new CurlTokenAuth('confluence_host_url','NjU9OTXA4NDI2MRY5OkBznOUO8YjaUF7KoOruZRXhILJ9');
2929

3030
//Create the Confluence Client
31-
$client = new Client($curl);
31+
$client = new Client($httpClient);
3232

3333
//Create a confluence page
3434
$page = new ConfluencePage();
@@ -40,11 +40,17 @@ $page->setSpace('testSpaceKey')->setTitle('Test')->setContent('<p>test page</p>'
4040
$client->createPage($page);
4141

4242
//Get the page we created
43-
$client->selectPageBy([
43+
$createdPage = $client->selectPageBy([
4444
'spaceKey' => 'testSpaceKey',
4545
'title' => 'Test'
4646
]);
4747

48+
//Update page content
49+
$createdPage->setContent('some new content');
50+
$client->updatePage($createdPage);
51+
52+
53+
4854
```
4955

5056

0 commit comments

Comments
 (0)