From 71cee7d9482898beb560bbad3df446a722c8f839 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 1 Aug 2016 10:02:28 +0200 Subject: [PATCH 1/3] Added docs about api_version --- doc/api_version.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/api_version.md diff --git a/doc/api_version.md b/doc/api_version.md new file mode 100644 index 00000000000..a352f926968 --- /dev/null +++ b/doc/api_version.md @@ -0,0 +1,14 @@ +## 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 +the `setApiVersion` function. +For example: + +```php +$client = new Github\Client(); + +echo $client->getApiVersion(); // prints "s3" + +$client->setApiVersion("v2"); +``` From e6d3ba19979e03a8fc8309abad5fdfc0fe5b6261 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 1 Aug 2016 11:12:59 +0200 Subject: [PATCH 2/3] Added docs for constructor argument --- doc/api_version.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/api_version.md b/doc/api_version.md index a352f926968..4ae8d84925a 100644 --- a/doc/api_version.md +++ b/doc/api_version.md @@ -1,14 +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 -the `setApiVersion` function. +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 "s3" -$client->setApiVersion("v2"); +$client = new Github\Client($httpClient, 'v2'); +echo $client->getApiVersion(); // prints "s2" ``` From 08083e5a455f14ee8010b73f87715c576a84f27e Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 1 Aug 2016 11:20:00 +0200 Subject: [PATCH 3/3] typo --- doc/api_version.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api_version.md b/doc/api_version.md index 4ae8d84925a..a8bc733461b 100644 --- a/doc/api_version.md +++ b/doc/api_version.md @@ -6,8 +6,8 @@ For example: ```php $client = new Github\Client(); -echo $client->getApiVersion(); // prints "s3" +echo $client->getApiVersion(); // prints "v3" $client = new Github\Client($httpClient, 'v2'); -echo $client->getApiVersion(); // prints "s2" +echo $client->getApiVersion(); // prints "v2" ```