Commit 6177e9a8 authored by Sander van Harmelen's avatar Sander van Harmelen Committed by GitHub

Update all documentation links (#106)

parent 74bf061f
...@@ -24,14 +24,14 @@ import ( ...@@ -24,14 +24,14 @@ import (
// BranchesService handles communication with the branch related methods // BranchesService handles communication with the branch related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/branches.html // GitLab API docs: https://docs.gitlab.com/ce/api/branches.html
type BranchesService struct { type BranchesService struct {
client *Client client *Client
} }
// Branch represents a GitLab branch. // Branch represents a GitLab branch.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/branches.html // GitLab API docs: https://docs.gitlab.com/ce/api/branches.html
type Branch struct { type Branch struct {
Commit *Commit `json:"commit"` Commit *Commit `json:"commit"`
Name string `json:"name"` Name string `json:"name"`
...@@ -46,7 +46,7 @@ func (b Branch) String() string { ...@@ -46,7 +46,7 @@ func (b Branch) String() string {
// name alphabetically. // name alphabetically.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#list-repository-branches // https://docs.gitlab.com/ce/api/branches.html#list-repository-branches
func (s *BranchesService) ListBranches(pid interface{}) ([]*Branch, *Response, error) { func (s *BranchesService) ListBranches(pid interface{}) ([]*Branch, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -71,7 +71,7 @@ func (s *BranchesService) ListBranches(pid interface{}) ([]*Branch, *Response, e ...@@ -71,7 +71,7 @@ func (s *BranchesService) ListBranches(pid interface{}) ([]*Branch, *Response, e
// GetBranch gets a single project repository branch. // GetBranch gets a single project repository branch.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#get-single-repository-branch // https://docs.gitlab.com/ce/api/branches.html#get-single-repository-branch
func (s *BranchesService) GetBranch(pid interface{}, branch string) (*Branch, *Response, error) { func (s *BranchesService) GetBranch(pid interface{}, branch string) (*Branch, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -98,7 +98,7 @@ func (s *BranchesService) GetBranch(pid interface{}, branch string) (*Branch, *R ...@@ -98,7 +98,7 @@ func (s *BranchesService) GetBranch(pid interface{}, branch string) (*Branch, *R
// still returns a 200 OK status code. // still returns a 200 OK status code.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#protect-repository-branch // https://docs.gitlab.com/ce/api/branches.html#protect-repository-branch
func (s *BranchesService) ProtectBranch(pid interface{}, branch string) (*Branch, *Response, error) { func (s *BranchesService) ProtectBranch(pid interface{}, branch string) (*Branch, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -125,7 +125,7 @@ func (s *BranchesService) ProtectBranch(pid interface{}, branch string) (*Branch ...@@ -125,7 +125,7 @@ func (s *BranchesService) ProtectBranch(pid interface{}, branch string) (*Branch
// still returns a 200 OK status code. // still returns a 200 OK status code.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#unprotect-repository-branch // https://docs.gitlab.com/ce/api/branches.html#unprotect-repository-branch
func (s *BranchesService) UnprotectBranch( func (s *BranchesService) UnprotectBranch(
pid interface{}, pid interface{},
branch string) (*Branch, *Response, error) { branch string) (*Branch, *Response, error) {
...@@ -152,7 +152,7 @@ func (s *BranchesService) UnprotectBranch( ...@@ -152,7 +152,7 @@ func (s *BranchesService) UnprotectBranch(
// CreateBranchOptions represents the available CreateBranch() options. // CreateBranchOptions represents the available CreateBranch() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#create-repository-branch // https://docs.gitlab.com/ce/api/branches.html#create-repository-branch
type CreateBranchOptions struct { type CreateBranchOptions struct {
BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"` BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"`
Ref *string `url:"ref,omitempty" json:"ref,omitempty"` Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
...@@ -161,7 +161,7 @@ type CreateBranchOptions struct { ...@@ -161,7 +161,7 @@ type CreateBranchOptions struct {
// CreateBranch creates branch from commit SHA or existing branch. // CreateBranch creates branch from commit SHA or existing branch.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#create-repository-branch // https://docs.gitlab.com/ce/api/branches.html#create-repository-branch
func (s *BranchesService) CreateBranch( func (s *BranchesService) CreateBranch(
pid interface{}, pid interface{},
opt *CreateBranchOptions) (*Branch, *Response, error) { opt *CreateBranchOptions) (*Branch, *Response, error) {
...@@ -188,7 +188,7 @@ func (s *BranchesService) CreateBranch( ...@@ -188,7 +188,7 @@ func (s *BranchesService) CreateBranch(
// DeleteBranch deletes an existing branch. // DeleteBranch deletes an existing branch.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#delete-repository-branch // https://docs.gitlab.com/ce/api/branches.html#delete-repository-branch
func (s *BranchesService) DeleteBranch(pid interface{}, branch string) (*Response, error) { func (s *BranchesService) DeleteBranch(pid interface{}, branch string) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -33,14 +33,14 @@ type ListBuildsOptions struct { ...@@ -33,14 +33,14 @@ type ListBuildsOptions struct {
// BuildsService handles communication with the ci builds related methods // BuildsService handles communication with the ci builds related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: http://docs.gitlab.com/ce/api/builds.html // GitLab API docs: https://docs.gitlab.com/ce/api/builds.html
type BuildsService struct { type BuildsService struct {
client *Client client *Client
} }
// Build represents a ci build. // Build represents a ci build.
// //
// GitLab API docs: http://docs.gitlab.com/ce/api/builds.html // GitLab API docs: https://docs.gitlab.com/ce/api/builds.html
type Build struct { type Build struct {
Commit *Commit `json:"commit"` Commit *Commit `json:"commit"`
CreatedAt *time.Time `json:"created_at"` CreatedAt *time.Time `json:"created_at"`
...@@ -72,7 +72,7 @@ type Build struct { ...@@ -72,7 +72,7 @@ type Build struct {
// failed, success, canceled; showing all builds if none provided. // failed, success, canceled; showing all builds if none provided.
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#list-project-builds // https://docs.gitlab.com/ce/api/builds.html#list-project-builds
func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptions) ([]Build, *Response, error) { func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptions) ([]Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -98,7 +98,7 @@ func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptio ...@@ -98,7 +98,7 @@ func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptio
// project. If the commit SHA is not found, it will respond with 404. // project. If the commit SHA is not found, it will respond with 404.
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#list-commit-builds // https://docs.gitlab.com/ce/api/builds.html#list-commit-builds
func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *ListBuildsOptions) ([]Build, *Response, error) { func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *ListBuildsOptions) ([]Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -123,7 +123,7 @@ func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *List ...@@ -123,7 +123,7 @@ func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *List
// GetSingleBuild gets a single build of a project. // GetSingleBuild gets a single build of a project.
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#get-a-single-build // https://docs.gitlab.com/ce/api/builds.html#get-a-single-build
func (s *BuildsService) GetSingleBuild(pid interface{}, buildID int) (*Build, *Response, error) { func (s *BuildsService) GetSingleBuild(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -148,7 +148,7 @@ func (s *BuildsService) GetSingleBuild(pid interface{}, buildID int) (*Build, *R ...@@ -148,7 +148,7 @@ func (s *BuildsService) GetSingleBuild(pid interface{}, buildID int) (*Build, *R
// GetBuildArtifacts get builds artifacts of a project // GetBuildArtifacts get builds artifacts of a project
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#get-build-artifacts // https://docs.gitlab.com/ce/api/builds.html#get-build-artifacts
func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int) (io.Reader, *Response, error) { func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int) (io.Reader, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -174,7 +174,7 @@ func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int) (io.Read ...@@ -174,7 +174,7 @@ func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int) (io.Read
// reference name and job provided the build finished successfully. // reference name and job provided the build finished successfully.
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#download-the-artifacts-file // https://docs.gitlab.com/ce/api/builds.html#download-the-artifacts-file
func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, job string) (io.Reader, *Response, error) { func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, job string) (io.Reader, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -199,7 +199,7 @@ func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, j ...@@ -199,7 +199,7 @@ func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, j
// GetTraceFile gets a trace of a specific build of a project // GetTraceFile gets a trace of a specific build of a project
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#get-a-trace-file // https://docs.gitlab.com/ce/api/builds.html#get-a-trace-file
func (s *BuildsService) GetTraceFile(pid interface{}, buildID int) (io.Reader, *Response, error) { func (s *BuildsService) GetTraceFile(pid interface{}, buildID int) (io.Reader, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -224,7 +224,7 @@ func (s *BuildsService) GetTraceFile(pid interface{}, buildID int) (io.Reader, * ...@@ -224,7 +224,7 @@ func (s *BuildsService) GetTraceFile(pid interface{}, buildID int) (io.Reader, *
// CancelBuild cancels a single build of a project. // CancelBuild cancels a single build of a project.
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#cancel-a-build // https://docs.gitlab.com/ce/api/builds.html#cancel-a-build
func (s *BuildsService) CancelBuild(pid interface{}, buildID int) (*Build, *Response, error) { func (s *BuildsService) CancelBuild(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -249,7 +249,7 @@ func (s *BuildsService) CancelBuild(pid interface{}, buildID int) (*Build, *Resp ...@@ -249,7 +249,7 @@ func (s *BuildsService) CancelBuild(pid interface{}, buildID int) (*Build, *Resp
// RetryBuild retries a single build of a project // RetryBuild retries a single build of a project
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#retry-a-build // https://docs.gitlab.com/ce/api/builds.html#retry-a-build
func (s *BuildsService) RetryBuild(pid interface{}, buildID int) (*Build, *Response, error) { func (s *BuildsService) RetryBuild(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -275,7 +275,7 @@ func (s *BuildsService) RetryBuild(pid interface{}, buildID int) (*Build, *Respo ...@@ -275,7 +275,7 @@ func (s *BuildsService) RetryBuild(pid interface{}, buildID int) (*Build, *Respo
// artifacts and a build trace. // artifacts and a build trace.
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#erase-a-build // https://docs.gitlab.com/ce/api/builds.html#erase-a-build
func (s *BuildsService) EraseBuild(pid interface{}, buildID int) (*Build, *Response, error) { func (s *BuildsService) EraseBuild(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -301,7 +301,7 @@ func (s *BuildsService) EraseBuild(pid interface{}, buildID int) (*Build, *Respo ...@@ -301,7 +301,7 @@ func (s *BuildsService) EraseBuild(pid interface{}, buildID int) (*Build, *Respo
// expiration is set. // expiration is set.
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#keep-artifacts // https://docs.gitlab.com/ce/api/builds.html#keep-artifacts
func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int) (*Build, *Response, error) { func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -326,7 +326,7 @@ func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int) (*Build, *Re ...@@ -326,7 +326,7 @@ func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int) (*Build, *Re
// PlayBuild triggers a nanual action to start a build. // PlayBuild triggers a nanual action to start a build.
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#play-a-build // https://docs.gitlab.com/ce/api/builds.html#play-a-build
func (s *BuildsService) PlayBuild(pid interface{}, buildID int) (*Build, *Response, error) { func (s *BuildsService) PlayBuild(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -25,14 +25,14 @@ import ( ...@@ -25,14 +25,14 @@ import (
// CommitsService handles communication with the commit related methods // CommitsService handles communication with the commit related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html // GitLab API docs: https://docs.gitlab.com/ce/api/commits.html
type CommitsService struct { type CommitsService struct {
client *Client client *Client
} }
// Commit represents a GitLab commit. // Commit represents a GitLab commit.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html // GitLab API docs: https://docs.gitlab.com/ce/api/commits.html
type Commit struct { type Commit struct {
ID string `json:"id"` ID string `json:"id"`
ShortID string `json:"short_id"` ShortID string `json:"short_id"`
...@@ -62,7 +62,7 @@ type ListCommitsOptions struct { ...@@ -62,7 +62,7 @@ type ListCommitsOptions struct {
// ListCommits gets a list of repository commits in a project. // ListCommits gets a list of repository commits in a project.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#list-commits // GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#list-commits
func (s *CommitsService) ListCommits( func (s *CommitsService) ListCommits(
pid interface{}, pid interface{},
opt *ListCommitsOptions) ([]*Commit, *Response, error) { opt *ListCommitsOptions) ([]*Commit, *Response, error) {
...@@ -89,7 +89,7 @@ func (s *CommitsService) ListCommits( ...@@ -89,7 +89,7 @@ func (s *CommitsService) ListCommits(
// GetCommit gets a specific commit identified by the commit hash or name of a // GetCommit gets a specific commit identified by the commit hash or name of a
// branch or tag. // branch or tag.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#get-a-single-commit // GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-a-single-commit
func (s *CommitsService) GetCommit( func (s *CommitsService) GetCommit(
pid interface{}, pid interface{},
sha string) (*Commit, *Response, error) { sha string) (*Commit, *Response, error) {
...@@ -115,7 +115,7 @@ func (s *CommitsService) GetCommit( ...@@ -115,7 +115,7 @@ func (s *CommitsService) GetCommit(
// Diff represents a GitLab diff. // Diff represents a GitLab diff.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html // GitLab API docs: https://docs.gitlab.com/ce/api/commits.html
type Diff struct { type Diff struct {
Diff string `json:"diff"` Diff string `json:"diff"`
NewPath string `json:"new_path"` NewPath string `json:"new_path"`
...@@ -134,7 +134,7 @@ func (d Diff) String() string { ...@@ -134,7 +134,7 @@ func (d Diff) String() string {
// GetCommitDiff gets the diff of a commit in a project.. // GetCommitDiff gets the diff of a commit in a project..
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#get-the-diff-of-a-commit // https://docs.gitlab.com/ce/api/commits.html#get-the-diff-of-a-commit
func (s *CommitsService) GetCommitDiff( func (s *CommitsService) GetCommitDiff(
pid interface{}, pid interface{},
sha string) ([]*Diff, *Response, error) { sha string) ([]*Diff, *Response, error) {
...@@ -160,7 +160,7 @@ func (s *CommitsService) GetCommitDiff( ...@@ -160,7 +160,7 @@ func (s *CommitsService) GetCommitDiff(
// CommitComment represents a GitLab commit comment. // CommitComment represents a GitLab commit comment.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html // GitLab API docs: https://docs.gitlab.com/ce/api/commits.html
type CommitComment struct { type CommitComment struct {
Note string `json:"note"` Note string `json:"note"`
Path string `json:"path"` Path string `json:"path"`
...@@ -186,7 +186,7 @@ func (c CommitComment) String() string { ...@@ -186,7 +186,7 @@ func (c CommitComment) String() string {
// GetCommitComments gets the comments of a commit in a project. // GetCommitComments gets the comments of a commit in a project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#get-the-comments-of-a-commit // https://docs.gitlab.com/ce/api/commits.html#get-the-comments-of-a-commit
func (s *CommitsService) GetCommitComments( func (s *CommitsService) GetCommitComments(
pid interface{}, pid interface{},
sha string) ([]*CommitComment, *Response, error) { sha string) ([]*CommitComment, *Response, error) {
...@@ -214,7 +214,7 @@ func (s *CommitsService) GetCommitComments( ...@@ -214,7 +214,7 @@ func (s *CommitsService) GetCommitComments(
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#post-comment-to-commit // https://docs.gitlab.com/ce/api/commits.html#post-comment-to-commit
type PostCommitCommentOptions struct { type PostCommitCommentOptions struct {
Note *string `url:"note,omitempty" json:"note,omitempty"` Note *string `url:"note,omitempty" json:"note,omitempty"`
Path *string `url:"path" json:"path"` Path *string `url:"path" json:"path"`
...@@ -227,7 +227,7 @@ type PostCommitCommentOptions struct { ...@@ -227,7 +227,7 @@ type PostCommitCommentOptions struct {
// line_old are required. // line_old are required.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#post-comment-to-commit // https://docs.gitlab.com/ce/api/commits.html#post-comment-to-commit
func (s *CommitsService) PostCommitComment( func (s *CommitsService) PostCommitComment(
pid interface{}, pid interface{},
sha string, sha string,
...@@ -254,7 +254,7 @@ func (s *CommitsService) PostCommitComment( ...@@ -254,7 +254,7 @@ func (s *CommitsService) PostCommitComment(
// GetCommitStatusesOptions represents the available GetCommitStatuses() options. // GetCommitStatusesOptions represents the available GetCommitStatuses() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit // GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit
type GetCommitStatusesOptions struct { type GetCommitStatusesOptions struct {
Ref *string `url:"ref,omitempty" json:"ref,omitempty"` Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
Stage *string `url:"stage,omitempty" json:"stage,omitempty"` Stage *string `url:"stage,omitempty" json:"stage,omitempty"`
...@@ -264,7 +264,7 @@ type GetCommitStatusesOptions struct { ...@@ -264,7 +264,7 @@ type GetCommitStatusesOptions struct {
// CommitStatus represents a GitLab commit status. // CommitStatus represents a GitLab commit status.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit // GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit
type CommitStatus struct { type CommitStatus struct {
ID int `json:"id"` ID int `json:"id"`
SHA string `json:"sha"` SHA string `json:"sha"`
...@@ -281,7 +281,7 @@ type CommitStatus struct { ...@@ -281,7 +281,7 @@ type CommitStatus struct {
// GetCommitStatuses gets the statuses of a commit in a project. // GetCommitStatuses gets the statuses of a commit in a project.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit // GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit
func (s *CommitsService) GetCommitStatuses( func (s *CommitsService) GetCommitStatuses(
pid interface{}, pid interface{},
sha string, sha string,
...@@ -308,7 +308,7 @@ func (s *CommitsService) GetCommitStatuses( ...@@ -308,7 +308,7 @@ func (s *CommitsService) GetCommitStatuses(
// SetCommitStatusOptions represents the available SetCommitStatus() options. // SetCommitStatusOptions represents the available SetCommitStatus() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#post-the-status-to-commit // GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#post-the-status-to-commit
type SetCommitStatusOptions struct { type SetCommitStatusOptions struct {
State BuildState `url:"state" json:"state"` State BuildState `url:"state" json:"state"`
Ref *string `url:"ref,omitempty" json:"ref,omitempty"` Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
...@@ -330,7 +330,7 @@ const ( ...@@ -330,7 +330,7 @@ const (
// SetCommitStatus sets the status of a commit in a project. // SetCommitStatus sets the status of a commit in a project.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#post-the-status-to-commit // GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#post-the-status-to-commit
func (s *CommitsService) SetCommitStatus( func (s *CommitsService) SetCommitStatus(
pid interface{}, pid interface{},
sha string, sha string,
......
...@@ -25,7 +25,7 @@ import ( ...@@ -25,7 +25,7 @@ import (
// DeployKeysService handles communication with the keys related methods // DeployKeysService handles communication with the keys related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/deploy_keys.html // GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html
type DeployKeysService struct { type DeployKeysService struct {
client *Client client *Client
} }
...@@ -45,7 +45,7 @@ func (k DeployKey) String() string { ...@@ -45,7 +45,7 @@ func (k DeployKey) String() string {
// ListDeployKeys gets a list of a project's deploy keys // ListDeployKeys gets a list of a project's deploy keys
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/deploy_keys.html#list-deploy-keys // https://docs.gitlab.com/ce/api/deploy_keys.html#list-deploy-keys
func (s *DeployKeysService) ListDeployKeys(pid interface{}) ([]*DeployKey, *Response, error) { func (s *DeployKeysService) ListDeployKeys(pid interface{}) ([]*DeployKey, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -70,7 +70,7 @@ func (s *DeployKeysService) ListDeployKeys(pid interface{}) ([]*DeployKey, *Resp ...@@ -70,7 +70,7 @@ func (s *DeployKeysService) ListDeployKeys(pid interface{}) ([]*DeployKey, *Resp
// GetDeployKey gets a single deploy key. // GetDeployKey gets a single deploy key.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/deploy_keys.html#single-deploy-key // https://docs.gitlab.com/ce/api/deploy_keys.html#single-deploy-key
func (s *DeployKeysService) GetDeployKey( func (s *DeployKeysService) GetDeployKey(
pid interface{}, pid interface{},
deployKey int) (*DeployKey, *Response, error) { deployKey int) (*DeployKey, *Response, error) {
...@@ -97,7 +97,7 @@ func (s *DeployKeysService) GetDeployKey( ...@@ -97,7 +97,7 @@ func (s *DeployKeysService) GetDeployKey(
// AddDeployKeyOptions represents the available ADDDeployKey() options. // AddDeployKeyOptions represents the available ADDDeployKey() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/deploy_keys.html#add-deploy-key // https://docs.gitlab.com/ce/api/deploy_keys.html#add-deploy-key
type AddDeployKeyOptions struct { type AddDeployKeyOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Key *string `url:"key,omitempty" json:"key,omitempty"` Key *string `url:"key,omitempty" json:"key,omitempty"`
...@@ -108,7 +108,7 @@ type AddDeployKeyOptions struct { ...@@ -108,7 +108,7 @@ type AddDeployKeyOptions struct {
// original one was is accessible by same user. // original one was is accessible by same user.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/deploy_keys.html#add-deploy-key // https://docs.gitlab.com/ce/api/deploy_keys.html#add-deploy-key
func (s *DeployKeysService) AddDeployKey( func (s *DeployKeysService) AddDeployKey(
pid interface{}, pid interface{},
opt *AddDeployKeyOptions) (*DeployKey, *Response, error) { opt *AddDeployKeyOptions) (*DeployKey, *Response, error) {
...@@ -135,7 +135,7 @@ func (s *DeployKeysService) AddDeployKey( ...@@ -135,7 +135,7 @@ func (s *DeployKeysService) AddDeployKey(
// DeleteDeployKey deletes a deploy key from a project. // DeleteDeployKey deletes a deploy key from a project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/deploy_keys.html#delete-deploy-key // https://docs.gitlab.com/ce/api/deploy_keys.html#delete-deploy-key
func (s *DeployKeysService) DeleteDeployKey(pid interface{}, deployKey int) (*Response, error) { func (s *DeployKeysService) DeleteDeployKey(pid interface{}, deployKey int) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -38,12 +38,12 @@ const ( ...@@ -38,12 +38,12 @@ const (
// tokenType represents a token type within GitLab. // tokenType represents a token type within GitLab.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/ // GitLab API docs: https://docs.gitlab.com/ce/api/
type tokenType int type tokenType int
// List of available token type // List of available token type
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/ // GitLab API docs: https://docs.gitlab.com/ce/api/
const ( const (
privateToken tokenType = iota privateToken tokenType = iota
oAuthToken oAuthToken
...@@ -51,12 +51,12 @@ const ( ...@@ -51,12 +51,12 @@ const (
// AccessLevelValue represents a permission level within GitLab. // AccessLevelValue represents a permission level within GitLab.
// //
// GitLab API docs: http://doc.gitlab.com/ce/permissions/permissions.html // GitLab API docs: https://docs.gitlab.com/ce/permissions/permissions.html
type AccessLevelValue int type AccessLevelValue int
// List of available access levels // List of available access levels
// //
// GitLab API docs: http://doc.gitlab.com/ce/permissions/permissions.html // GitLab API docs: https://docs.gitlab.com/ce/permissions/permissions.html
const ( const (
GuestPermissions AccessLevelValue = 10 GuestPermissions AccessLevelValue = 10
ReporterPermissions AccessLevelValue = 20 ReporterPermissions AccessLevelValue = 20
...@@ -67,12 +67,12 @@ const ( ...@@ -67,12 +67,12 @@ const (
// NotificationLevelValue represents a notification level within Gitlab. // NotificationLevelValue represents a notification level within Gitlab.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/ // GitLab API docs: https://docs.gitlab.com/ce/api/
type NotificationLevelValue int type NotificationLevelValue int
// List of available notification levels // List of available notification levels
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/ // GitLab API docs: https://docs.gitlab.com/ce/api/
const ( const (
DisabledNotifications NotificationLevelValue = iota DisabledNotifications NotificationLevelValue = iota
ParticipatingNotifications ParticipatingNotifications
...@@ -83,12 +83,12 @@ const ( ...@@ -83,12 +83,12 @@ const (
// VisibilityLevelValue represents a visibility level within GitLab. // VisibilityLevelValue represents a visibility level within GitLab.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/ // GitLab API docs: https://docs.gitlab.com/ce/api/
type VisibilityLevelValue int type VisibilityLevelValue int
// List of available visibility levels // List of available visibility levels
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/ // GitLab API docs: https://docs.gitlab.com/ce/api/
const ( const (
PrivateVisibility VisibilityLevelValue = 0 PrivateVisibility VisibilityLevelValue = 0
InternalVisibility VisibilityLevelValue = 10 InternalVisibility VisibilityLevelValue = 10
...@@ -353,7 +353,6 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) { ...@@ -353,7 +353,6 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
defer resp.Body.Close() defer resp.Body.Close()
response := newResponse(resp) response := newResponse(resp)
...@@ -391,7 +390,7 @@ func parseID(id interface{}) (string, error) { ...@@ -391,7 +390,7 @@ func parseID(id interface{}) (string, error) {
// An ErrorResponse reports one or more errors caused by an API request. // An ErrorResponse reports one or more errors caused by an API request.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/README.html#data-validation-and-error-reporting // https://docs.gitlab.com/ce/api/README.html#data-validation-and-error-reporting
type ErrorResponse struct { type ErrorResponse struct {
Response *http.Response // HTTP response that caused this error Response *http.Response // HTTP response that caused this error
Message string `json:"message"` // error message Message string `json:"message"` // error message
...@@ -419,7 +418,7 @@ func (r *ErrorResponse) Error() string { ...@@ -419,7 +418,7 @@ func (r *ErrorResponse) Error() string {
// another resource has the same valid as this field // another resource has the same valid as this field
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/README.html#data-validation-and-error-reporting // https://docs.gitlab.com/ce/api/README.html#data-validation-and-error-reporting
type Error struct { type Error struct {
Resource string `json:"resource"` // resource on which the error occurred Resource string `json:"resource"` // resource on which the error occurred
Field string `json:"field"` // field on which the error occurred Field string `json:"field"` // field on which the error occurred
......
...@@ -24,14 +24,14 @@ import ( ...@@ -24,14 +24,14 @@ import (
// GroupsService handles communication with the group related methods of // GroupsService handles communication with the group related methods of
// the GitLab API. // the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html // GitLab API docs: https://docs.gitlab.com/ce/api/groups.html
type GroupsService struct { type GroupsService struct {
client *Client client *Client
} }
// Group represents a GitLab group. // Group represents a GitLab group.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html // GitLab API docs: https://docs.gitlab.com/ce/api/groups.html
type Group struct { type Group struct {
ID int `json:"id"` ID int `json:"id"`
Name string `json:"name"` Name string `json:"name"`
...@@ -42,7 +42,7 @@ type Group struct { ...@@ -42,7 +42,7 @@ type Group struct {
// ListGroupsOptions represents the available ListGroups() options. // ListGroupsOptions represents the available ListGroups() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#list-project-groups // GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-project-groups
type ListGroupsOptions struct { type ListGroupsOptions struct {
ListOptions ListOptions
Search *string `url:"search,omitempty" json:"search,omitempty"` Search *string `url:"search,omitempty" json:"search,omitempty"`
...@@ -51,7 +51,7 @@ type ListGroupsOptions struct { ...@@ -51,7 +51,7 @@ type ListGroupsOptions struct {
// ListGroups gets a list of groups. (As user: my groups, as admin: all groups) // ListGroups gets a list of groups. (As user: my groups, as admin: all groups)
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#list-project-groups // https://docs.gitlab.com/ce/api/groups.html#list-project-groups
func (s *GroupsService) ListGroups(opt *ListGroupsOptions) ([]*Group, *Response, error) { func (s *GroupsService) ListGroups(opt *ListGroupsOptions) ([]*Group, *Response, error) {
req, err := s.client.NewRequest("GET", "groups", opt) req, err := s.client.NewRequest("GET", "groups", opt)
if err != nil { if err != nil {
...@@ -69,7 +69,7 @@ func (s *GroupsService) ListGroups(opt *ListGroupsOptions) ([]*Group, *Response, ...@@ -69,7 +69,7 @@ func (s *GroupsService) ListGroups(opt *ListGroupsOptions) ([]*Group, *Response,
// GetGroup gets all details of a group. // GetGroup gets all details of a group.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#details-of-a-group // GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#details-of-a-group
func (s *GroupsService) GetGroup(gid interface{}) (*Group, *Response, error) { func (s *GroupsService) GetGroup(gid interface{}) (*Group, *Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -93,7 +93,7 @@ func (s *GroupsService) GetGroup(gid interface{}) (*Group, *Response, error) { ...@@ -93,7 +93,7 @@ func (s *GroupsService) GetGroup(gid interface{}) (*Group, *Response, error) {
// CreateGroupOptions represents the available CreateGroup() options. // CreateGroupOptions represents the available CreateGroup() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#new-group // GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#new-group
type CreateGroupOptions struct { type CreateGroupOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
Path *string `url:"path,omitempty" json:"path,omitempty"` Path *string `url:"path,omitempty" json:"path,omitempty"`
...@@ -104,7 +104,7 @@ type CreateGroupOptions struct { ...@@ -104,7 +104,7 @@ type CreateGroupOptions struct {
// CreateGroup creates a new project group. Available only for users who can // CreateGroup creates a new project group. Available only for users who can
// create groups. // create groups.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#new-group // GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#new-group
func (s *GroupsService) CreateGroup(opt *CreateGroupOptions) (*Group, *Response, error) { func (s *GroupsService) CreateGroup(opt *CreateGroupOptions) (*Group, *Response, error) {
req, err := s.client.NewRequest("POST", "groups", opt) req, err := s.client.NewRequest("POST", "groups", opt)
if err != nil { if err != nil {
...@@ -124,7 +124,7 @@ func (s *GroupsService) CreateGroup(opt *CreateGroupOptions) (*Group, *Response, ...@@ -124,7 +124,7 @@ func (s *GroupsService) CreateGroup(opt *CreateGroupOptions) (*Group, *Response,
// for admin. // for admin.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#transfer-project-to-group // https://docs.gitlab.com/ce/api/groups.html#transfer-project-to-group
func (s *GroupsService) TransferGroup(gid interface{}, project int) (*Group, *Response, error) { func (s *GroupsService) TransferGroup(gid interface{}, project int) (*Group, *Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -148,7 +148,7 @@ func (s *GroupsService) TransferGroup(gid interface{}, project int) (*Group, *Re ...@@ -148,7 +148,7 @@ func (s *GroupsService) TransferGroup(gid interface{}, project int) (*Group, *Re
// DeleteGroup removes group with all projects inside. // DeleteGroup removes group with all projects inside.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#remove-group // GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#remove-group
func (s *GroupsService) DeleteGroup(gid interface{}) (*Response, error) { func (s *GroupsService) DeleteGroup(gid interface{}) (*Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -166,7 +166,7 @@ func (s *GroupsService) DeleteGroup(gid interface{}) (*Response, error) { ...@@ -166,7 +166,7 @@ func (s *GroupsService) DeleteGroup(gid interface{}) (*Response, error) {
// SearchGroup get all groups that match your string in their name or path. // SearchGroup get all groups that match your string in their name or path.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#search-for-group // GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#search-for-group
func (s *GroupsService) SearchGroup(query string) ([]*Group, *Response, error) { func (s *GroupsService) SearchGroup(query string) ([]*Group, *Response, error) {
var q struct { var q struct {
Search string `url:"search,omitempty" json:"search,omitempty"` Search string `url:"search,omitempty" json:"search,omitempty"`
...@@ -189,7 +189,7 @@ func (s *GroupsService) SearchGroup(query string) ([]*Group, *Response, error) { ...@@ -189,7 +189,7 @@ func (s *GroupsService) SearchGroup(query string) ([]*Group, *Response, error) {
// GroupMember represents a GitLab group member. // GroupMember represents a GitLab group member.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html // GitLab API docs: https://docs.gitlab.com/ce/api/groups.html
type GroupMember struct { type GroupMember struct {
ID int `json:"id"` ID int `json:"id"`
Username string `json:"username"` Username string `json:"username"`
...@@ -204,7 +204,7 @@ type GroupMember struct { ...@@ -204,7 +204,7 @@ type GroupMember struct {
// user. // user.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#list-group-members // https://docs.gitlab.com/ce/api/groups.html#list-group-members
func (s *GroupsService) ListGroupMembers(gid interface{}) ([]*GroupMember, *Response, error) { func (s *GroupsService) ListGroupMembers(gid interface{}) ([]*GroupMember, *Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -228,7 +228,7 @@ func (s *GroupsService) ListGroupMembers(gid interface{}) ([]*GroupMember, *Resp ...@@ -228,7 +228,7 @@ func (s *GroupsService) ListGroupMembers(gid interface{}) ([]*GroupMember, *Resp
// AddGroupMemberOptions represents the available AddGroupMember() options. // AddGroupMemberOptions represents the available AddGroupMember() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#add-group-member // GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#add-group-member
type AddGroupMemberOptions struct { type AddGroupMemberOptions struct {
UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"` UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"`
AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
...@@ -237,7 +237,7 @@ type AddGroupMemberOptions struct { ...@@ -237,7 +237,7 @@ type AddGroupMemberOptions struct {
// AddGroupMember adds a user to the list of group members. // AddGroupMember adds a user to the list of group members.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#list-group-members // https://docs.gitlab.com/ce/api/groups.html#list-group-members
func (s *GroupsService) AddGroupMember( func (s *GroupsService) AddGroupMember(
gid interface{}, gid interface{},
opt *AddGroupMemberOptions) (*GroupMember, *Response, error) { opt *AddGroupMemberOptions) (*GroupMember, *Response, error) {
...@@ -265,7 +265,7 @@ func (s *GroupsService) AddGroupMember( ...@@ -265,7 +265,7 @@ func (s *GroupsService) AddGroupMember(
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#edit-group-team-member // https://docs.gitlab.com/ce/api/groups.html#edit-group-team-member
type UpdateGroupMemberOptions struct { type UpdateGroupMemberOptions struct {
AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
} }
...@@ -273,7 +273,7 @@ type UpdateGroupMemberOptions struct { ...@@ -273,7 +273,7 @@ type UpdateGroupMemberOptions struct {
// UpdateGroupMember updates a group team member to a specified access level. // UpdateGroupMember updates a group team member to a specified access level.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#list-group-members // https://docs.gitlab.com/ce/api/groups.html#list-group-members
func (s *GroupsService) UpdateGroupMember( func (s *GroupsService) UpdateGroupMember(
gid interface{}, gid interface{},
user int, user int,
...@@ -301,7 +301,7 @@ func (s *GroupsService) UpdateGroupMember( ...@@ -301,7 +301,7 @@ func (s *GroupsService) UpdateGroupMember(
// RemoveGroupMember removes user from user team. // RemoveGroupMember removes user from user team.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#remove-user-from-user-team // https://docs.gitlab.com/ce/api/groups.html#remove-user-from-user-team
func (s *GroupsService) RemoveGroupMember(gid interface{}, user int) (*Response, error) { func (s *GroupsService) RemoveGroupMember(gid interface{}, user int) (*Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
......
...@@ -27,14 +27,14 @@ import ( ...@@ -27,14 +27,14 @@ import (
// IssuesService handles communication with the issue related methods // IssuesService handles communication with the issue related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html
type IssuesService struct { type IssuesService struct {
client *Client client *Client
} }
// Issue represents a GitLab issue. // Issue represents a GitLab issue.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html
type Issue struct { type Issue struct {
ID int `json:"id"` ID int `json:"id"`
IID int `json:"iid"` IID int `json:"iid"`
...@@ -83,7 +83,7 @@ func (l *Labels) MarshalJSON() ([]byte, error) { ...@@ -83,7 +83,7 @@ func (l *Labels) MarshalJSON() ([]byte, error) {
// ListIssuesOptions represents the available ListIssues() options. // ListIssuesOptions represents the available ListIssues() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#list-issues // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues
type ListIssuesOptions struct { type ListIssuesOptions struct {
ListOptions ListOptions
State *string `url:"state,omitempty" json:"state,omitempty"` State *string `url:"state,omitempty" json:"state,omitempty"`
...@@ -95,7 +95,7 @@ type ListIssuesOptions struct { ...@@ -95,7 +95,7 @@ type ListIssuesOptions struct {
// ListIssues gets all issues created by authenticated user. This function // ListIssues gets all issues created by authenticated user. This function
// takes pagination parameters page and per_page to restrict the list of issues. // takes pagination parameters page and per_page to restrict the list of issues.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#list-issues // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues
func (s *IssuesService) ListIssues(opt *ListIssuesOptions) ([]*Issue, *Response, error) { func (s *IssuesService) ListIssues(opt *ListIssuesOptions) ([]*Issue, *Response, error) {
req, err := s.client.NewRequest("GET", "issues", opt) req, err := s.client.NewRequest("GET", "issues", opt)
if err != nil { if err != nil {
...@@ -113,7 +113,7 @@ func (s *IssuesService) ListIssues(opt *ListIssuesOptions) ([]*Issue, *Response, ...@@ -113,7 +113,7 @@ func (s *IssuesService) ListIssues(opt *ListIssuesOptions) ([]*Issue, *Response,
// ListProjectIssuesOptions represents the available ListProjectIssues() options. // ListProjectIssuesOptions represents the available ListProjectIssues() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#list-issues // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues
type ListProjectIssuesOptions struct { type ListProjectIssuesOptions struct {
ListOptions ListOptions
IID *int `url:"iid,omitempty" json:"iid,omitempty"` IID *int `url:"iid,omitempty" json:"iid,omitempty"`
...@@ -127,7 +127,7 @@ type ListProjectIssuesOptions struct { ...@@ -127,7 +127,7 @@ type ListProjectIssuesOptions struct {
// ListProjectIssues gets a list of project issues. This function accepts // ListProjectIssues gets a list of project issues. This function accepts
// pagination parameters page and per_page to return the list of project issues. // pagination parameters page and per_page to return the list of project issues.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#list-project-issues // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-project-issues
func (s *IssuesService) ListProjectIssues( func (s *IssuesService) ListProjectIssues(
pid interface{}, pid interface{},
opt *ListProjectIssuesOptions) ([]*Issue, *Response, error) { opt *ListProjectIssuesOptions) ([]*Issue, *Response, error) {
...@@ -153,7 +153,7 @@ func (s *IssuesService) ListProjectIssues( ...@@ -153,7 +153,7 @@ func (s *IssuesService) ListProjectIssues(
// GetIssue gets a single project issue. // GetIssue gets a single project issue.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#single-issues // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#single-issues
func (s *IssuesService) GetIssue(pid interface{}, issue int) (*Issue, *Response, error) { func (s *IssuesService) GetIssue(pid interface{}, issue int) (*Issue, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -177,7 +177,7 @@ func (s *IssuesService) GetIssue(pid interface{}, issue int) (*Issue, *Response, ...@@ -177,7 +177,7 @@ func (s *IssuesService) GetIssue(pid interface{}, issue int) (*Issue, *Response,
// CreateIssueOptions represents the available CreateIssue() options. // CreateIssueOptions represents the available CreateIssue() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#new-issues // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#new-issues
type CreateIssueOptions struct { type CreateIssueOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -188,7 +188,7 @@ type CreateIssueOptions struct { ...@@ -188,7 +188,7 @@ type CreateIssueOptions struct {
// CreateIssue creates a new project issue. // CreateIssue creates a new project issue.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#new-issues // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#new-issues
func (s *IssuesService) CreateIssue( func (s *IssuesService) CreateIssue(
pid interface{}, pid interface{},
opt *CreateIssueOptions) (*Issue, *Response, error) { opt *CreateIssueOptions) (*Issue, *Response, error) {
...@@ -214,7 +214,7 @@ func (s *IssuesService) CreateIssue( ...@@ -214,7 +214,7 @@ func (s *IssuesService) CreateIssue(
// UpdateIssueOptions represents the available UpdateIssue() options. // UpdateIssueOptions represents the available UpdateIssue() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#edit-issues // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#edit-issues
type UpdateIssueOptions struct { type UpdateIssueOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -227,7 +227,7 @@ type UpdateIssueOptions struct { ...@@ -227,7 +227,7 @@ type UpdateIssueOptions struct {
// UpdateIssue updates an existing project issue. This function is also used // UpdateIssue updates an existing project issue. This function is also used
// to mark an issue as closed. // to mark an issue as closed.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#edit-issues // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#edit-issues
func (s *IssuesService) UpdateIssue( func (s *IssuesService) UpdateIssue(
pid interface{}, pid interface{},
issue int, issue int,
...@@ -254,7 +254,7 @@ func (s *IssuesService) UpdateIssue( ...@@ -254,7 +254,7 @@ func (s *IssuesService) UpdateIssue(
// DeleteIssue deletes a single project issue. // DeleteIssue deletes a single project issue.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#delete-an-issue // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#delete-an-issue
func (s *IssuesService) DeleteIssue(pid interface{}, issue int) (*Response, error) { func (s *IssuesService) DeleteIssue(pid interface{}, issue int) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -24,14 +24,14 @@ import ( ...@@ -24,14 +24,14 @@ import (
// LabelsService handles communication with the label related methods // LabelsService handles communication with the label related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html
type LabelsService struct { type LabelsService struct {
client *Client client *Client
} }
// Label represents a GitLab label. // Label represents a GitLab label.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html
type Label struct { type Label struct {
Name string `json:"name"` Name string `json:"name"`
Color string `json:"color"` Color string `json:"color"`
...@@ -47,7 +47,7 @@ func (l Label) String() string { ...@@ -47,7 +47,7 @@ func (l Label) String() string {
// ListLabels gets all labels for given project. // ListLabels gets all labels for given project.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#list-labels // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#list-labels
func (s *LabelsService) ListLabels(pid interface{}) ([]*Label, *Response, error) { func (s *LabelsService) ListLabels(pid interface{}) ([]*Label, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -71,7 +71,7 @@ func (s *LabelsService) ListLabels(pid interface{}) ([]*Label, *Response, error) ...@@ -71,7 +71,7 @@ func (s *LabelsService) ListLabels(pid interface{}) ([]*Label, *Response, error)
// CreateLabelOptions represents the available CreateLabel() options. // CreateLabelOptions represents the available CreateLabel() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#create-a-new-label // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#create-a-new-label
type CreateLabelOptions struct { type CreateLabelOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
Color *string `url:"color,omitempty" json:"color,omitempty"` Color *string `url:"color,omitempty" json:"color,omitempty"`
...@@ -81,7 +81,7 @@ type CreateLabelOptions struct { ...@@ -81,7 +81,7 @@ type CreateLabelOptions struct {
// CreateLabel creates a new label for given repository with given name and // CreateLabel creates a new label for given repository with given name and
// color. // color.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#create-a-new-label // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#create-a-new-label
func (s *LabelsService) CreateLabel( func (s *LabelsService) CreateLabel(
pid interface{}, pid interface{},
opt *CreateLabelOptions) (*Label, *Response, error) { opt *CreateLabelOptions) (*Label, *Response, error) {
...@@ -107,14 +107,14 @@ func (s *LabelsService) CreateLabel( ...@@ -107,14 +107,14 @@ func (s *LabelsService) CreateLabel(
// DeleteLabelOptions represents the available DeleteLabel() options. // DeleteLabelOptions represents the available DeleteLabel() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#delete-a-label // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label
type DeleteLabelOptions struct { type DeleteLabelOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
} }
// DeleteLabel deletes a label given by its name. // DeleteLabel deletes a label given by its name.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#delete-a-label // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label
func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions) (*Response, error) { func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -132,7 +132,7 @@ func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions) (* ...@@ -132,7 +132,7 @@ func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions) (*
// UpdateLabelOptions represents the available UpdateLabel() options. // UpdateLabelOptions represents the available UpdateLabel() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#delete-a-label // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label
type UpdateLabelOptions struct { type UpdateLabelOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
NewName *string `url:"new_name,omitempty" json:"new_name,omitempty"` NewName *string `url:"new_name,omitempty" json:"new_name,omitempty"`
...@@ -143,7 +143,7 @@ type UpdateLabelOptions struct { ...@@ -143,7 +143,7 @@ type UpdateLabelOptions struct {
// UpdateLabel updates an existing label with new name or now color. At least // UpdateLabel updates an existing label with new name or now color. At least
// one parameter is required, to update the label. // one parameter is required, to update the label.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#edit-an-existing-label // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#edit-an-existing-label
func (s *LabelsService) UpdateLabel( func (s *LabelsService) UpdateLabel(
pid interface{}, pid interface{},
opt *UpdateLabelOptions) (*Label, *Response, error) { opt *UpdateLabelOptions) (*Label, *Response, error) {
......
...@@ -25,14 +25,14 @@ import ( ...@@ -25,14 +25,14 @@ import (
// MergeRequestsService handles communication with the merge requests related // MergeRequestsService handles communication with the merge requests related
// methods of the GitLab API. // methods of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/merge_requests.html // GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html
type MergeRequestsService struct { type MergeRequestsService struct {
client *Client client *Client
} }
// MergeRequest represents a GitLab merge request. // MergeRequest represents a GitLab merge request.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/merge_requests.html // GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html
type MergeRequest struct { type MergeRequest struct {
ID int `json:"id"` ID int `json:"id"`
IID int `json:"iid"` IID int `json:"iid"`
...@@ -101,7 +101,7 @@ func (m MergeRequest) String() string { ...@@ -101,7 +101,7 @@ func (m MergeRequest) String() string {
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#list-merge-requests // https://docs.gitlab.com/ce/api/merge_requests.html#list-merge-requests
type ListMergeRequestsOptions struct { type ListMergeRequestsOptions struct {
ListOptions ListOptions
IID *int `url:"iid,omitempty" json:"iid,omitempty"` IID *int `url:"iid,omitempty" json:"iid,omitempty"`
...@@ -116,7 +116,7 @@ type ListMergeRequestsOptions struct { ...@@ -116,7 +116,7 @@ type ListMergeRequestsOptions struct {
// per_page can be used to restrict the list of merge requests. // per_page can be used to restrict the list of merge requests.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#list-merge-requests // https://docs.gitlab.com/ce/api/merge_requests.html#list-merge-requests
func (s *MergeRequestsService) ListMergeRequests( func (s *MergeRequestsService) ListMergeRequests(
pid interface{}, pid interface{},
opt *ListMergeRequestsOptions) ([]*MergeRequest, *Response, error) { opt *ListMergeRequestsOptions) ([]*MergeRequest, *Response, error) {
...@@ -143,7 +143,7 @@ func (s *MergeRequestsService) ListMergeRequests( ...@@ -143,7 +143,7 @@ func (s *MergeRequestsService) ListMergeRequests(
// GetMergeRequest shows information about a single merge request. // GetMergeRequest shows information about a single merge request.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#get-single-mr // https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr
func (s *MergeRequestsService) GetMergeRequest( func (s *MergeRequestsService) GetMergeRequest(
pid interface{}, pid interface{},
mergeRequest int) (*MergeRequest, *Response, error) { mergeRequest int) (*MergeRequest, *Response, error) {
...@@ -171,7 +171,7 @@ func (s *MergeRequestsService) GetMergeRequest( ...@@ -171,7 +171,7 @@ func (s *MergeRequestsService) GetMergeRequest(
// its files and changes. // its files and changes.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#get-single-mr-changes // https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-changes
func (s *MergeRequestsService) GetMergeRequestChanges( func (s *MergeRequestsService) GetMergeRequestChanges(
pid interface{}, pid interface{},
mergeRequest int) (*MergeRequest, *Response, error) { mergeRequest int) (*MergeRequest, *Response, error) {
...@@ -199,7 +199,7 @@ func (s *MergeRequestsService) GetMergeRequestChanges( ...@@ -199,7 +199,7 @@ func (s *MergeRequestsService) GetMergeRequestChanges(
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#create-mr // https://docs.gitlab.com/ce/api/merge_requests.html#create-mr
type CreateMergeRequestOptions struct { type CreateMergeRequestOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -212,7 +212,7 @@ type CreateMergeRequestOptions struct { ...@@ -212,7 +212,7 @@ type CreateMergeRequestOptions struct {
// CreateMergeRequest creates a new merge request. // CreateMergeRequest creates a new merge request.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#create-mr // https://docs.gitlab.com/ce/api/merge_requests.html#create-mr
func (s *MergeRequestsService) CreateMergeRequest( func (s *MergeRequestsService) CreateMergeRequest(
pid interface{}, pid interface{},
opt *CreateMergeRequestOptions) (*MergeRequest, *Response, error) { opt *CreateMergeRequestOptions) (*MergeRequest, *Response, error) {
...@@ -240,7 +240,7 @@ func (s *MergeRequestsService) CreateMergeRequest( ...@@ -240,7 +240,7 @@ func (s *MergeRequestsService) CreateMergeRequest(
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#update-mr // https://docs.gitlab.com/ce/api/merge_requests.html#update-mr
type UpdateMergeRequestOptions struct { type UpdateMergeRequestOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -252,7 +252,7 @@ type UpdateMergeRequestOptions struct { ...@@ -252,7 +252,7 @@ type UpdateMergeRequestOptions struct {
// UpdateMergeRequest updates an existing project milestone. // UpdateMergeRequest updates an existing project milestone.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#update-mr // https://docs.gitlab.com/ce/api/merge_requests.html#update-mr
func (s *MergeRequestsService) UpdateMergeRequest( func (s *MergeRequestsService) UpdateMergeRequest(
pid interface{}, pid interface{},
mergeRequest int, mergeRequest int,
...@@ -281,7 +281,7 @@ func (s *MergeRequestsService) UpdateMergeRequest( ...@@ -281,7 +281,7 @@ func (s *MergeRequestsService) UpdateMergeRequest(
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#accept-mr // https://docs.gitlab.com/ce/api/merge_requests.html#accept-mr
type AcceptMergeRequestOptions struct { type AcceptMergeRequestOptions struct {
MergeCommitMessage *string `url:"merge_commit_message,omitempty" json:"merge_commit_message,omitempty"` MergeCommitMessage *string `url:"merge_commit_message,omitempty" json:"merge_commit_message,omitempty"`
ShouldRemoveSourceBranch *bool `url:"should_remove_source_branch,omitempty" json:"should_remove_source_branch,omitempty"` ShouldRemoveSourceBranch *bool `url:"should_remove_source_branch,omitempty" json:"should_remove_source_branch,omitempty"`
...@@ -295,7 +295,7 @@ type AcceptMergeRequestOptions struct { ...@@ -295,7 +295,7 @@ type AcceptMergeRequestOptions struct {
// already merged or closed - you get 405 and error message 'Method Not Allowed' // already merged or closed - you get 405 and error message 'Method Not Allowed'
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#accept-mr // https://docs.gitlab.com/ce/api/merge_requests.html#accept-mr
func (s *MergeRequestsService) AcceptMergeRequest( func (s *MergeRequestsService) AcceptMergeRequest(
pid interface{}, pid interface{},
mergeRequest int, mergeRequest int,
...@@ -322,7 +322,7 @@ func (s *MergeRequestsService) AcceptMergeRequest( ...@@ -322,7 +322,7 @@ func (s *MergeRequestsService) AcceptMergeRequest(
// MergeRequestComment represents a GitLab merge request comment. // MergeRequestComment represents a GitLab merge request comment.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/merge_requests.html // GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html
type MergeRequestComment struct { type MergeRequestComment struct {
Note string `json:"note"` Note string `json:"note"`
Author struct { Author struct {
...@@ -343,7 +343,7 @@ func (m MergeRequestComment) String() string { ...@@ -343,7 +343,7 @@ func (m MergeRequestComment) String() string {
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#get-the-comments-on-a-mr // https://docs.gitlab.com/ce/api/merge_requests.html#get-the-comments-on-a-mr
type GetMergeRequestCommentsOptions struct { type GetMergeRequestCommentsOptions struct {
ListOptions ListOptions
} }
...@@ -352,7 +352,7 @@ type GetMergeRequestCommentsOptions struct { ...@@ -352,7 +352,7 @@ type GetMergeRequestCommentsOptions struct {
// request. // request.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#get-the-comments-on-a-mr // https://docs.gitlab.com/ce/api/merge_requests.html#get-the-comments-on-a-mr
func (s *MergeRequestsService) GetMergeRequestComments( func (s *MergeRequestsService) GetMergeRequestComments(
pid interface{}, pid interface{},
mergeRequest int, mergeRequest int,
...@@ -381,7 +381,7 @@ func (s *MergeRequestsService) GetMergeRequestComments( ...@@ -381,7 +381,7 @@ func (s *MergeRequestsService) GetMergeRequestComments(
// PostMergeRequestComment() options. // PostMergeRequestComment() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#post-comment-to-mr // https://docs.gitlab.com/ce/api/commits.html#post-comment-to-mr
type PostMergeRequestCommentOptions struct { type PostMergeRequestCommentOptions struct {
Note *string `url:"note,omitempty" json:"note,omitempty"` Note *string `url:"note,omitempty" json:"note,omitempty"`
} }
...@@ -389,7 +389,7 @@ type PostMergeRequestCommentOptions struct { ...@@ -389,7 +389,7 @@ type PostMergeRequestCommentOptions struct {
// PostMergeRequestComment dds a comment to a merge request. // PostMergeRequestComment dds a comment to a merge request.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#post-comment-to-mr // https://docs.gitlab.com/ce/api/commits.html#post-comment-to-mr
func (s *MergeRequestsService) PostMergeRequestComment( func (s *MergeRequestsService) PostMergeRequestComment(
pid interface{}, pid interface{},
mergeRequest int, mergeRequest int,
......
...@@ -25,14 +25,14 @@ import ( ...@@ -25,14 +25,14 @@ import (
// MilestonesService handles communication with the milestone related methods // MilestonesService handles communication with the milestone related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/milestones.html // GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html
type MilestonesService struct { type MilestonesService struct {
client *Client client *Client
} }
// Milestone represents a GitLab milestone. // Milestone represents a GitLab milestone.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/milestones.html // GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html
type Milestone struct { type Milestone struct {
ID int `json:"id"` ID int `json:"id"`
Iid int `json:"iid"` Iid int `json:"iid"`
...@@ -53,7 +53,7 @@ func (m Milestone) String() string { ...@@ -53,7 +53,7 @@ func (m Milestone) String() string {
// ListMilestonesOptions represents the available ListMilestones() options. // ListMilestonesOptions represents the available ListMilestones() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#list-project-milestones // https://docs.gitlab.com/ce/api/milestones.html#list-project-milestones
type ListMilestonesOptions struct { type ListMilestonesOptions struct {
ListOptions ListOptions
IID *int `url:"iid,omitempty" json:"iid,omitempty"` IID *int `url:"iid,omitempty" json:"iid,omitempty"`
...@@ -62,7 +62,7 @@ type ListMilestonesOptions struct { ...@@ -62,7 +62,7 @@ type ListMilestonesOptions struct {
// ListMilestones returns a list of project milestones. // ListMilestones returns a list of project milestones.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#list-project-milestones // https://docs.gitlab.com/ce/api/milestones.html#list-project-milestones
func (s *MilestonesService) ListMilestones( func (s *MilestonesService) ListMilestones(
pid interface{}, pid interface{},
opt *ListMilestonesOptions) ([]*Milestone, *Response, error) { opt *ListMilestonesOptions) ([]*Milestone, *Response, error) {
...@@ -89,7 +89,7 @@ func (s *MilestonesService) ListMilestones( ...@@ -89,7 +89,7 @@ func (s *MilestonesService) ListMilestones(
// GetMilestone gets a single project milestone. // GetMilestone gets a single project milestone.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#get-single-milestone // https://docs.gitlab.com/ce/api/milestones.html#get-single-milestone
func (s *MilestonesService) GetMilestone( func (s *MilestonesService) GetMilestone(
pid interface{}, pid interface{},
milestone int) (*Milestone, *Response, error) { milestone int) (*Milestone, *Response, error) {
...@@ -116,7 +116,7 @@ func (s *MilestonesService) GetMilestone( ...@@ -116,7 +116,7 @@ func (s *MilestonesService) GetMilestone(
// CreateMilestoneOptions represents the available CreateMilestone() options. // CreateMilestoneOptions represents the available CreateMilestone() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#create-new-milestone // https://docs.gitlab.com/ce/api/milestones.html#create-new-milestone
type CreateMilestoneOptions struct { type CreateMilestoneOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -127,7 +127,7 @@ type CreateMilestoneOptions struct { ...@@ -127,7 +127,7 @@ type CreateMilestoneOptions struct {
// CreateMilestone creates a new project milestone. // CreateMilestone creates a new project milestone.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#create-new-milestone // https://docs.gitlab.com/ce/api/milestones.html#create-new-milestone
func (s *MilestonesService) CreateMilestone( func (s *MilestonesService) CreateMilestone(
pid interface{}, pid interface{},
opt *CreateMilestoneOptions) (*Milestone, *Response, error) { opt *CreateMilestoneOptions) (*Milestone, *Response, error) {
...@@ -154,7 +154,7 @@ func (s *MilestonesService) CreateMilestone( ...@@ -154,7 +154,7 @@ func (s *MilestonesService) CreateMilestone(
// UpdateMilestoneOptions represents the available UpdateMilestone() options. // UpdateMilestoneOptions represents the available UpdateMilestone() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#edit-milestone // https://docs.gitlab.com/ce/api/milestones.html#edit-milestone
type UpdateMilestoneOptions struct { type UpdateMilestoneOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -166,7 +166,7 @@ type UpdateMilestoneOptions struct { ...@@ -166,7 +166,7 @@ type UpdateMilestoneOptions struct {
// UpdateMilestone updates an existing project milestone. // UpdateMilestone updates an existing project milestone.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#edit-milestone // https://docs.gitlab.com/ce/api/milestones.html#edit-milestone
func (s *MilestonesService) UpdateMilestone( func (s *MilestonesService) UpdateMilestone(
pid interface{}, pid interface{},
milestone int, milestone int,
...@@ -194,7 +194,7 @@ func (s *MilestonesService) UpdateMilestone( ...@@ -194,7 +194,7 @@ func (s *MilestonesService) UpdateMilestone(
// GetMilestoneIssuesOptions represents the available GetMilestoneIssues() options. // GetMilestoneIssuesOptions represents the available GetMilestoneIssues() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone // https://docs.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone
type GetMilestoneIssuesOptions struct { type GetMilestoneIssuesOptions struct {
ListOptions ListOptions
} }
...@@ -202,7 +202,7 @@ type GetMilestoneIssuesOptions struct { ...@@ -202,7 +202,7 @@ type GetMilestoneIssuesOptions struct {
// GetMilestoneIssues gets all issues assigned to a single project milestone. // GetMilestoneIssues gets all issues assigned to a single project milestone.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone // https://docs.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone
func (s *MilestonesService) GetMilestoneIssues( func (s *MilestonesService) GetMilestoneIssues(
pid interface{}, pid interface{},
milestone int, milestone int,
......
...@@ -19,14 +19,14 @@ package gitlab ...@@ -19,14 +19,14 @@ package gitlab
// NamespacesService handles communication with the namespace related methods // NamespacesService handles communication with the namespace related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/namespaces.html // GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html
type NamespacesService struct { type NamespacesService struct {
client *Client client *Client
} }
// Namespace represents a GitLab namespace. // Namespace represents a GitLab namespace.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/namespaces.html // GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html
type Namespace struct { type Namespace struct {
ID int `json:"id"` ID int `json:"id"`
Path string `json:"path"` Path string `json:"path"`
...@@ -39,7 +39,7 @@ func (n Namespace) String() string { ...@@ -39,7 +39,7 @@ func (n Namespace) String() string {
// ListNamespacesOptions represents the available ListNamespaces() options. // ListNamespacesOptions represents the available ListNamespaces() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/namespaces.html#list-namespaces // GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html#list-namespaces
type ListNamespacesOptions struct { type ListNamespacesOptions struct {
ListOptions ListOptions
Search *string `url:"search,omitempty" json:"search,omitempty"` Search *string `url:"search,omitempty" json:"search,omitempty"`
...@@ -47,7 +47,7 @@ type ListNamespacesOptions struct { ...@@ -47,7 +47,7 @@ type ListNamespacesOptions struct {
// ListNamespaces gets a list of projects accessible by the authenticated user. // ListNamespaces gets a list of projects accessible by the authenticated user.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/namespaces.html#list-namespaces // GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html#list-namespaces
func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions) ([]*Namespace, *Response, error) { func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions) ([]*Namespace, *Response, error) {
req, err := s.client.NewRequest("GET", "namespaces", opt) req, err := s.client.NewRequest("GET", "namespaces", opt)
if err != nil { if err != nil {
...@@ -67,7 +67,7 @@ func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions) ([]*Names ...@@ -67,7 +67,7 @@ func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions) ([]*Names
// or path. // or path.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/namespaces.html#search-for-namespace // https://docs.gitlab.com/ce/api/namespaces.html#search-for-namespace
func (s *NamespacesService) SearchNamespace(query string) ([]*Namespace, *Response, error) { func (s *NamespacesService) SearchNamespace(query string) ([]*Namespace, *Response, error) {
var q struct { var q struct {
Search string `url:"search,omitempty" json:"search,omitempty"` Search string `url:"search,omitempty" json:"search,omitempty"`
......
...@@ -25,14 +25,14 @@ import ( ...@@ -25,14 +25,14 @@ import (
// NotesService handles communication with the notes related methods // NotesService handles communication with the notes related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/notes.html // GitLab API docs: https://docs.gitlab.com/ce/api/notes.html
type NotesService struct { type NotesService struct {
client *Client client *Client
} }
// Note represents a GitLab note. // Note represents a GitLab note.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/notes.html // GitLab API docs: https://docs.gitlab.com/ce/api/notes.html
type Note struct { type Note struct {
ID int `json:"id"` ID int `json:"id"`
Body string `json:"body"` Body string `json:"body"`
...@@ -59,7 +59,7 @@ func (n Note) String() string { ...@@ -59,7 +59,7 @@ func (n Note) String() string {
// ListIssueNotesOptions represents the available ListIssueNotes() options. // ListIssueNotesOptions represents the available ListIssueNotes() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#list-project-issue-notes // https://docs.gitlab.com/ce/api/notes.html#list-project-issue-notes
type ListIssueNotesOptions struct { type ListIssueNotesOptions struct {
ListOptions ListOptions
} }
...@@ -67,7 +67,7 @@ type ListIssueNotesOptions struct { ...@@ -67,7 +67,7 @@ type ListIssueNotesOptions struct {
// ListIssueNotes gets a list of all notes for a single issue. // ListIssueNotes gets a list of all notes for a single issue.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#list-project-issue-notes // https://docs.gitlab.com/ce/api/notes.html#list-project-issue-notes
func (s *NotesService) ListIssueNotes( func (s *NotesService) ListIssueNotes(
pid interface{}, pid interface{},
issue int, issue int,
...@@ -95,7 +95,7 @@ func (s *NotesService) ListIssueNotes( ...@@ -95,7 +95,7 @@ func (s *NotesService) ListIssueNotes(
// GetIssueNote returns a single note for a specific project issue. // GetIssueNote returns a single note for a specific project issue.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#get-single-issue-note // https://docs.gitlab.com/ce/api/notes.html#get-single-issue-note
func (s *NotesService) GetIssueNote( func (s *NotesService) GetIssueNote(
pid interface{}, pid interface{},
issue int, issue int,
...@@ -124,7 +124,7 @@ func (s *NotesService) GetIssueNote( ...@@ -124,7 +124,7 @@ func (s *NotesService) GetIssueNote(
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-issue-note // https://docs.gitlab.com/ce/api/notes.html#create-new-issue-note
type CreateIssueNoteOptions struct { type CreateIssueNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
...@@ -132,7 +132,7 @@ type CreateIssueNoteOptions struct { ...@@ -132,7 +132,7 @@ type CreateIssueNoteOptions struct {
// CreateIssueNote creates a new note to a single project issue. // CreateIssueNote creates a new note to a single project issue.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-issue-note // https://docs.gitlab.com/ce/api/notes.html#create-new-issue-note
func (s *NotesService) CreateIssueNote( func (s *NotesService) CreateIssueNote(
pid interface{}, pid interface{},
issue int, issue int,
...@@ -161,14 +161,14 @@ func (s *NotesService) CreateIssueNote( ...@@ -161,14 +161,14 @@ func (s *NotesService) CreateIssueNote(
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-issue-note // https://docs.gitlab.com/ce/api/notes.html#modify-existing-issue-note
type UpdateIssueNoteOptions struct { type UpdateIssueNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
// UpdateIssueNote modifies existing note of an issue. // UpdateIssueNote modifies existing note of an issue.
// //
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-issue-note // https://docs.gitlab.com/ce/api/notes.html#modify-existing-issue-note
func (s *NotesService) UpdateIssueNote( func (s *NotesService) UpdateIssueNote(
pid interface{}, pid interface{},
issue int, issue int,
...@@ -198,7 +198,7 @@ func (s *NotesService) UpdateIssueNote( ...@@ -198,7 +198,7 @@ func (s *NotesService) UpdateIssueNote(
// notes are comments users can post to a snippet. // notes are comments users can post to a snippet.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#list-all-snippet-notes // https://docs.gitlab.com/ce/api/notes.html#list-all-snippet-notes
func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int) ([]*Note, *Response, error) { func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int) ([]*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -223,7 +223,7 @@ func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int) ([]*Note, ...@@ -223,7 +223,7 @@ func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int) ([]*Note,
// GetSnippetNote returns a single note for a given snippet. // GetSnippetNote returns a single note for a given snippet.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#get-single-snippet-note // https://docs.gitlab.com/ce/api/notes.html#get-single-snippet-note
func (s *NotesService) GetSnippetNote( func (s *NotesService) GetSnippetNote(
pid interface{}, pid interface{},
snippet int, snippet int,
...@@ -252,7 +252,7 @@ func (s *NotesService) GetSnippetNote( ...@@ -252,7 +252,7 @@ func (s *NotesService) GetSnippetNote(
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-snippet-note // https://docs.gitlab.com/ce/api/notes.html#create-new-snippet-note
type CreateSnippetNoteOptions struct { type CreateSnippetNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
...@@ -261,7 +261,7 @@ type CreateSnippetNoteOptions struct { ...@@ -261,7 +261,7 @@ type CreateSnippetNoteOptions struct {
// comments users can post to a snippet. // comments users can post to a snippet.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-snippet-note // https://docs.gitlab.com/ce/api/notes.html#create-new-snippet-note
func (s *NotesService) CreateSnippetNote( func (s *NotesService) CreateSnippetNote(
pid interface{}, pid interface{},
snippet int, snippet int,
...@@ -290,14 +290,14 @@ func (s *NotesService) CreateSnippetNote( ...@@ -290,14 +290,14 @@ func (s *NotesService) CreateSnippetNote(
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-snippet-note // https://docs.gitlab.com/ce/api/notes.html#modify-existing-snippet-note
type UpdateSnippetNoteOptions struct { type UpdateSnippetNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
// UpdateSnippetNote modifies existing note of a snippet. // UpdateSnippetNote modifies existing note of a snippet.
// //
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-snippet-note // https://docs.gitlab.com/ce/api/notes.html#modify-existing-snippet-note
func (s *NotesService) UpdateSnippetNote( func (s *NotesService) UpdateSnippetNote(
pid interface{}, pid interface{},
snippet int, snippet int,
...@@ -326,7 +326,7 @@ func (s *NotesService) UpdateSnippetNote( ...@@ -326,7 +326,7 @@ func (s *NotesService) UpdateSnippetNote(
// ListMergeRequestNotes gets a list of all notes for a single merge request. // ListMergeRequestNotes gets a list of all notes for a single merge request.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#list-all-merge-request-notes // https://docs.gitlab.com/ce/api/notes.html#list-all-merge-request-notes
func (s *NotesService) ListMergeRequestNotes( func (s *NotesService) ListMergeRequestNotes(
pid interface{}, pid interface{},
mergeRequest int) ([]*Note, *Response, error) { mergeRequest int) ([]*Note, *Response, error) {
...@@ -353,7 +353,7 @@ func (s *NotesService) ListMergeRequestNotes( ...@@ -353,7 +353,7 @@ func (s *NotesService) ListMergeRequestNotes(
// GetMergeRequestNote returns a single note for a given merge request. // GetMergeRequestNote returns a single note for a given merge request.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#get-single-merge-request-note // https://docs.gitlab.com/ce/api/notes.html#get-single-merge-request-note
func (s *NotesService) GetMergeRequestNote( func (s *NotesService) GetMergeRequestNote(
pid interface{}, pid interface{},
mergeRequest int, mergeRequest int,
...@@ -382,7 +382,7 @@ func (s *NotesService) GetMergeRequestNote( ...@@ -382,7 +382,7 @@ func (s *NotesService) GetMergeRequestNote(
// CreateMergeRequestNote() options. // CreateMergeRequestNote() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-merge-request-note // https://docs.gitlab.com/ce/api/notes.html#create-new-merge-request-note
type CreateMergeRequestNoteOptions struct { type CreateMergeRequestNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
...@@ -390,7 +390,7 @@ type CreateMergeRequestNoteOptions struct { ...@@ -390,7 +390,7 @@ type CreateMergeRequestNoteOptions struct {
// CreateMergeRequestNote creates a new note for a single merge request. // CreateMergeRequestNote creates a new note for a single merge request.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-merge-request-note // https://docs.gitlab.com/ce/api/notes.html#create-new-merge-request-note
func (s *NotesService) CreateMergeRequestNote( func (s *NotesService) CreateMergeRequestNote(
pid interface{}, pid interface{},
mergeRequest int, mergeRequest int,
...@@ -419,14 +419,14 @@ func (s *NotesService) CreateMergeRequestNote( ...@@ -419,14 +419,14 @@ func (s *NotesService) CreateMergeRequestNote(
// UpdateMergeRequestNote() options. // UpdateMergeRequestNote() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note // https://docs.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note
type UpdateMergeRequestNoteOptions struct { type UpdateMergeRequestNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
// UpdateMergeRequestNote modifies existing note of a merge request. // UpdateMergeRequestNote modifies existing note of a merge request.
// //
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note // https://docs.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note
func (s *NotesService) UpdateMergeRequestNote( func (s *NotesService) UpdateMergeRequestNote(
pid interface{}, pid interface{},
mergeRequest int, mergeRequest int,
......
...@@ -26,14 +26,14 @@ import ( ...@@ -26,14 +26,14 @@ import (
// ProjectSnippetsService handles communication with the project snippets // ProjectSnippetsService handles communication with the project snippets
// related methods of the GitLab API. // related methods of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/project_snippets.html // GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html
type ProjectSnippetsService struct { type ProjectSnippetsService struct {
client *Client client *Client
} }
// Snippet represents a GitLab project snippet. // Snippet represents a GitLab project snippet.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/project_snippets.html // GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html
type Snippet struct { type Snippet struct {
ID int `json:"id"` ID int `json:"id"`
Title string `json:"title"` Title string `json:"title"`
...@@ -57,14 +57,14 @@ func (s Snippet) String() string { ...@@ -57,14 +57,14 @@ func (s Snippet) String() string {
// ListSnippetsOptions represents the available ListSnippets() options. // ListSnippetsOptions represents the available ListSnippets() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/project_snippets.html#list-snippets // GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#list-snippets
type ListSnippetsOptions struct { type ListSnippetsOptions struct {
ListOptions ListOptions
} }
// ListSnippets gets a list of project snippets. // ListSnippets gets a list of project snippets.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/project_snippets.html#list-snippets // GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#list-snippets
func (s *ProjectSnippetsService) ListSnippets( func (s *ProjectSnippetsService) ListSnippets(
pid interface{}, pid interface{},
opt *ListSnippetsOptions) ([]*Snippet, *Response, error) { opt *ListSnippetsOptions) ([]*Snippet, *Response, error) {
...@@ -91,7 +91,7 @@ func (s *ProjectSnippetsService) ListSnippets( ...@@ -91,7 +91,7 @@ func (s *ProjectSnippetsService) ListSnippets(
// GetSnippet gets a single project snippet // GetSnippet gets a single project snippet
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#single-snippet // https://docs.gitlab.com/ce/api/project_snippets.html#single-snippet
func (s *ProjectSnippetsService) GetSnippet( func (s *ProjectSnippetsService) GetSnippet(
pid interface{}, pid interface{},
snippet int) (*Snippet, *Response, error) { snippet int) (*Snippet, *Response, error) {
...@@ -118,7 +118,7 @@ func (s *ProjectSnippetsService) GetSnippet( ...@@ -118,7 +118,7 @@ func (s *ProjectSnippetsService) GetSnippet(
// CreateSnippetOptions represents the available CreateSnippet() options. // CreateSnippetOptions represents the available CreateSnippet() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#create-new-snippet // https://docs.gitlab.com/ce/api/project_snippets.html#create-new-snippet
type CreateSnippetOptions struct { type CreateSnippetOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
FileName *string `url:"file_name,omitempty" json:"file_name,omitempty"` FileName *string `url:"file_name,omitempty" json:"file_name,omitempty"`
...@@ -130,7 +130,7 @@ type CreateSnippetOptions struct { ...@@ -130,7 +130,7 @@ type CreateSnippetOptions struct {
// to create new snippets. // to create new snippets.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#create-new-snippet // https://docs.gitlab.com/ce/api/project_snippets.html#create-new-snippet
func (s *ProjectSnippetsService) CreateSnippet( func (s *ProjectSnippetsService) CreateSnippet(
pid interface{}, pid interface{},
opt *CreateSnippetOptions) (*Snippet, *Response, error) { opt *CreateSnippetOptions) (*Snippet, *Response, error) {
...@@ -157,7 +157,7 @@ func (s *ProjectSnippetsService) CreateSnippet( ...@@ -157,7 +157,7 @@ func (s *ProjectSnippetsService) CreateSnippet(
// UpdateSnippetOptions represents the available UpdateSnippet() options. // UpdateSnippetOptions represents the available UpdateSnippet() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#update-snippet // https://docs.gitlab.com/ce/api/project_snippets.html#update-snippet
type UpdateSnippetOptions struct { type UpdateSnippetOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
FileName *string `url:"file_name,omitempty" json:"file_name,omitempty"` FileName *string `url:"file_name,omitempty" json:"file_name,omitempty"`
...@@ -169,7 +169,7 @@ type UpdateSnippetOptions struct { ...@@ -169,7 +169,7 @@ type UpdateSnippetOptions struct {
// permission to change an existing snippet. // permission to change an existing snippet.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#update-snippet // https://docs.gitlab.com/ce/api/project_snippets.html#update-snippet
func (s *ProjectSnippetsService) UpdateSnippet( func (s *ProjectSnippetsService) UpdateSnippet(
pid interface{}, pid interface{},
snippet int, snippet int,
...@@ -199,7 +199,7 @@ func (s *ProjectSnippetsService) UpdateSnippet( ...@@ -199,7 +199,7 @@ func (s *ProjectSnippetsService) UpdateSnippet(
// code. // code.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#delete-snippet // https://docs.gitlab.com/ce/api/project_snippets.html#delete-snippet
func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int) (*Response, error) { func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -218,7 +218,7 @@ func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int) (*R ...@@ -218,7 +218,7 @@ func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int) (*R
// SnippetContent returns the raw project snippet as plain text. // SnippetContent returns the raw project snippet as plain text.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#snippet-content // https://docs.gitlab.com/ce/api/project_snippets.html#snippet-content
func (s *ProjectSnippetsService) SnippetContent( func (s *ProjectSnippetsService) SnippetContent(
pid interface{}, pid interface{},
snippet int) ([]byte, *Response, error) { snippet int) ([]byte, *Response, error) {
......
...@@ -25,14 +25,14 @@ import ( ...@@ -25,14 +25,14 @@ import (
// ProjectsService handles communication with the repositories related methods // ProjectsService handles communication with the repositories related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html
type ProjectsService struct { type ProjectsService struct {
client *Client client *Client
} }
// Project represents a GitLab project. // Project represents a GitLab project.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html
type Project struct { type Project struct {
ID int `json:"id"` ID int `json:"id"`
Description string `json:"description"` Description string `json:"description"`
...@@ -130,21 +130,20 @@ func (s Project) String() string { ...@@ -130,21 +130,20 @@ func (s Project) String() string {
// ListProjectsOptions represents the available ListProjects() options. // ListProjectsOptions represents the available ListProjects() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#list-projects // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-projects
type ListProjectsOptions struct { type ListProjectsOptions struct {
ListOptions ListOptions
Archived *bool `url:"archived,omitempty" json:"archived,omitempty"` Archived *bool `url:"archived,omitempty" json:"archived,omitempty"`
OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
Sort *string `url:"sort,omitempty" json:"sort,omitempty"` Sort *string `url:"sort,omitempty" json:"sort,omitempty"`
Search *string `url:"search,omitempty" json:"search,omitempty"` Search *string `url:"search,omitempty" json:"search,omitempty"`
CIEnabledFirst *bool `url:"ci_enabled_first,omitempty" json:"ci_enabled_first,omitempty"` Simple *bool `url:"simple,omitempty" json:"simple,omitempty"`
Simple *bool `url:"simple,omitempty" json:"simple,omitempty"` Visibility *string `url:"visibility,omitempty" json:"visibility,omitempty"`
Visibility *string `url:"visibility,omitempty" json:"visibility,omitempty"`
} }
// ListProjects gets a list of projects accessible by the authenticated user. // ListProjects gets a list of projects accessible by the authenticated user.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#list-projects // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-projects
func (s *ProjectsService) ListProjects(opt *ListProjectsOptions) ([]*Project, *Response, error) { func (s *ProjectsService) ListProjects(opt *ListProjectsOptions) ([]*Project, *Response, error) {
req, err := s.client.NewRequest("GET", "projects", opt) req, err := s.client.NewRequest("GET", "projects", opt)
if err != nil { if err != nil {
...@@ -164,7 +163,7 @@ func (s *ProjectsService) ListProjects(opt *ListProjectsOptions) ([]*Project, *R ...@@ -164,7 +163,7 @@ func (s *ProjectsService) ListProjects(opt *ListProjectsOptions) ([]*Project, *R
// authenticated user. // authenticated user.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#list-owned-projects // https://docs.gitlab.com/ce/api/projects.html#list-owned-projects
func (s *ProjectsService) ListOwnedProjects( func (s *ProjectsService) ListOwnedProjects(
opt *ListProjectsOptions) ([]*Project, *Response, error) { opt *ListProjectsOptions) ([]*Project, *Response, error) {
req, err := s.client.NewRequest("GET", "projects/owned", opt) req, err := s.client.NewRequest("GET", "projects/owned", opt)
...@@ -185,7 +184,7 @@ func (s *ProjectsService) ListOwnedProjects( ...@@ -185,7 +184,7 @@ func (s *ProjectsService) ListOwnedProjects(
// authenticated user. // authenticated user.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#list-starred-projects // https://docs.gitlab.com/ce/api/projects.html#list-starred-projects
func (s *ProjectsService) ListStarredProjects( func (s *ProjectsService) ListStarredProjects(
opt *ListProjectsOptions) ([]*Project, *Response, error) { opt *ListProjectsOptions) ([]*Project, *Response, error) {
req, err := s.client.NewRequest("GET", "projects/starred", opt) req, err := s.client.NewRequest("GET", "projects/starred", opt)
...@@ -205,7 +204,7 @@ func (s *ProjectsService) ListStarredProjects( ...@@ -205,7 +204,7 @@ func (s *ProjectsService) ListStarredProjects(
// ListAllProjects gets a list of all GitLab projects (admin only). // ListAllProjects gets a list of all GitLab projects (admin only).
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#list-all-projects // https://docs.gitlab.com/ce/api/projects.html#list-all-projects
func (s *ProjectsService) ListAllProjects(opt *ListProjectsOptions) ([]*Project, *Response, error) { func (s *ProjectsService) ListAllProjects(opt *ListProjectsOptions) ([]*Project, *Response, error) {
req, err := s.client.NewRequest("GET", "projects/all", opt) req, err := s.client.NewRequest("GET", "projects/all", opt)
if err != nil { if err != nil {
...@@ -225,7 +224,7 @@ func (s *ProjectsService) ListAllProjects(opt *ListProjectsOptions) ([]*Project, ...@@ -225,7 +224,7 @@ func (s *ProjectsService) ListAllProjects(opt *ListProjectsOptions) ([]*Project,
// NAMESPACE/PROJECT_NAME, which is owned by the authenticated user. // NAMESPACE/PROJECT_NAME, which is owned by the authenticated user.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#get-single-project // https://docs.gitlab.com/ce/api/projects.html#get-single-project
func (s *ProjectsService) GetProject(pid interface{}) (*Project, *Response, error) { func (s *ProjectsService) GetProject(pid interface{}) (*Project, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -250,7 +249,7 @@ func (s *ProjectsService) GetProject(pid interface{}) (*Project, *Response, erro ...@@ -250,7 +249,7 @@ func (s *ProjectsService) GetProject(pid interface{}) (*Project, *Response, erro
// SearchProjectsOptions represents the available SearchProjects() options. // SearchProjectsOptions represents the available SearchProjects() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#search-for-projects-by-name // https://docs.gitlab.com/ce/api/projects.html#search-for-projects-by-name
type SearchProjectsOptions struct { type SearchProjectsOptions struct {
ListOptions ListOptions
OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
...@@ -261,7 +260,7 @@ type SearchProjectsOptions struct { ...@@ -261,7 +260,7 @@ type SearchProjectsOptions struct {
// authenticated user. // authenticated user.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#search-for-projects-by-name // https://docs.gitlab.com/ce/api/projects.html#search-for-projects-by-name
func (s *ProjectsService) SearchProjects( func (s *ProjectsService) SearchProjects(
query string, query string,
opt *SearchProjectsOptions) ([]*Project, *Response, error) { opt *SearchProjectsOptions) ([]*Project, *Response, error) {
...@@ -284,7 +283,7 @@ func (s *ProjectsService) SearchProjects( ...@@ -284,7 +283,7 @@ func (s *ProjectsService) SearchProjects(
// ProjectEvent represents a GitLab project event. // ProjectEvent represents a GitLab project event.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#get-project-events // https://docs.gitlab.com/ce/api/projects.html#get-project-events
type ProjectEvent struct { type ProjectEvent struct {
Title interface{} `json:"title"` Title interface{} `json:"title"`
ProjectID int `json:"project_id"` ProjectID int `json:"project_id"`
...@@ -313,7 +312,7 @@ func (s ProjectEvent) String() string { ...@@ -313,7 +312,7 @@ func (s ProjectEvent) String() string {
// GetProjectEventsOptions represents the available GetProjectEvents() options. // GetProjectEventsOptions represents the available GetProjectEvents() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#get-project-events // https://docs.gitlab.com/ce/api/projects.html#get-project-events
type GetProjectEventsOptions struct { type GetProjectEventsOptions struct {
ListOptions ListOptions
} }
...@@ -322,7 +321,7 @@ type GetProjectEventsOptions struct { ...@@ -322,7 +321,7 @@ type GetProjectEventsOptions struct {
// newest to latest. // newest to latest.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#get-project-events // https://docs.gitlab.com/ce/api/projects.html#get-project-events
func (s *ProjectsService) GetProjectEvents( func (s *ProjectsService) GetProjectEvents(
pid interface{}, pid interface{},
opt *GetProjectEventsOptions) ([]*ProjectEvent, *Response, error) { opt *GetProjectEventsOptions) ([]*ProjectEvent, *Response, error) {
...@@ -348,7 +347,7 @@ func (s *ProjectsService) GetProjectEvents( ...@@ -348,7 +347,7 @@ func (s *ProjectsService) GetProjectEvents(
// CreateProjectOptions represents the available CreateProjects() options. // CreateProjectOptions represents the available CreateProjects() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#create-project // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#create-project
type CreateProjectOptions struct { type CreateProjectOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
Path *string `url:"path,omitempty" json:"path,omitempty"` Path *string `url:"path,omitempty" json:"path,omitempty"`
...@@ -372,7 +371,7 @@ type CreateProjectOptions struct { ...@@ -372,7 +371,7 @@ type CreateProjectOptions struct {
// CreateProject creates a new project owned by the authenticated user. // CreateProject creates a new project owned by the authenticated user.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#create-project // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#create-project
func (s *ProjectsService) CreateProject( func (s *ProjectsService) CreateProject(
opt *CreateProjectOptions) (*Project, *Response, error) { opt *CreateProjectOptions) (*Project, *Response, error) {
req, err := s.client.NewRequest("POST", "projects", opt) req, err := s.client.NewRequest("POST", "projects", opt)
...@@ -393,7 +392,7 @@ func (s *ProjectsService) CreateProject( ...@@ -393,7 +392,7 @@ func (s *ProjectsService) CreateProject(
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#create-project-for-user // https://docs.gitlab.com/ce/api/projects.html#create-project-for-user
type CreateProjectForUserOptions struct { type CreateProjectForUserOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -411,7 +410,7 @@ type CreateProjectForUserOptions struct { ...@@ -411,7 +410,7 @@ type CreateProjectForUserOptions struct {
// Available only for admins. // Available only for admins.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#create-project-for-user // https://docs.gitlab.com/ce/api/projects.html#create-project-for-user
func (s *ProjectsService) CreateProjectForUser( func (s *ProjectsService) CreateProjectForUser(
user int, user int,
opt *CreateProjectForUserOptions) (*Project, *Response, error) { opt *CreateProjectForUserOptions) (*Project, *Response, error) {
...@@ -433,7 +432,7 @@ func (s *ProjectsService) CreateProjectForUser( ...@@ -433,7 +432,7 @@ func (s *ProjectsService) CreateProjectForUser(
// EditProjectOptions represents the available EditProject() options. // EditProjectOptions represents the available EditProject() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#edit-project // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#edit-project
type EditProjectOptions struct { type EditProjectOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
Path *string `url:"path,omitempty" json:"path,omitempty"` Path *string `url:"path,omitempty" json:"path,omitempty"`
...@@ -457,7 +456,7 @@ type EditProjectOptions struct { ...@@ -457,7 +456,7 @@ type EditProjectOptions struct {
// EditProject updates an existing project. // EditProject updates an existing project.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#edit-project // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#edit-project
func (s *ProjectsService) EditProject( func (s *ProjectsService) EditProject(
pid interface{}, pid interface{},
opt *EditProjectOptions) (*Project, *Response, error) { opt *EditProjectOptions) (*Project, *Response, error) {
...@@ -484,7 +483,7 @@ func (s *ProjectsService) EditProject( ...@@ -484,7 +483,7 @@ func (s *ProjectsService) EditProject(
// ForkProject forks a project into the user namespace of the authenticated // ForkProject forks a project into the user namespace of the authenticated
// user. // user.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#fork-project // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#fork-project
func (s *ProjectsService) ForkProject(pid interface{}) (*Project, *Response, error) { func (s *ProjectsService) ForkProject(pid interface{}) (*Project, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -509,7 +508,7 @@ func (s *ProjectsService) ForkProject(pid interface{}) (*Project, *Response, err ...@@ -509,7 +508,7 @@ func (s *ProjectsService) ForkProject(pid interface{}) (*Project, *Response, err
// DeleteProject removes a project including all associated resources // DeleteProject removes a project including all associated resources
// (issues, merge requests etc.) // (issues, merge requests etc.)
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#remove-project // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#remove-project
func (s *ProjectsService) DeleteProject(pid interface{}) (*Response, error) { func (s *ProjectsService) DeleteProject(pid interface{}) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -528,7 +527,7 @@ func (s *ProjectsService) DeleteProject(pid interface{}) (*Response, error) { ...@@ -528,7 +527,7 @@ func (s *ProjectsService) DeleteProject(pid interface{}) (*Response, error) {
// ProjectMember represents a project member. // ProjectMember represents a project member.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#list-project-team-members // https://docs.gitlab.com/ce/api/projects.html#list-project-team-members
type ProjectMember struct { type ProjectMember struct {
ID int `json:"id"` ID int `json:"id"`
Username string `json:"username"` Username string `json:"username"`
...@@ -543,7 +542,7 @@ type ProjectMember struct { ...@@ -543,7 +542,7 @@ type ProjectMember struct {
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#list-project-team-members // https://docs.gitlab.com/ce/api/projects.html#list-project-team-members
type ListProjectMembersOptions struct { type ListProjectMembersOptions struct {
ListOptions ListOptions
Query *string `url:"query,omitempty" json:"query,omitempty"` Query *string `url:"query,omitempty" json:"query,omitempty"`
...@@ -552,7 +551,7 @@ type ListProjectMembersOptions struct { ...@@ -552,7 +551,7 @@ type ListProjectMembersOptions struct {
// ListProjectMembers gets a list of a project's team members. // ListProjectMembers gets a list of a project's team members.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#list-project-team-members // https://docs.gitlab.com/ce/api/projects.html#list-project-team-members
func (s *ProjectsService) ListProjectMembers( func (s *ProjectsService) ListProjectMembers(
pid interface{}, pid interface{},
opt *ListProjectMembersOptions) ([]*ProjectMember, *Response, error) { opt *ListProjectMembersOptions) ([]*ProjectMember, *Response, error) {
...@@ -579,7 +578,7 @@ func (s *ProjectsService) ListProjectMembers( ...@@ -579,7 +578,7 @@ func (s *ProjectsService) ListProjectMembers(
// GetProjectMember gets a project team member. // GetProjectMember gets a project team member.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#get-project-team-member // https://docs.gitlab.com/ce/api/projects.html#get-project-team-member
func (s *ProjectsService) GetProjectMember( func (s *ProjectsService) GetProjectMember(
pid interface{}, pid interface{},
user int) (*ProjectMember, *Response, error) { user int) (*ProjectMember, *Response, error) {
...@@ -606,7 +605,7 @@ func (s *ProjectsService) GetProjectMember( ...@@ -606,7 +605,7 @@ func (s *ProjectsService) GetProjectMember(
// AddProjectMemberOptions represents the available AddProjectMember() options. // AddProjectMemberOptions represents the available AddProjectMember() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#add-project-team-member // https://docs.gitlab.com/ce/api/projects.html#add-project-team-member
type AddProjectMemberOptions struct { type AddProjectMemberOptions struct {
UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"` UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"`
AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
...@@ -618,7 +617,7 @@ type AddProjectMemberOptions struct { ...@@ -618,7 +617,7 @@ type AddProjectMemberOptions struct {
// existing membership. // existing membership.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#add-project-team-member // https://docs.gitlab.com/ce/api/projects.html#add-project-team-member
func (s *ProjectsService) AddProjectMember( func (s *ProjectsService) AddProjectMember(
pid interface{}, pid interface{},
opt *AddProjectMemberOptions) (*ProjectMember, *Response, error) { opt *AddProjectMemberOptions) (*ProjectMember, *Response, error) {
...@@ -645,7 +644,7 @@ func (s *ProjectsService) AddProjectMember( ...@@ -645,7 +644,7 @@ func (s *ProjectsService) AddProjectMember(
// EditProjectMemberOptions represents the available EditProjectMember() options. // EditProjectMemberOptions represents the available EditProjectMember() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#edit-project-team-member // https://docs.gitlab.com/ce/api/projects.html#edit-project-team-member
type EditProjectMemberOptions struct { type EditProjectMemberOptions struct {
AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
} }
...@@ -653,7 +652,7 @@ type EditProjectMemberOptions struct { ...@@ -653,7 +652,7 @@ type EditProjectMemberOptions struct {
// EditProjectMember updates a project team member to a specified access level.. // EditProjectMember updates a project team member to a specified access level..
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#edit-project-team-member // https://docs.gitlab.com/ce/api/projects.html#edit-project-team-member
func (s *ProjectsService) EditProjectMember( func (s *ProjectsService) EditProjectMember(
pid interface{}, pid interface{},
user int, user int,
...@@ -681,7 +680,7 @@ func (s *ProjectsService) EditProjectMember( ...@@ -681,7 +680,7 @@ func (s *ProjectsService) EditProjectMember(
// DeleteProjectMember removes a user from a project team. // DeleteProjectMember removes a user from a project team.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#remove-project-team-member // https://docs.gitlab.com/ce/api/projects.html#remove-project-team-member
func (s *ProjectsService) DeleteProjectMember(pid interface{}, user int) (*Response, error) { func (s *ProjectsService) DeleteProjectMember(pid interface{}, user int) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -700,7 +699,7 @@ func (s *ProjectsService) DeleteProjectMember(pid interface{}, user int) (*Respo ...@@ -700,7 +699,7 @@ func (s *ProjectsService) DeleteProjectMember(pid interface{}, user int) (*Respo
// ProjectHook represents a project hook. // ProjectHook represents a project hook.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#list-project-hooks // https://docs.gitlab.com/ce/api/projects.html#list-project-hooks
type ProjectHook struct { type ProjectHook struct {
ID int `json:"id"` ID int `json:"id"`
URL string `json:"url"` URL string `json:"url"`
...@@ -719,7 +718,7 @@ type ProjectHook struct { ...@@ -719,7 +718,7 @@ type ProjectHook struct {
// ListProjectHooksOptions represents the available ListProjectHooks() options. // ListProjectHooksOptions represents the available ListProjectHooks() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#list-project-hooks // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-project-hooks
type ListProjectHooksOptions struct { type ListProjectHooksOptions struct {
ListOptions ListOptions
} }
...@@ -727,7 +726,7 @@ type ListProjectHooksOptions struct { ...@@ -727,7 +726,7 @@ type ListProjectHooksOptions struct {
// ListProjectHooks gets a list of project hooks. // ListProjectHooks gets a list of project hooks.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#list-project-hooks // https://docs.gitlab.com/ce/api/projects.html#list-project-hooks
func (s *ProjectsService) ListProjectHooks( func (s *ProjectsService) ListProjectHooks(
pid interface{}, pid interface{},
opt *ListProjectHooksOptions) ([]*ProjectHook, *Response, error) { opt *ListProjectHooksOptions) ([]*ProjectHook, *Response, error) {
...@@ -754,7 +753,7 @@ func (s *ProjectsService) ListProjectHooks( ...@@ -754,7 +753,7 @@ func (s *ProjectsService) ListProjectHooks(
// GetProjectHook gets a specific hook for a project. // GetProjectHook gets a specific hook for a project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#get-project-hook // https://docs.gitlab.com/ce/api/projects.html#get-project-hook
func (s *ProjectsService) GetProjectHook( func (s *ProjectsService) GetProjectHook(
pid interface{}, pid interface{},
hook int) (*ProjectHook, *Response, error) { hook int) (*ProjectHook, *Response, error) {
...@@ -781,7 +780,7 @@ func (s *ProjectsService) GetProjectHook( ...@@ -781,7 +780,7 @@ func (s *ProjectsService) GetProjectHook(
// AddProjectHookOptions represents the available AddProjectHook() options. // AddProjectHookOptions represents the available AddProjectHook() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#add-project-hook // https://docs.gitlab.com/ce/api/projects.html#add-project-hook
type AddProjectHookOptions struct { type AddProjectHookOptions struct {
URL *string `url:"url,omitempty" json:"url,omitempty"` URL *string `url:"url,omitempty" json:"url,omitempty"`
PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"`
...@@ -798,7 +797,7 @@ type AddProjectHookOptions struct { ...@@ -798,7 +797,7 @@ type AddProjectHookOptions struct {
// AddProjectHook adds a hook to a specified project. // AddProjectHook adds a hook to a specified project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#add-project-hook // https://docs.gitlab.com/ce/api/projects.html#add-project-hook
func (s *ProjectsService) AddProjectHook( func (s *ProjectsService) AddProjectHook(
pid interface{}, pid interface{},
opt *AddProjectHookOptions) (*ProjectHook, *Response, error) { opt *AddProjectHookOptions) (*ProjectHook, *Response, error) {
...@@ -825,7 +824,7 @@ func (s *ProjectsService) AddProjectHook( ...@@ -825,7 +824,7 @@ func (s *ProjectsService) AddProjectHook(
// EditProjectHookOptions represents the available EditProjectHook() options. // EditProjectHookOptions represents the available EditProjectHook() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#edit-project-hook // https://docs.gitlab.com/ce/api/projects.html#edit-project-hook
type EditProjectHookOptions struct { type EditProjectHookOptions struct {
URL *string `url:"url,omitempty" json:"url,omitempty"` URL *string `url:"url,omitempty" json:"url,omitempty"`
PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"`
...@@ -842,7 +841,7 @@ type EditProjectHookOptions struct { ...@@ -842,7 +841,7 @@ type EditProjectHookOptions struct {
// EditProjectHook edits a hook for a specified project. // EditProjectHook edits a hook for a specified project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#edit-project-hook // https://docs.gitlab.com/ce/api/projects.html#edit-project-hook
func (s *ProjectsService) EditProjectHook( func (s *ProjectsService) EditProjectHook(
pid interface{}, pid interface{},
hook int, hook int,
...@@ -871,7 +870,7 @@ func (s *ProjectsService) EditProjectHook( ...@@ -871,7 +870,7 @@ func (s *ProjectsService) EditProjectHook(
// method and can be called multiple times. Either the hook is available or not. // method and can be called multiple times. Either the hook is available or not.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#delete-project-hook // https://docs.gitlab.com/ce/api/projects.html#delete-project-hook
func (s *ProjectsService) DeleteProjectHook(pid interface{}, hook int) (*Response, error) { func (s *ProjectsService) DeleteProjectHook(pid interface{}, hook int) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -890,7 +889,7 @@ func (s *ProjectsService) DeleteProjectHook(pid interface{}, hook int) (*Respons ...@@ -890,7 +889,7 @@ func (s *ProjectsService) DeleteProjectHook(pid interface{}, hook int) (*Respons
// ProjectForkRelation represents a project fork relationship. // ProjectForkRelation represents a project fork relationship.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#admin-fork-relation // https://docs.gitlab.com/ce/api/projects.html#admin-fork-relation
type ProjectForkRelation struct { type ProjectForkRelation struct {
ID int `json:"id"` ID int `json:"id"`
ForkedToProjectID int `json:"forked_to_project_id"` ForkedToProjectID int `json:"forked_to_project_id"`
...@@ -903,7 +902,7 @@ type ProjectForkRelation struct { ...@@ -903,7 +902,7 @@ type ProjectForkRelation struct {
// existing projects. // existing projects.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#create-a-forked-fromto-relation-between-existing-projects. // https://docs.gitlab.com/ce/api/projects.html#create-a-forked-fromto-relation-between-existing-projects.
func (s *ProjectsService) CreateProjectForkRelation( func (s *ProjectsService) CreateProjectForkRelation(
pid int, pid int,
fork int) (*ProjectForkRelation, *Response, error) { fork int) (*ProjectForkRelation, *Response, error) {
...@@ -926,7 +925,7 @@ func (s *ProjectsService) CreateProjectForkRelation( ...@@ -926,7 +925,7 @@ func (s *ProjectsService) CreateProjectForkRelation(
// DeleteProjectForkRelation deletes an existing forked from relationship. // DeleteProjectForkRelation deletes an existing forked from relationship.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/projects.html#delete-an-existing-forked-from-relationship // https://docs.gitlab.com/ce/api/projects.html#delete-an-existing-forked-from-relationship
func (s *ProjectsService) DeleteProjectForkRelation(pid int) (*Response, error) { func (s *ProjectsService) DeleteProjectForkRelation(pid int) (*Response, error) {
u := fmt.Sprintf("projects/%d/fork", pid) u := fmt.Sprintf("projects/%d/fork", pid)
...@@ -942,7 +941,7 @@ func (s *ProjectsService) DeleteProjectForkRelation(pid int) (*Response, error) ...@@ -942,7 +941,7 @@ func (s *ProjectsService) DeleteProjectForkRelation(pid int) (*Response, error)
// project owner of this project. // project owner of this project.
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/projects.html#archive-a-project // https://docs.gitlab.com/ce/api/projects.html#archive-a-project
func (s *ProjectsService) ArchiveProject(pid interface{}) (*Project, *Response, error) { func (s *ProjectsService) ArchiveProject(pid interface{}) (*Project, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -968,7 +967,7 @@ func (s *ProjectsService) ArchiveProject(pid interface{}) (*Project, *Response, ...@@ -968,7 +967,7 @@ func (s *ProjectsService) ArchiveProject(pid interface{}) (*Project, *Response,
// the project owner of this project. // the project owner of this project.
// //
// GitLab API docs: // GitLab API docs:
// http://docs.gitlab.com/ce/api/projects.html#unarchive-a-project // https://docs.gitlab.com/ce/api/projects.html#unarchive-a-project
func (s *ProjectsService) UnarchiveProject(pid interface{}) (*Project, *Response, error) { func (s *ProjectsService) UnarchiveProject(pid interface{}) (*Project, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -14,20 +14,19 @@ func TestListProjects(t *testing.T) { ...@@ -14,20 +14,19 @@ func TestListProjects(t *testing.T) {
mux.HandleFunc("/projects", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/projects", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET") testMethod(t, r, "GET")
testFormValues(t, r, values{ testFormValues(t, r, values{
"page": "2", "page": "2",
"per_page": "3", "per_page": "3",
"archived": "true", "archived": "true",
"order_by": "name", "order_by": "name",
"sort": "asc", "sort": "asc",
"search": "query", "search": "query",
"ci_enabled_first": "true", "simple": "true",
"simple": "true", "visibility": "public",
"visibility": "public",
}) })
fmt.Fprint(w, `[{"id":1},{"id":2}]`) fmt.Fprint(w, `[{"id":1},{"id":2}]`)
}) })
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), Bool(true), String("public")} opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), String("public")}
projects, _, err := client.Projects.ListProjects(opt) projects, _, err := client.Projects.ListProjects(opt)
if err != nil { if err != nil {
...@@ -47,20 +46,19 @@ func TestListOwnedProjects(t *testing.T) { ...@@ -47,20 +46,19 @@ func TestListOwnedProjects(t *testing.T) {
mux.HandleFunc("/projects/owned", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/projects/owned", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET") testMethod(t, r, "GET")
testFormValues(t, r, values{ testFormValues(t, r, values{
"page": "2", "page": "2",
"per_page": "3", "per_page": "3",
"archived": "true", "archived": "true",
"order_by": "name", "order_by": "name",
"sort": "asc", "sort": "asc",
"search": "query", "search": "query",
"ci_enabled_first": "true", "simple": "true",
"simple": "true", "visibility": "public",
"visibility": "public",
}) })
fmt.Fprint(w, `[{"id":1},{"id":2}]`) fmt.Fprint(w, `[{"id":1},{"id":2}]`)
}) })
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), Bool(true), String("public")} opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), String("public")}
projects, _, err := client.Projects.ListOwnedProjects(opt) projects, _, err := client.Projects.ListOwnedProjects(opt)
if err != nil { if err != nil {
...@@ -80,20 +78,19 @@ func TestListStarredProjects(t *testing.T) { ...@@ -80,20 +78,19 @@ func TestListStarredProjects(t *testing.T) {
mux.HandleFunc("/projects/starred", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/projects/starred", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET") testMethod(t, r, "GET")
testFormValues(t, r, values{ testFormValues(t, r, values{
"page": "2", "page": "2",
"per_page": "3", "per_page": "3",
"archived": "true", "archived": "true",
"order_by": "name", "order_by": "name",
"sort": "asc", "sort": "asc",
"search": "query", "search": "query",
"ci_enabled_first": "true", "simple": "true",
"simple": "true", "visibility": "public",
"visibility": "public",
}) })
fmt.Fprint(w, `[{"id":1},{"id":2}]`) fmt.Fprint(w, `[{"id":1},{"id":2}]`)
}) })
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), Bool(true), String("public")} opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), String("public")}
projects, _, err := client.Projects.ListStarredProjects(opt) projects, _, err := client.Projects.ListStarredProjects(opt)
if err != nil { if err != nil {
...@@ -113,20 +110,19 @@ func TestListAllProjects(t *testing.T) { ...@@ -113,20 +110,19 @@ func TestListAllProjects(t *testing.T) {
mux.HandleFunc("/projects/all", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/projects/all", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET") testMethod(t, r, "GET")
testFormValues(t, r, values{ testFormValues(t, r, values{
"page": "2", "page": "2",
"per_page": "3", "per_page": "3",
"archived": "true", "archived": "true",
"order_by": "name", "order_by": "name",
"sort": "asc", "sort": "asc",
"search": "query", "search": "query",
"ci_enabled_first": "true", "simple": "true",
"simple": "true", "visibility": "public",
"visibility": "public",
}) })
fmt.Fprint(w, `[{"id":1},{"id":2}]`) fmt.Fprint(w, `[{"id":1},{"id":2}]`)
}) })
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), Bool(true), String("public")} opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), String("public")}
projects, _, err := client.Projects.ListAllProjects(opt) projects, _, err := client.Projects.ListAllProjects(opt)
if err != nil { if err != nil {
......
...@@ -25,14 +25,14 @@ import ( ...@@ -25,14 +25,14 @@ import (
// RepositoriesService handles communication with the repositories related // RepositoriesService handles communication with the repositories related
// methods of the GitLab API. // methods of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/repositories.html // GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html
type RepositoriesService struct { type RepositoriesService struct {
client *Client client *Client
} }
// TreeNode represents a GitLab repository file or directory. // TreeNode represents a GitLab repository file or directory.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/repositories.html // GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html
type TreeNode struct { type TreeNode struct {
ID string `json:"id"` ID string `json:"id"`
Name string `json:"name"` Name string `json:"name"`
...@@ -47,7 +47,7 @@ func (t TreeNode) String() string { ...@@ -47,7 +47,7 @@ func (t TreeNode) String() string {
// ListTreeOptions represents the available ListTree() options. // ListTreeOptions represents the available ListTree() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#list-repository-tree // https://docs.gitlab.com/ce/api/repositories.html#list-repository-tree
type ListTreeOptions struct { type ListTreeOptions struct {
Path *string `url:"path,omitempty" json:"path,omitempty"` Path *string `url:"path,omitempty" json:"path,omitempty"`
RefName *string `url:"ref_name,omitempty" json:"ref_name,omitempty"` RefName *string `url:"ref_name,omitempty" json:"ref_name,omitempty"`
...@@ -56,7 +56,7 @@ type ListTreeOptions struct { ...@@ -56,7 +56,7 @@ type ListTreeOptions struct {
// ListTree gets a list of repository files and directories in a project. // ListTree gets a list of repository files and directories in a project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#list-repository-tree // https://docs.gitlab.com/ce/api/repositories.html#list-repository-tree
func (s *RepositoriesService) ListTree( func (s *RepositoriesService) ListTree(
pid interface{}, pid interface{},
opt *ListTreeOptions) ([]*TreeNode, *Response, error) { opt *ListTreeOptions) ([]*TreeNode, *Response, error) {
...@@ -83,7 +83,7 @@ func (s *RepositoriesService) ListTree( ...@@ -83,7 +83,7 @@ func (s *RepositoriesService) ListTree(
// RawFileContentOptions represents the available RawFileContent() options. // RawFileContentOptions represents the available RawFileContent() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#raw-file-content // https://docs.gitlab.com/ce/api/repositories.html#raw-file-content
type RawFileContentOptions struct { type RawFileContentOptions struct {
FilePath *string `url:"filepath,omitempty" json:"filepath,omitempty"` FilePath *string `url:"filepath,omitempty" json:"filepath,omitempty"`
} }
...@@ -91,7 +91,7 @@ type RawFileContentOptions struct { ...@@ -91,7 +91,7 @@ type RawFileContentOptions struct {
// RawFileContent gets the raw file contents for a file by commit SHA and path // RawFileContent gets the raw file contents for a file by commit SHA and path
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#raw-file-content // https://docs.gitlab.com/ce/api/repositories.html#raw-file-content
func (s *RepositoriesService) RawFileContent( func (s *RepositoriesService) RawFileContent(
pid interface{}, pid interface{},
sha string, sha string,
...@@ -119,7 +119,7 @@ func (s *RepositoriesService) RawFileContent( ...@@ -119,7 +119,7 @@ func (s *RepositoriesService) RawFileContent(
// RawBlobContent gets the raw file contents for a blob by blob SHA. // RawBlobContent gets the raw file contents for a blob by blob SHA.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#raw-blob-content // https://docs.gitlab.com/ce/api/repositories.html#raw-blob-content
func (s *RepositoriesService) RawBlobContent( func (s *RepositoriesService) RawBlobContent(
pid interface{}, pid interface{},
sha string) ([]byte, *Response, error) { sha string) ([]byte, *Response, error) {
...@@ -146,7 +146,7 @@ func (s *RepositoriesService) RawBlobContent( ...@@ -146,7 +146,7 @@ func (s *RepositoriesService) RawBlobContent(
// ArchiveOptions represents the available Archive() options. // ArchiveOptions represents the available Archive() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#get-file-archive // https://docs.gitlab.com/ce/api/repositories.html#get-file-archive
type ArchiveOptions struct { type ArchiveOptions struct {
SHA *string `url:"sha,omitempty" json:"sha,omitempty"` SHA *string `url:"sha,omitempty" json:"sha,omitempty"`
} }
...@@ -154,7 +154,7 @@ type ArchiveOptions struct { ...@@ -154,7 +154,7 @@ type ArchiveOptions struct {
// Archive gets an archive of the repository. // Archive gets an archive of the repository.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#get-file-archive // https://docs.gitlab.com/ce/api/repositories.html#get-file-archive
func (s *RepositoriesService) Archive( func (s *RepositoriesService) Archive(
pid interface{}, pid interface{},
opt *ArchiveOptions) ([]byte, *Response, error) { opt *ArchiveOptions) ([]byte, *Response, error) {
...@@ -181,7 +181,7 @@ func (s *RepositoriesService) Archive( ...@@ -181,7 +181,7 @@ func (s *RepositoriesService) Archive(
// Compare represents the result of a comparison of branches, tags or commits. // Compare represents the result of a comparison of branches, tags or commits.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits // https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits
type Compare struct { type Compare struct {
Commit *Commit `json:"commit"` Commit *Commit `json:"commit"`
Commits []*Commit `json:"commits"` Commits []*Commit `json:"commits"`
...@@ -197,7 +197,7 @@ func (c Compare) String() string { ...@@ -197,7 +197,7 @@ func (c Compare) String() string {
// CompareOptions represents the available Compare() options. // CompareOptions represents the available Compare() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits // https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits
type CompareOptions struct { type CompareOptions struct {
From *string `url:"from,omitempty" json:"from,omitempty"` From *string `url:"from,omitempty" json:"from,omitempty"`
To *string `url:"to,omitempty" json:"to,omitempty"` To *string `url:"to,omitempty" json:"to,omitempty"`
...@@ -206,7 +206,7 @@ type CompareOptions struct { ...@@ -206,7 +206,7 @@ type CompareOptions struct {
// Compare compares branches, tags or commits. // Compare compares branches, tags or commits.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits // https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits
func (s *RepositoriesService) Compare( func (s *RepositoriesService) Compare(
pid interface{}, pid interface{},
opt *CompareOptions) (*Compare, *Response, error) { opt *CompareOptions) (*Compare, *Response, error) {
...@@ -232,7 +232,7 @@ func (s *RepositoriesService) Compare( ...@@ -232,7 +232,7 @@ func (s *RepositoriesService) Compare(
// Contributor represents a GitLap contributor. // Contributor represents a GitLap contributor.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/repositories.html#contributer // GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributer
type Contributor struct { type Contributor struct {
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
...@@ -247,7 +247,7 @@ func (c Contributor) String() string { ...@@ -247,7 +247,7 @@ func (c Contributor) String() string {
// Contributors gets the repository contributors list. // Contributors gets the repository contributors list.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/repositories.html#contributer // GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributer
func (s *RepositoriesService) Contributors(pid interface{}) ([]*Contributor, *Response, error) { func (s *RepositoriesService) Contributors(pid interface{}) ([]*Contributor, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -24,14 +24,14 @@ import ( ...@@ -24,14 +24,14 @@ import (
// RepositoryFilesService handles communication with the repository files // RepositoryFilesService handles communication with the repository files
// related methods of the GitLab API. // related methods of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/repository_files.html // GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html
type RepositoryFilesService struct { type RepositoryFilesService struct {
client *Client client *Client
} }
// File represents a GitLab repository file. // File represents a GitLab repository file.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/repository_files.html // GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html
type File struct { type File struct {
FileName string `json:"file_name"` FileName string `json:"file_name"`
FilePath string `json:"file_path"` FilePath string `json:"file_path"`
...@@ -50,7 +50,7 @@ func (r File) String() string { ...@@ -50,7 +50,7 @@ func (r File) String() string {
// GetFileOptions represents the available GetFile() options. // GetFileOptions represents the available GetFile() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#get-file-from-respository // https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-respository
type GetFileOptions struct { type GetFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"` FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
Ref *string `url:"ref,omitempty" json:"ref,omitempty"` Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
...@@ -60,7 +60,7 @@ type GetFileOptions struct { ...@@ -60,7 +60,7 @@ type GetFileOptions struct {
// name, size, content. Note that file content is Base64 encoded. // name, size, content. Note that file content is Base64 encoded.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#get-file-from-respository // https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-respository
func (s *RepositoryFilesService) GetFile( func (s *RepositoryFilesService) GetFile(
pid interface{}, pid interface{},
opt *GetFileOptions) (*File, *Response, error) { opt *GetFileOptions) (*File, *Response, error) {
...@@ -86,7 +86,7 @@ func (s *RepositoryFilesService) GetFile( ...@@ -86,7 +86,7 @@ func (s *RepositoryFilesService) GetFile(
// FileInfo represents file details of a GitLab repository file. // FileInfo represents file details of a GitLab repository file.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/repository_files.html // GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html
type FileInfo struct { type FileInfo struct {
FilePath string `json:"file_path"` FilePath string `json:"file_path"`
BranchName string `json:"branch_name"` BranchName string `json:"branch_name"`
...@@ -99,7 +99,7 @@ func (r FileInfo) String() string { ...@@ -99,7 +99,7 @@ func (r FileInfo) String() string {
// CreateFileOptions represents the available CreateFile() options. // CreateFileOptions represents the available CreateFile() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository // https://docs.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository
type CreateFileOptions struct { type CreateFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"` FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"` BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"`
...@@ -113,7 +113,7 @@ type CreateFileOptions struct { ...@@ -113,7 +113,7 @@ type CreateFileOptions struct {
// CreateFile creates a new file in a repository. // CreateFile creates a new file in a repository.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository // https://docs.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository
func (s *RepositoryFilesService) CreateFile( func (s *RepositoryFilesService) CreateFile(
pid interface{}, pid interface{},
opt *CreateFileOptions) (*FileInfo, *Response, error) { opt *CreateFileOptions) (*FileInfo, *Response, error) {
...@@ -140,7 +140,7 @@ func (s *RepositoryFilesService) CreateFile( ...@@ -140,7 +140,7 @@ func (s *RepositoryFilesService) CreateFile(
// UpdateFileOptions represents the available UpdateFile() options. // UpdateFileOptions represents the available UpdateFile() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository // https://docs.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository
type UpdateFileOptions struct { type UpdateFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"` FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"` BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"`
...@@ -154,7 +154,7 @@ type UpdateFileOptions struct { ...@@ -154,7 +154,7 @@ type UpdateFileOptions struct {
// UpdateFile updates an existing file in a repository // UpdateFile updates an existing file in a repository
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository // https://docs.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository
func (s *RepositoryFilesService) UpdateFile( func (s *RepositoryFilesService) UpdateFile(
pid interface{}, pid interface{},
opt *UpdateFileOptions) (*FileInfo, *Response, error) { opt *UpdateFileOptions) (*FileInfo, *Response, error) {
...@@ -181,7 +181,7 @@ func (s *RepositoryFilesService) UpdateFile( ...@@ -181,7 +181,7 @@ func (s *RepositoryFilesService) UpdateFile(
// DeleteFileOptions represents the available DeleteFile() options. // DeleteFileOptions represents the available DeleteFile() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository // https://docs.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository
type DeleteFileOptions struct { type DeleteFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"` FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"` BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"`
...@@ -193,7 +193,7 @@ type DeleteFileOptions struct { ...@@ -193,7 +193,7 @@ type DeleteFileOptions struct {
// DeleteFile deletes an existing file in a repository // DeleteFile deletes an existing file in a repository
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository // https://docs.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository
func (s *RepositoryFilesService) DeleteFile( func (s *RepositoryFilesService) DeleteFile(
pid interface{}, pid interface{},
opt *DeleteFileOptions) (*FileInfo, *Response, error) { opt *DeleteFileOptions) (*FileInfo, *Response, error) {
......
...@@ -25,7 +25,7 @@ import ( ...@@ -25,7 +25,7 @@ import (
// ServicesService handles communication with the services related methods of // ServicesService handles communication with the services related methods of
// the GitLab API. // the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/services.html // GitLab API docs: https://docs.gitlab.com/ce/api/services.html
type ServicesService struct { type ServicesService struct {
client *Client client *Client
} }
...@@ -47,7 +47,7 @@ type Service struct { ...@@ -47,7 +47,7 @@ type Service struct {
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-gitlab-ci-service // https://docs.gitlab.com/ce/api/services.html#edit-gitlab-ci-service
type SetGitLabCIServiceOptions struct { type SetGitLabCIServiceOptions struct {
Token *string `url:"token,omitempty" json:"token,omitempty"` Token *string `url:"token,omitempty" json:"token,omitempty"`
ProjectURL *string `url:"project_url,omitempty" json:"project_url,omitempty"` ProjectURL *string `url:"project_url,omitempty" json:"project_url,omitempty"`
...@@ -56,7 +56,7 @@ type SetGitLabCIServiceOptions struct { ...@@ -56,7 +56,7 @@ type SetGitLabCIServiceOptions struct {
// SetGitLabCIService sets GitLab CI service for a project. // SetGitLabCIService sets GitLab CI service for a project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-gitlab-ci-service // https://docs.gitlab.com/ce/api/services.html#edit-gitlab-ci-service
func (s *ServicesService) SetGitLabCIService( func (s *ServicesService) SetGitLabCIService(
pid interface{}, pid interface{},
opt *SetGitLabCIServiceOptions) (*Response, error) { opt *SetGitLabCIServiceOptions) (*Response, error) {
...@@ -77,7 +77,7 @@ func (s *ServicesService) SetGitLabCIService( ...@@ -77,7 +77,7 @@ func (s *ServicesService) SetGitLabCIService(
// DeleteGitLabCIService deletes GitLab CI service settings for a project. // DeleteGitLabCIService deletes GitLab CI service settings for a project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#delete-gitlab-ci-service // https://docs.gitlab.com/ce/api/services.html#delete-gitlab-ci-service
func (s *ServicesService) DeleteGitLabCIService(pid interface{}) (*Response, error) { func (s *ServicesService) DeleteGitLabCIService(pid interface{}) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -97,7 +97,7 @@ func (s *ServicesService) DeleteGitLabCIService(pid interface{}) (*Response, err ...@@ -97,7 +97,7 @@ func (s *ServicesService) DeleteGitLabCIService(pid interface{}) (*Response, err
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-hipchat-service // https://docs.gitlab.com/ce/api/services.html#edit-hipchat-service
type SetHipChatServiceOptions struct { type SetHipChatServiceOptions struct {
Token *string `url:"token,omitempty" json:"token,omitempty" ` Token *string `url:"token,omitempty" json:"token,omitempty" `
Room *string `url:"room,omitempty" json:"room,omitempty"` Room *string `url:"room,omitempty" json:"room,omitempty"`
...@@ -106,7 +106,7 @@ type SetHipChatServiceOptions struct { ...@@ -106,7 +106,7 @@ type SetHipChatServiceOptions struct {
// SetHipChatService sets HipChat service for a project // SetHipChatService sets HipChat service for a project
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-hipchat-service // https://docs.gitlab.com/ce/api/services.html#edit-hipchat-service
func (s *ServicesService) SetHipChatService( func (s *ServicesService) SetHipChatService(
pid interface{}, pid interface{},
opt *SetHipChatServiceOptions) (*Response, error) { opt *SetHipChatServiceOptions) (*Response, error) {
...@@ -127,7 +127,7 @@ func (s *ServicesService) SetHipChatService( ...@@ -127,7 +127,7 @@ func (s *ServicesService) SetHipChatService(
// DeleteHipChatService deletes HipChat service for project. // DeleteHipChatService deletes HipChat service for project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#delete-hipchat-service // https://docs.gitlab.com/ce/api/services.html#delete-hipchat-service
func (s *ServicesService) DeleteHipChatService(pid interface{}) (*Response, error) { func (s *ServicesService) DeleteHipChatService(pid interface{}) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -147,7 +147,7 @@ func (s *ServicesService) DeleteHipChatService(pid interface{}) (*Response, erro ...@@ -147,7 +147,7 @@ func (s *ServicesService) DeleteHipChatService(pid interface{}) (*Response, erro
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#createedit-drone-ci-service // https://docs.gitlab.com/ce/api/services.html#createedit-drone-ci-service
type SetDroneCIServiceOptions struct { type SetDroneCIServiceOptions struct {
Token *string `url:"token" json:"token" ` Token *string `url:"token" json:"token" `
DroneURL *string `url:"drone_url" json:"drone_url"` DroneURL *string `url:"drone_url" json:"drone_url"`
...@@ -157,7 +157,7 @@ type SetDroneCIServiceOptions struct { ...@@ -157,7 +157,7 @@ type SetDroneCIServiceOptions struct {
// SetDroneCIService sets Drone CI service for a project. // SetDroneCIService sets Drone CI service for a project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#createedit-drone-ci-service // https://docs.gitlab.com/ce/api/services.html#createedit-drone-ci-service
func (s *ServicesService) SetDroneCIService( func (s *ServicesService) SetDroneCIService(
pid interface{}, pid interface{},
opt *SetDroneCIServiceOptions) (*Response, error) { opt *SetDroneCIServiceOptions) (*Response, error) {
...@@ -178,7 +178,7 @@ func (s *ServicesService) SetDroneCIService( ...@@ -178,7 +178,7 @@ func (s *ServicesService) SetDroneCIService(
// DeleteDroneCIService deletes Drone CI service settings for a project. // DeleteDroneCIService deletes Drone CI service settings for a project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#delete-drone-ci-service // https://docs.gitlab.com/ce/api/services.html#delete-drone-ci-service
func (s *ServicesService) DeleteDroneCIService(pid interface{}) (*Response, error) { func (s *ServicesService) DeleteDroneCIService(pid interface{}) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -210,7 +210,7 @@ type DroneCIService struct { ...@@ -210,7 +210,7 @@ type DroneCIService struct {
// GetDroneCIService gets Drone CI service settings for a project. // GetDroneCIService gets Drone CI service settings for a project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#get-drone-ci-service-settings // https://docs.gitlab.com/ce/api/services.html#get-drone-ci-service-settings
func (s *ServicesService) GetDroneCIService(pid interface{}) (*DroneCIService, *Response, error) { func (s *ServicesService) GetDroneCIService(pid interface{}) (*DroneCIService, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -236,7 +236,7 @@ func (s *ServicesService) GetDroneCIService(pid interface{}) (*DroneCIService, * ...@@ -236,7 +236,7 @@ func (s *ServicesService) GetDroneCIService(pid interface{}) (*DroneCIService, *
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-slack-service // https://docs.gitlab.com/ce/api/services.html#edit-slack-service
type SetSlackServiceOptions struct { type SetSlackServiceOptions struct {
WebHook *string `url:"webhook,omitempty" json:"webhook,omitempty" ` WebHook *string `url:"webhook,omitempty" json:"webhook,omitempty" `
Username *string `url:"username,omitempty" json:"username,omitempty" ` Username *string `url:"username,omitempty" json:"username,omitempty" `
...@@ -246,7 +246,7 @@ type SetSlackServiceOptions struct { ...@@ -246,7 +246,7 @@ type SetSlackServiceOptions struct {
// SetSlackService sets Slack service for a project // SetSlackService sets Slack service for a project
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-slack-service // https://docs.gitlab.com/ce/api/services.html#edit-slack-service
func (s *ServicesService) SetSlackService( func (s *ServicesService) SetSlackService(
pid interface{}, pid interface{},
opt *SetSlackServiceOptions) (*Response, error) { opt *SetSlackServiceOptions) (*Response, error) {
...@@ -267,7 +267,7 @@ func (s *ServicesService) SetSlackService( ...@@ -267,7 +267,7 @@ func (s *ServicesService) SetSlackService(
// DeleteSlackService deletes Slack service for project. // DeleteSlackService deletes Slack service for project.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#delete-slack-service // https://docs.gitlab.com/ce/api/services.html#delete-slack-service
func (s *ServicesService) DeleteSlackService(pid interface{}) (*Response, error) { func (s *ServicesService) DeleteSlackService(pid interface{}) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -21,14 +21,14 @@ import "time" ...@@ -21,14 +21,14 @@ import "time"
// SessionService handles communication with the session related methods of // SessionService handles communication with the session related methods of
// the GitLab API. // the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/session.html // GitLab API docs: https://docs.gitlab.com/ce/api/session.html
type SessionService struct { type SessionService struct {
client *Client client *Client
} }
// Session represents a GitLab session. // Session represents a GitLab session.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/session.html#session // GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session
type Session struct { type Session struct {
ID int `json:"id"` ID int `json:"id"`
Username string `json:"username"` Username string `json:"username"`
...@@ -52,7 +52,7 @@ type Session struct { ...@@ -52,7 +52,7 @@ type Session struct {
// GetSessionOptions represents the available Session() options. // GetSessionOptions represents the available Session() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/session.html#session // GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session
type GetSessionOptions struct { type GetSessionOptions struct {
Login *string `url:"login,omitempty" json:"login,omitempty"` Login *string `url:"login,omitempty" json:"login,omitempty"`
Email *string `url:"email,omitempty" json:"email,omitempty"` Email *string `url:"email,omitempty" json:"email,omitempty"`
...@@ -61,7 +61,7 @@ type GetSessionOptions struct { ...@@ -61,7 +61,7 @@ type GetSessionOptions struct {
// GetSession logs in to get private token. // GetSession logs in to get private token.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/session.html#session // GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session
func (s *SessionService) GetSession(opt *GetSessionOptions) (*Session, *Response, error) { func (s *SessionService) GetSession(opt *GetSessionOptions) (*Session, *Response, error) {
req, err := s.client.NewRequest("POST", "session", opt) req, err := s.client.NewRequest("POST", "session", opt)
if err != nil { if err != nil {
......
...@@ -21,14 +21,14 @@ import "time" ...@@ -21,14 +21,14 @@ import "time"
// SettingsService handles communication with the application SettingsService // SettingsService handles communication with the application SettingsService
// related methods of the GitLab API. // related methods of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/settings.html // GitLab API docs: https://docs.gitlab.com/ce/api/settings.html
type SettingsService struct { type SettingsService struct {
client *Client client *Client
} }
// Settings represents the GitLab application settings. // Settings represents the GitLab application settings.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/settings.html // GitLab API docs: https://docs.gitlab.com/ce/api/settings.html
type Settings struct { type Settings struct {
ID int `json:"id"` ID int `json:"id"`
DefaultProjectsLimit int `json:"default_projects_limit"` DefaultProjectsLimit int `json:"default_projects_limit"`
...@@ -58,7 +58,7 @@ func (s Settings) String() string { ...@@ -58,7 +58,7 @@ func (s Settings) String() string {
// GetSettings gets the current application settings. // GetSettings gets the current application settings.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/settings.html#get-current-application.settings // https://docs.gitlab.com/ce/api/settings.html#get-current-application.settings
func (s *SettingsService) GetSettings() (*Settings, *Response, error) { func (s *SettingsService) GetSettings() (*Settings, *Response, error) {
req, err := s.client.NewRequest("GET", "application/settings", nil) req, err := s.client.NewRequest("GET", "application/settings", nil)
if err != nil { if err != nil {
...@@ -77,7 +77,7 @@ func (s *SettingsService) GetSettings() (*Settings, *Response, error) { ...@@ -77,7 +77,7 @@ func (s *SettingsService) GetSettings() (*Settings, *Response, error) {
// UpdateSettingsOptions represents the available UpdateSettings() options. // UpdateSettingsOptions represents the available UpdateSettings() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/settings.html#change-application.settings // https://docs.gitlab.com/ce/api/settings.html#change-application.settings
type UpdateSettingsOptions struct { type UpdateSettingsOptions struct {
DefaultProjectsLimit *int `url:"default_projects_limit,omitempty" json:"default_projects_limit,omitempty"` DefaultProjectsLimit *int `url:"default_projects_limit,omitempty" json:"default_projects_limit,omitempty"`
SignupEnabled *bool `url:"signup_enabled,omitempty" json:"signup_enabled,omitempty"` SignupEnabled *bool `url:"signup_enabled,omitempty" json:"signup_enabled,omitempty"`
...@@ -100,7 +100,7 @@ type UpdateSettingsOptions struct { ...@@ -100,7 +100,7 @@ type UpdateSettingsOptions struct {
// UpdateSettings updates the application settings. // UpdateSettings updates the application settings.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/settings.html#change-application.settings // https://docs.gitlab.com/ce/api/settings.html#change-application.settings
func (s *SettingsService) UpdateSettings(opt *UpdateSettingsOptions) (*Settings, *Response, error) { func (s *SettingsService) UpdateSettings(opt *UpdateSettingsOptions) (*Settings, *Response, error) {
req, err := s.client.NewRequest("PUT", "application/settings", opt) req, err := s.client.NewRequest("PUT", "application/settings", opt)
if err != nil { if err != nil {
......
...@@ -24,14 +24,14 @@ import ( ...@@ -24,14 +24,14 @@ import (
// SystemHooksService handles communication with the system hooks related // SystemHooksService handles communication with the system hooks related
// methods of the GitLab API. // methods of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/system_hooks.html // GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html
type SystemHooksService struct { type SystemHooksService struct {
client *Client client *Client
} }
// Hook represents a GitLap system hook. // Hook represents a GitLap system hook.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/system_hooks.html // GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html
type Hook struct { type Hook struct {
ID int `json:"id"` ID int `json:"id"`
URL string `json:"url"` URL string `json:"url"`
...@@ -45,7 +45,7 @@ func (h Hook) String() string { ...@@ -45,7 +45,7 @@ func (h Hook) String() string {
// ListHooks gets a list of system hooks. // ListHooks gets a list of system hooks.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/system_hooks.html#list-system-hooks // https://docs.gitlab.com/ce/api/system_hooks.html#list-system-hooks
func (s *SystemHooksService) ListHooks() ([]*Hook, *Response, error) { func (s *SystemHooksService) ListHooks() ([]*Hook, *Response, error) {
req, err := s.client.NewRequest("GET", "hooks", nil) req, err := s.client.NewRequest("GET", "hooks", nil)
if err != nil { if err != nil {
...@@ -64,7 +64,7 @@ func (s *SystemHooksService) ListHooks() ([]*Hook, *Response, error) { ...@@ -64,7 +64,7 @@ func (s *SystemHooksService) ListHooks() ([]*Hook, *Response, error) {
// AddHookOptions represents the available AddHook() options. // AddHookOptions represents the available AddHook() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook // https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook
type AddHookOptions struct { type AddHookOptions struct {
URL *string `url:"url,omitempty" json:"url,omitempty"` URL *string `url:"url,omitempty" json:"url,omitempty"`
} }
...@@ -72,7 +72,7 @@ type AddHookOptions struct { ...@@ -72,7 +72,7 @@ type AddHookOptions struct {
// AddHook adds a new system hook hook. // AddHook adds a new system hook hook.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook // https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook
func (s *SystemHooksService) AddHook(opt *AddHookOptions) (*Hook, *Response, error) { func (s *SystemHooksService) AddHook(opt *AddHookOptions) (*Hook, *Response, error) {
req, err := s.client.NewRequest("POST", "hooks", opt) req, err := s.client.NewRequest("POST", "hooks", opt)
if err != nil { if err != nil {
...@@ -90,7 +90,7 @@ func (s *SystemHooksService) AddHook(opt *AddHookOptions) (*Hook, *Response, err ...@@ -90,7 +90,7 @@ func (s *SystemHooksService) AddHook(opt *AddHookOptions) (*Hook, *Response, err
// HookEvent represents an event triggert by a GitLab system hook. // HookEvent represents an event triggert by a GitLab system hook.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/system_hooks.html // GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html
type HookEvent struct { type HookEvent struct {
EventName string `json:"event_name"` EventName string `json:"event_name"`
Name string `json:"name"` Name string `json:"name"`
...@@ -107,7 +107,7 @@ func (h HookEvent) String() string { ...@@ -107,7 +107,7 @@ func (h HookEvent) String() string {
// TestHook tests a system hook. // TestHook tests a system hook.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/system_hooks.html#test-system-hook // https://docs.gitlab.com/ce/api/system_hooks.html#test-system-hook
func (s *SystemHooksService) TestHook(hook int) (*HookEvent, *Response, error) { func (s *SystemHooksService) TestHook(hook int) (*HookEvent, *Response, error) {
u := fmt.Sprintf("hooks/%d", hook) u := fmt.Sprintf("hooks/%d", hook)
...@@ -130,7 +130,7 @@ func (s *SystemHooksService) TestHook(hook int) (*HookEvent, *Response, error) { ...@@ -130,7 +130,7 @@ func (s *SystemHooksService) TestHook(hook int) (*HookEvent, *Response, error) {
// is also returned as JSON. // is also returned as JSON.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/system_hooks.html#delete-system-hook // https://docs.gitlab.com/ce/api/system_hooks.html#delete-system-hook
func (s *SystemHooksService) DeleteHook(hook int) (*Response, error) { func (s *SystemHooksService) DeleteHook(hook int) (*Response, error) {
u := fmt.Sprintf("hooks/%d", hook) u := fmt.Sprintf("hooks/%d", hook)
......
...@@ -24,14 +24,14 @@ import ( ...@@ -24,14 +24,14 @@ import (
// TagsService handles communication with the tags related methods // TagsService handles communication with the tags related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/tags.html // GitLab API docs: https://docs.gitlab.com/ce/api/tags.html
type TagsService struct { type TagsService struct {
client *Client client *Client
} }
// Tag represents a GitLab tag. // Tag represents a GitLab tag.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/tags.html // GitLab API docs: https://docs.gitlab.com/ce/api/tags.html
type Tag struct { type Tag struct {
Commit *Commit `json:"commit"` Commit *Commit `json:"commit"`
Name string `json:"name"` Name string `json:"name"`
...@@ -97,7 +97,7 @@ func (s *TagsService) GetSingleTag(pid interface{}, tag string) (*Tag, *Response ...@@ -97,7 +97,7 @@ func (s *TagsService) GetSingleTag(pid interface{}, tag string) (*Tag, *Response
// CreateTagOptions represents the available CreateTag() options. // CreateTagOptions represents the available CreateTag() options.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/tags.html#create-a-new-tag // https://docs.gitlab.com/ce/api/tags.html#create-a-new-tag
type CreateTagOptions struct { type CreateTagOptions struct {
TagName *string `url:"tag_name,omitempty" json:"tag_name,omitempty"` TagName *string `url:"tag_name,omitempty" json:"tag_name,omitempty"`
Ref *string `url:"ref,omitempty" json:"ref,omitempty"` Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
......
...@@ -25,14 +25,14 @@ import ( ...@@ -25,14 +25,14 @@ import (
// UsersService handles communication with the user related methods of // UsersService handles communication with the user related methods of
// the GitLab API. // the GitLab API.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html // GitLab API docs: https://docs.gitlab.com/ce/api/users.html
type UsersService struct { type UsersService struct {
client *Client client *Client
} }
// User represents a GitLab user. // User represents a GitLab user.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html // GitLab API docs: https://docs.gitlab.com/ce/api/users.html
type User struct { type User struct {
ID int `json:"id"` ID int `json:"id"`
Username string `json:"username"` Username string `json:"username"`
...@@ -68,7 +68,7 @@ type UserIdentity struct { ...@@ -68,7 +68,7 @@ type UserIdentity struct {
// ListUsersOptions represents the available ListUsers() options. // ListUsersOptions represents the available ListUsers() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#list-users // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-users
type ListUsersOptions struct { type ListUsersOptions struct {
ListOptions ListOptions
Active *bool `url:"active,omitempty" json:"active,omitempty"` Active *bool `url:"active,omitempty" json:"active,omitempty"`
...@@ -78,7 +78,7 @@ type ListUsersOptions struct { ...@@ -78,7 +78,7 @@ type ListUsersOptions struct {
// ListUsers gets a list of users. // ListUsers gets a list of users.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#list-users // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-users
func (s *UsersService) ListUsers(opt *ListUsersOptions) ([]*User, *Response, error) { func (s *UsersService) ListUsers(opt *ListUsersOptions) ([]*User, *Response, error) {
req, err := s.client.NewRequest("GET", "users", opt) req, err := s.client.NewRequest("GET", "users", opt)
if err != nil { if err != nil {
...@@ -96,7 +96,7 @@ func (s *UsersService) ListUsers(opt *ListUsersOptions) ([]*User, *Response, err ...@@ -96,7 +96,7 @@ func (s *UsersService) ListUsers(opt *ListUsersOptions) ([]*User, *Response, err
// GetUser gets a single user. // GetUser gets a single user.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#single-user // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#single-user
func (s *UsersService) GetUser(user int) (*User, *Response, error) { func (s *UsersService) GetUser(user int) (*User, *Response, error) {
u := fmt.Sprintf("users/%d", user) u := fmt.Sprintf("users/%d", user)
...@@ -116,7 +116,7 @@ func (s *UsersService) GetUser(user int) (*User, *Response, error) { ...@@ -116,7 +116,7 @@ func (s *UsersService) GetUser(user int) (*User, *Response, error) {
// CreateUserOptions represents the available CreateUser() options. // CreateUserOptions represents the available CreateUser() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#user-creation // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-creation
type CreateUserOptions struct { type CreateUserOptions struct {
Email *string `url:"email,omitempty" json:"email,omitempty"` Email *string `url:"email,omitempty" json:"email,omitempty"`
Password *string `url:"password,omitempty" json:"password,omitempty"` Password *string `url:"password,omitempty" json:"password,omitempty"`
...@@ -137,7 +137,7 @@ type CreateUserOptions struct { ...@@ -137,7 +137,7 @@ type CreateUserOptions struct {
// CreateUser creates a new user. Note only administrators can create new users. // CreateUser creates a new user. Note only administrators can create new users.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#user-creation // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-creation
func (s *UsersService) CreateUser(opt *CreateUserOptions) (*User, *Response, error) { func (s *UsersService) CreateUser(opt *CreateUserOptions) (*User, *Response, error) {
req, err := s.client.NewRequest("POST", "users", opt) req, err := s.client.NewRequest("POST", "users", opt)
if err != nil { if err != nil {
...@@ -155,7 +155,7 @@ func (s *UsersService) CreateUser(opt *CreateUserOptions) (*User, *Response, err ...@@ -155,7 +155,7 @@ func (s *UsersService) CreateUser(opt *CreateUserOptions) (*User, *Response, err
// ModifyUserOptions represents the available ModifyUser() options. // ModifyUserOptions represents the available ModifyUser() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#user-modification // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-modification
type ModifyUserOptions struct { type ModifyUserOptions struct {
Email *string `url:"email,omitempty" json:"email,omitempty"` Email *string `url:"email,omitempty" json:"email,omitempty"`
Password *string `url:"password,omitempty" json:"password,omitempty"` Password *string `url:"password,omitempty" json:"password,omitempty"`
...@@ -176,7 +176,7 @@ type ModifyUserOptions struct { ...@@ -176,7 +176,7 @@ type ModifyUserOptions struct {
// ModifyUser modifies an existing user. Only administrators can change attributes // ModifyUser modifies an existing user. Only administrators can change attributes
// of a user. // of a user.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#user-modification // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-modification
func (s *UsersService) ModifyUser(user int, opt *ModifyUserOptions) (*User, *Response, error) { func (s *UsersService) ModifyUser(user int, opt *ModifyUserOptions) (*User, *Response, error) {
u := fmt.Sprintf("users/%d", user) u := fmt.Sprintf("users/%d", user)
...@@ -200,7 +200,7 @@ func (s *UsersService) ModifyUser(user int, opt *ModifyUserOptions) (*User, *Res ...@@ -200,7 +200,7 @@ func (s *UsersService) ModifyUser(user int, opt *ModifyUserOptions) (*User, *Res
// actually deleted or not. In the former the user is returned and in the // actually deleted or not. In the former the user is returned and in the
// latter not. // latter not.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#user-deletion // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-deletion
func (s *UsersService) DeleteUser(user int) (*Response, error) { func (s *UsersService) DeleteUser(user int) (*Response, error) {
u := fmt.Sprintf("users/%d", user) u := fmt.Sprintf("users/%d", user)
...@@ -214,7 +214,7 @@ func (s *UsersService) DeleteUser(user int) (*Response, error) { ...@@ -214,7 +214,7 @@ func (s *UsersService) DeleteUser(user int) (*Response, error) {
// CurrentUser gets currently authenticated user. // CurrentUser gets currently authenticated user.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#current-user // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#current-user
func (s *UsersService) CurrentUser() (*User, *Response, error) { func (s *UsersService) CurrentUser() (*User, *Response, error) {
req, err := s.client.NewRequest("GET", "user", nil) req, err := s.client.NewRequest("GET", "user", nil)
if err != nil { if err != nil {
...@@ -232,7 +232,7 @@ func (s *UsersService) CurrentUser() (*User, *Response, error) { ...@@ -232,7 +232,7 @@ func (s *UsersService) CurrentUser() (*User, *Response, error) {
// SSHKey represents a SSH key. // SSHKey represents a SSH key.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#list-ssh-keys // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-ssh-keys
type SSHKey struct { type SSHKey struct {
ID int `json:"id"` ID int `json:"id"`
Title string `json:"title"` Title string `json:"title"`
...@@ -242,7 +242,7 @@ type SSHKey struct { ...@@ -242,7 +242,7 @@ type SSHKey struct {
// ListSSHKeys gets a list of currently authenticated user's SSH keys. // ListSSHKeys gets a list of currently authenticated user's SSH keys.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#list-ssh-keys // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-ssh-keys
func (s *UsersService) ListSSHKeys() ([]*SSHKey, *Response, error) { func (s *UsersService) ListSSHKeys() ([]*SSHKey, *Response, error) {
req, err := s.client.NewRequest("GET", "user/keys", nil) req, err := s.client.NewRequest("GET", "user/keys", nil)
if err != nil { if err != nil {
...@@ -262,7 +262,7 @@ func (s *UsersService) ListSSHKeys() ([]*SSHKey, *Response, error) { ...@@ -262,7 +262,7 @@ func (s *UsersService) ListSSHKeys() ([]*SSHKey, *Response, error) {
// only for admin // only for admin
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/users.html#list-ssh-keys-for-user // https://docs.gitlab.com/ce/api/users.html#list-ssh-keys-for-user
func (s *UsersService) ListSSHKeysForUser(user int) ([]*SSHKey, *Response, error) { func (s *UsersService) ListSSHKeysForUser(user int) ([]*SSHKey, *Response, error) {
u := fmt.Sprintf("users/%d/keys", user) u := fmt.Sprintf("users/%d/keys", user)
...@@ -282,7 +282,7 @@ func (s *UsersService) ListSSHKeysForUser(user int) ([]*SSHKey, *Response, error ...@@ -282,7 +282,7 @@ func (s *UsersService) ListSSHKeysForUser(user int) ([]*SSHKey, *Response, error
// GetSSHKey gets a single key. // GetSSHKey gets a single key.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#single-ssh-key // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#single-ssh-key
func (s *UsersService) GetSSHKey(kid int) (*SSHKey, *Response, error) { func (s *UsersService) GetSSHKey(kid int) (*SSHKey, *Response, error) {
u := fmt.Sprintf("user/keys/%d", kid) u := fmt.Sprintf("user/keys/%d", kid)
...@@ -302,7 +302,7 @@ func (s *UsersService) GetSSHKey(kid int) (*SSHKey, *Response, error) { ...@@ -302,7 +302,7 @@ func (s *UsersService) GetSSHKey(kid int) (*SSHKey, *Response, error) {
// AddSSHKeyOptions represents the available AddSSHKey() options. // AddSSHKeyOptions represents the available AddSSHKey() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#add-ssh-key // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#add-ssh-key
type AddSSHKeyOptions struct { type AddSSHKeyOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Key *string `url:"key,omitempty" json:"key,omitempty"` Key *string `url:"key,omitempty" json:"key,omitempty"`
...@@ -310,7 +310,7 @@ type AddSSHKeyOptions struct { ...@@ -310,7 +310,7 @@ type AddSSHKeyOptions struct {
// AddSSHKey creates a new key owned by the currently authenticated user. // AddSSHKey creates a new key owned by the currently authenticated user.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#add-ssh-key // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-ssh-key
func (s *UsersService) AddSSHKey(opt *AddSSHKeyOptions) (*SSHKey, *Response, error) { func (s *UsersService) AddSSHKey(opt *AddSSHKeyOptions) (*SSHKey, *Response, error) {
req, err := s.client.NewRequest("POST", "user/keys", opt) req, err := s.client.NewRequest("POST", "user/keys", opt)
if err != nil { if err != nil {
...@@ -329,7 +329,7 @@ func (s *UsersService) AddSSHKey(opt *AddSSHKeyOptions) (*SSHKey, *Response, err ...@@ -329,7 +329,7 @@ func (s *UsersService) AddSSHKey(opt *AddSSHKeyOptions) (*SSHKey, *Response, err
// AddSSHKeyForUser creates new key owned by specified user. Available only for // AddSSHKeyForUser creates new key owned by specified user. Available only for
// admin. // admin.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#add-ssh-key-for-user // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-ssh-key-for-user
func (s *UsersService) AddSSHKeyForUser( func (s *UsersService) AddSSHKeyForUser(
user int, user int,
opt *AddSSHKeyOptions) (*SSHKey, *Response, error) { opt *AddSSHKeyOptions) (*SSHKey, *Response, error) {
...@@ -354,7 +354,7 @@ func (s *UsersService) AddSSHKeyForUser( ...@@ -354,7 +354,7 @@ func (s *UsersService) AddSSHKeyForUser(
// available results in 200 OK. // available results in 200 OK.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/users.html#delete-ssh-key-for-current-owner // https://docs.gitlab.com/ce/api/users.html#delete-ssh-key-for-current-owner
func (s *UsersService) DeleteSSHKey(kid int) (*Response, error) { func (s *UsersService) DeleteSSHKey(kid int) (*Response, error) {
u := fmt.Sprintf("user/keys/%d", kid) u := fmt.Sprintf("user/keys/%d", kid)
...@@ -370,7 +370,7 @@ func (s *UsersService) DeleteSSHKey(kid int) (*Response, error) { ...@@ -370,7 +370,7 @@ func (s *UsersService) DeleteSSHKey(kid int) (*Response, error) {
// for admin. // for admin.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/users.html#delete-ssh-key-for-given-user // https://docs.gitlab.com/ce/api/users.html#delete-ssh-key-for-given-user
func (s *UsersService) DeleteSSHKeyForUser(user int, kid int) (*Response, error) { func (s *UsersService) DeleteSSHKeyForUser(user int, kid int) (*Response, error) {
u := fmt.Sprintf("users/%d/keys/%d", user, kid) u := fmt.Sprintf("users/%d/keys/%d", user, kid)
...@@ -384,7 +384,7 @@ func (s *UsersService) DeleteSSHKeyForUser(user int, kid int) (*Response, error) ...@@ -384,7 +384,7 @@ func (s *UsersService) DeleteSSHKeyForUser(user int, kid int) (*Response, error)
// BlockUser blocks the specified user. Available only for admin. // BlockUser blocks the specified user. Available only for admin.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#block-user // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#block-user
func (s *UsersService) BlockUser(user int) error { func (s *UsersService) BlockUser(user int) error {
u := fmt.Sprintf("users/%d/block", user) u := fmt.Sprintf("users/%d/block", user)
...@@ -412,7 +412,7 @@ func (s *UsersService) BlockUser(user int) error { ...@@ -412,7 +412,7 @@ func (s *UsersService) BlockUser(user int) error {
// UnblockUser unblocks the specified user. Available only for admin. // UnblockUser unblocks the specified user. Available only for admin.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#unblock-user // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#unblock-user
func (s *UsersService) UnblockUser(user int) error { func (s *UsersService) UnblockUser(user int) error {
u := fmt.Sprintf("users/%d/unblock", user) u := fmt.Sprintf("users/%d/unblock", user)
...@@ -448,7 +448,7 @@ type Email struct { ...@@ -448,7 +448,7 @@ type Email struct {
// ListEmails gets a list of currently authenticated user's Emails. // ListEmails gets a list of currently authenticated user's Emails.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#list-emails // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-emails
func (s *UsersService) ListEmails() ([]*Email, *Response, error) { func (s *UsersService) ListEmails() ([]*Email, *Response, error) {
req, err := s.client.NewRequest("GET", "user/emails", nil) req, err := s.client.NewRequest("GET", "user/emails", nil)
if err != nil { if err != nil {
...@@ -468,7 +468,7 @@ func (s *UsersService) ListEmails() ([]*Email, *Response, error) { ...@@ -468,7 +468,7 @@ func (s *UsersService) ListEmails() ([]*Email, *Response, error) {
// only for admin // only for admin
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/users.html#list-emails-for-user // https://docs.gitlab.com/ce/api/users.html#list-emails-for-user
func (s *UsersService) ListEmailsForUser(uid int) ([]*Email, *Response, error) { func (s *UsersService) ListEmailsForUser(uid int) ([]*Email, *Response, error) {
u := fmt.Sprintf("users/%d/emails", uid) u := fmt.Sprintf("users/%d/emails", uid)
...@@ -488,7 +488,7 @@ func (s *UsersService) ListEmailsForUser(uid int) ([]*Email, *Response, error) { ...@@ -488,7 +488,7 @@ func (s *UsersService) ListEmailsForUser(uid int) ([]*Email, *Response, error) {
// GetEmail gets a single email. // GetEmail gets a single email.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#single-email // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#single-email
func (s *UsersService) GetEmail(eid int) (*Email, *Response, error) { func (s *UsersService) GetEmail(eid int) (*Email, *Response, error) {
u := fmt.Sprintf("user/emails/%d", eid) u := fmt.Sprintf("user/emails/%d", eid)
...@@ -508,14 +508,14 @@ func (s *UsersService) GetEmail(eid int) (*Email, *Response, error) { ...@@ -508,14 +508,14 @@ func (s *UsersService) GetEmail(eid int) (*Email, *Response, error) {
// AddEmailOptions represents the available AddEmail() options. // AddEmailOptions represents the available AddEmail() options.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#add-email // GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#add-email
type AddEmailOptions struct { type AddEmailOptions struct {
Email *string `url:"email,omitempty" json:"email,omitempty"` Email *string `url:"email,omitempty" json:"email,omitempty"`
} }
// AddEmail creates a new email owned by the currently authenticated user. // AddEmail creates a new email owned by the currently authenticated user.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#add-email // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-email
func (s *UsersService) AddEmail(opt *AddEmailOptions) (*Email, *Response, error) { func (s *UsersService) AddEmail(opt *AddEmailOptions) (*Email, *Response, error) {
req, err := s.client.NewRequest("POST", "user/emails", opt) req, err := s.client.NewRequest("POST", "user/emails", opt)
if err != nil { if err != nil {
...@@ -534,7 +534,7 @@ func (s *UsersService) AddEmail(opt *AddEmailOptions) (*Email, *Response, error) ...@@ -534,7 +534,7 @@ func (s *UsersService) AddEmail(opt *AddEmailOptions) (*Email, *Response, error)
// AddEmailForUser creates new email owned by specified user. Available only for // AddEmailForUser creates new email owned by specified user. Available only for
// admin. // admin.
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/users.html#add-email-for-user // GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-email-for-user
func (s *UsersService) AddEmailForUser( func (s *UsersService) AddEmailForUser(
uid int, uid int,
opt *AddEmailOptions) (*Email, *Response, error) { opt *AddEmailOptions) (*Email, *Response, error) {
...@@ -559,7 +559,7 @@ func (s *UsersService) AddEmailForUser( ...@@ -559,7 +559,7 @@ func (s *UsersService) AddEmailForUser(
// available results in 200 OK. // available results in 200 OK.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/users.html#delete-email-for-current-owner // https://docs.gitlab.com/ce/api/users.html#delete-email-for-current-owner
func (s *UsersService) DeleteEmail(eid int) (*Response, error) { func (s *UsersService) DeleteEmail(eid int) (*Response, error) {
u := fmt.Sprintf("user/emails/%d", eid) u := fmt.Sprintf("user/emails/%d", eid)
...@@ -575,7 +575,7 @@ func (s *UsersService) DeleteEmail(eid int) (*Response, error) { ...@@ -575,7 +575,7 @@ func (s *UsersService) DeleteEmail(eid int) (*Response, error) {
// for admin. // for admin.
// //
// GitLab API docs: // GitLab API docs:
// http://doc.gitlab.com/ce/api/users.html#delete-email-for-given-user // https://docs.gitlab.com/ce/api/users.html#delete-email-for-given-user
func (s *UsersService) DeleteEmailForUser(uid int, eid int) (*Response, error) { func (s *UsersService) DeleteEmailForUser(uid int, eid int) (*Response, error) {
u := fmt.Sprintf("users/%d/emails/%d", uid, eid) u := fmt.Sprintf("users/%d/emails/%d", uid, eid)
......
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