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