Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
a8062fd5
Commit
a8062fd5
authored
May 23, 2017
by
Ariën Holthuizen
Committed by
Sander van Harmelen
May 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ListVisibleProjects to projects.go (#178)
parent
e570ec95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
projects.go
projects.go
+20
-1
No files found.
projects.go
View file @
a8062fd5
...
@@ -174,7 +174,7 @@ type ListProjectsOptions struct {
...
@@ -174,7 +174,7 @@ type ListProjectsOptions struct {
Statistics
*
bool
`url:"statistics,omitempty" json:"statistics,omitempty"`
Statistics
*
bool
`url:"statistics,omitempty" json:"statistics,omitempty"`
}
}
// ListProjects gets a list of projects
accessible by the authenticated user.
// ListProjects gets a list of projects
for which the authenticated user is a member
//
//
// GitLab API docs:
// GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/projects.md#list-projects
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/projects.md#list-projects
...
@@ -193,6 +193,25 @@ func (s *ProjectsService) ListProjects(opt *ListProjectsOptions, options ...Opti
...
@@ -193,6 +193,25 @@ func (s *ProjectsService) ListProjects(opt *ListProjectsOptions, options ...Opti
return
p
,
resp
,
err
return
p
,
resp
,
err
}
}
// ListVisibleProjects gets a list of projects accessible by the authenticated user.
//
// GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/projects.md#list-projects
func
(
s
*
ProjectsService
)
ListVisibleProjects
(
opt
*
ListProjectsOptions
,
options
...
OptionFunc
)
([]
*
Project
,
*
Response
,
error
)
{
req
,
err
:=
s
.
client
.
NewRequest
(
"GET"
,
"projects/visible"
,
opt
,
options
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
var
p
[]
*
Project
resp
,
err
:=
s
.
client
.
Do
(
req
,
&
p
)
if
err
!=
nil
{
return
nil
,
resp
,
err
}
return
p
,
resp
,
err
}
// ListOwnedProjects gets a list of projects which are owned by the
// ListOwnedProjects gets a list of projects which are owned by the
// authenticated user.
// authenticated user.
//
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment