Skip to content

Commit e6d3ba1

Browse files
committed
Added docs for constructor argument
1 parent 71cee7d commit e6d3ba1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

doc/api_version.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
## Api version
22
[Back to the navigation](README.md)
33

4-
If you want to change the API version from its default ("v3") you may do that with
5-
the `setApiVersion` function.
4+
If you want to change the API version from its default ("v3") you may do that with a constructor argument.
65
For example:
76

87
```php
98
$client = new Github\Client();
10-
119
echo $client->getApiVersion(); // prints "s3"
1210

13-
$client->setApiVersion("v2");
11+
$client = new Github\Client($httpClient, 'v2');
12+
echo $client->getApiVersion(); // prints "s2"
1413
```

0 commit comments

Comments
 (0)