Commit fe1fd85a authored by Georg Hartmann's avatar Georg Hartmann

Clarify usage in README

rename var client to git like in the other examples, show that baseurl expects /api/v3
parent a0a0ff4d
...@@ -42,6 +42,7 @@ users: ...@@ -42,6 +42,7 @@ users:
```go ```go
git := gitlab.NewClient(nil, "yourtokengoeshere") git := gitlab.NewClient(nil, "yourtokengoeshere")
//git.SetBaseURL("https://git.mydomain.com/api/v3")
users, _, err := git.Users.ListUsers() users, _, err := git.Users.ListUsers()
``` ```
...@@ -49,9 +50,9 @@ Some API methods have optional parameters that can be passed. For example, ...@@ -49,9 +50,9 @@ Some API methods have optional parameters that can be passed. For example,
to list all projects for user "svanharmelen": to list all projects for user "svanharmelen":
```go ```go
client := github.NewClient(nil) git := gitlab.NewClient(nil)
opt := &ListProjectsOptions{Search: "svanharmelen"}) opt := &ListProjectsOptions{Search: "svanharmelen"})
projects, _, err := client.Projects.ListProjects(opt) projects, _, err := git.Projects.ListProjects(opt)
``` ```
### Examples ### Examples
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment