From 3f7affc22bba5c7f6026f6311fe89ae2354d0d91 Mon Sep 17 00:00:00 2001 From: James Shields Date: Sun, 16 Apr 2023 13:01:20 +0100 Subject: [PATCH] Updatge README.md with additional examples The only example currently is to create a new project. That's good but I think a lot of people using the library only want to retrieve information about projects, and I found it tricky to figure out how to do that. I've added an example `show()` call to retrieve information about a project, which I found a little tricky, so hopefully including in the README will help someone. --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e41f721..3370d875 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,12 @@ $client->authenticate('your_http_token', Gitlab\Client::AUTH_HTTP_TOKEN); $client = new Gitlab\Client(); $client->authenticate('your_oauth_token', Gitlab\Client::AUTH_OAUTH_TOKEN); -// An example API call +// Example API calls + +// Get project summary +$repo = $client->projects()->show('vendor/project'); + +// Create a new project $project = $client->projects()->create('My Project', [ 'description' => 'This is a project', 'issues_enabled' => false,