Skip to content

Commit 8b34584

Browse files
author
David Albrecht
committed
improves example in readme.md
This example works outside of the object context as well
1 parent 73cf9b7 commit 8b34584

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,26 @@ Creating a new instance is as simple as:
2121

2222
```php
2323
<?php
24-
$this->service = OpenBazaar\ClientFactory::factory([
24+
$service = OpenBazaar\ClientFactory::factory([
2525
'base_url' => 'http://your_ip_or_domain_here:18469/',
2626
]
2727
);
28-
$response = $this->service->login([
28+
$response = $service->login([
2929
'username' => 'your_username_here',
3030
'password' => 'your_password_here',
3131
]);
3232
// get Profile will return your profile info
33-
$result = $this->service->getProfile();
33+
$result = $service->getProfile();
3434
// get Listings for the store with the given guid
35-
$result = $this->service->getListings([
35+
$result = $service->getListings([
3636
'guid' => 'a06aa22a38f0e62221ab74464c311bd88305f88c'
3737
]);
3838
// follow another page
39-
$result = $this->service->follow(
39+
$result = $service->follow(
4040
['guid' => 'a06aa22a38f0e62221ab74464c311bd88305f88c']
4141
);
4242
// change your username
43-
$result = $this->service->changeProfile(
43+
$result = $service->changeProfile(
4444
['name' => 'New Name']
4545
);
4646
?>

0 commit comments

Comments
 (0)