diff --git a/doc/api_version.md b/doc/api_version.md new file mode 100644 index 00000000000..a8bc733461b --- /dev/null +++ b/doc/api_version.md @@ -0,0 +1,13 @@ +## Api version +[Back to the navigation](README.md) + +If you want to change the API version from its default ("v3") you may do that with a constructor argument. +For example: + +```php +$client = new Github\Client(); +echo $client->getApiVersion(); // prints "v3" + +$client = new Github\Client($httpClient, 'v2'); +echo $client->getApiVersion(); // prints "v2" +```