package
2.0.0-alpha+incompatible
Repository: https://github.com/samkreter/vsts-goclient.git
Documentation: pkg.go.dev
# README
Go API client for swagger
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
Overview
This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.
- API version: 5.0-preview
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.GoClientCodegen
Installation
Put the package under your project folder and add the following in import:
import "./swagger"
Documentation for API Endpoints
All URIs are relative to https://fabrikam-fiber-inc.visualstudio.com
Class | Method | HTTP request | Description |
---|---|---|---|
AnnotatedTagsApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/annotatedtags | |
AnnotatedTagsApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/annotatedtags/{objectId} | |
BlobsApi | GetBlob | Get /{project}/_apis/git/repositories/{repositoryId}/blobs/{sha1} | |
BlobsApi | GetBlobsZip | Post /{project}/_apis/git/repositories/{repositoryId}/blobs | |
CherryPicksApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/cherryPicks | |
CherryPicksApi | GetCherryPick | Get /{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId} | |
CherryPicksApi | GetCherryPickForRefName | Get /{project}/_apis/git/repositories/{repositoryId}/cherryPicks | |
CommitsApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/commits/{commitId} | |
CommitsApi | GetChanges | Get /{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/changes | |
CommitsApi | GetCommitsBatch | Post /{project}/_apis/git/repositories/{repositoryId}/commitsbatch | |
CommitsApi | GetPushCommits | Get /{project}/_apis/git/repositories/{repositoryId}/commits | |
DiffsApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/diffs/commits | |
ForksApi | Create | Post /{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests | |
ForksApi | Get | Get /{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId} | |
ForksApi | GetForkSyncRequests | Get /{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests | |
ForksApi | List | Get /{project}/_apis/git/repositories/{repositoryNameOrId}/forks/{collectionId} | |
ImportRequestsApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/importRequests | |
ImportRequestsApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId} | |
ImportRequestsApi | Query | Get /{project}/_apis/git/repositories/{repositoryId}/importRequests | |
ImportRequestsApi | Update | Patch /{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId} | |
ItemsApi | GetItemsBatch | Post /{project}/_apis/git/repositories/{repositoryId}/itemsbatch | |
ItemsApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/items | |
MergeBasesApi | List | Get /{project}/_apis/git/repositories/{repositoryNameOrId}/commits/{commitId}/mergebases | |
PolicyConfigurationsApi | List | Get /{project}/_apis/git/policy/configurations | |
PullRequestAttachmentsApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName} | |
PullRequestAttachmentsApi | Delete | Delete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName} | |
PullRequestAttachmentsApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName} | |
PullRequestAttachmentsApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments | |
PullRequestCommentLikesApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes | |
PullRequestCommentLikesApi | Delete | Delete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes | |
PullRequestCommentLikesApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes | |
PullRequestCommitsApi | GetPullRequestCommits | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/commits | |
PullRequestCommitsApi | GetPullRequestIterationCommits | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/commits | |
PullRequestIterationChangesApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/changes | |
PullRequestIterationStatusesApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses | |
PullRequestIterationStatusesApi | Delete | Delete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId} | |
PullRequestIterationStatusesApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId} | |
PullRequestIterationStatusesApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses | |
PullRequestIterationStatusesApi | Update | Patch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses | |
PullRequestIterationsApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId} | |
PullRequestIterationsApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations | |
PullRequestLabelsApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels | |
PullRequestLabelsApi | Delete | Delete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName} | |
PullRequestLabelsApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName} | |
PullRequestLabelsApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels | |
PullRequestPropertiesApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties | |
PullRequestPropertiesApi | Update | Patch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties | |
PullRequestQueryApi | Get | Post /{project}/_apis/git/repositories/{repositoryId}/pullrequestquery | |
PullRequestReviewersApi | CreatePullRequestReviewer | Put /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId} | |
PullRequestReviewersApi | CreatePullRequestReviewers | Post /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers | |
PullRequestReviewersApi | Delete | Delete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId} | |
PullRequestReviewersApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId} | |
PullRequestReviewersApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers | |
PullRequestReviewersApi | Update | Patch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers | |
PullRequestShareApi | SharePullRequest | Post /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/share | |
PullRequestStatusesApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses | |
PullRequestStatusesApi | Delete | Delete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId} | |
PullRequestStatusesApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId} | |
PullRequestStatusesApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses | |
PullRequestStatusesApi | Update | Patch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses | |
PullRequestThreadCommentsApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments | |
PullRequestThreadCommentsApi | Delete | Delete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId} | |
PullRequestThreadCommentsApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId} | |
PullRequestThreadCommentsApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments | |
PullRequestThreadCommentsApi | Update | Patch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId} | |
PullRequestThreadsApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads | |
PullRequestThreadsApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId} | |
PullRequestThreadsApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads | |
PullRequestThreadsApi | Update | Patch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId} | |
PullRequestWorkItemsApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/workitems | |
PullRequestsApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/pullrequests | |
PullRequestsApi | GetPullRequest | Get /{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId} | |
PullRequestsApi | GetPullRequestById | Get /{project}/_apis/git/pullrequests/{pullRequestId} | |
PullRequestsApi | GetPullRequests | Get /{project}/_apis/git/repositories/{repositoryId}/pullrequests | |
PullRequestsApi | GetPullRequestsByProject | Get /{project}/_apis/git/pullrequests | |
PullRequestsApi | Update | Patch /{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId} | |
PushesApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/pushes | |
PushesApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId} | |
PushesApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/pushes | |
RefsApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/refs | |
RefsApi | UpdateRef | Patch /{project}/_apis/git/repositories/{repositoryId}/refs | |
RefsApi | UpdateRefs | Post /{project}/_apis/git/repositories/{repositoryId}/refs | |
RefsFavoritesApi | Create | Post /{project}/_apis/git/favorites/refs | |
RefsFavoritesApi | Delete | Delete /{project}/_apis/git/favorites/refs/{favoriteId} | |
RefsFavoritesApi | Get | Get /{project}/_apis/git/favorites/refs/{favoriteId} | |
RefsFavoritesApi | List | Get /{project}/_apis/git/favorites/refs | |
RepositoriesApi | Create | Post /{project}/_apis/git/repositories | |
RepositoriesApi | Delete | Delete /{project}/_apis/git/repositories/{repositoryId} | |
RepositoriesApi | DeleteRepositoryFromRecycleBin | Delete /{project}/_apis/git/recycleBin/repositories/{repositoryId} | |
RepositoriesApi | GetDeletedRepositories | Get /{project}/_apis/git/deletedrepositories | |
RepositoriesApi | GetRecycleBinRepositories | Get /{project}/_apis/git/recycleBin/repositories | |
RepositoriesApi | GetRepository | Get /{project}/_apis/git/repositories/{repositoryId} | |
RepositoriesApi | List | Get /{project}/_apis/git/repositories | |
RepositoriesApi | RestoreRepositoryFromRecycleBin | Patch /{project}/_apis/git/recycleBin/repositories/{repositoryId} | |
RepositoriesApi | Update | Patch /{project}/_apis/git/repositories/{repositoryId} | |
RevertsApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/reverts | |
RevertsApi | GetRevert | Get /{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId} | |
RevertsApi | GetRevertForRefName | Get /{project}/_apis/git/repositories/{repositoryId}/reverts | |
StatsApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/stats/branches | |
StatusesApi | Create | Post /{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/statuses | |
StatusesApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/statuses | |
SuggestionsApi | List | Get /{project}/_apis/git/repositories/{repositoryId}/suggestions | |
TreesApi | Get | Get /{project}/_apis/git/repositories/{repositoryId}/trees/{sha1} |
Documentation For Models
- AssociatedWorkItem
- AsyncGitOperationNotification
- Attachment
- Change
- ChangeCountDictionary
- ChangeList
- ChangeListSearchCriteria
- CheckinNote
- Comment
- CommentIterationContext
- CommentPosition
- CommentThread
- CommentThreadContext
- CommentTrackingCriteria
- FileContentMetadata
- GitAnnotatedTag
- GitAsyncRefOperation
- GitAsyncRefOperationDetail
- GitAsyncRefOperationParameters
- GitAsyncRefOperationSource
- GitBlobRef
- GitBranchStats
- GitCommitChanges
- GitCommitDiffs
- GitCommitRef
- GitCommitToCreate
- GitConflict
- GitConflictUpdateResult
- GitDeletedRepository
- GitFilePathsCollection
- GitForkOperationStatusDetail
- GitForkSyncRequest
- GitForkSyncRequestParameters
- GitImportFailedEvent
- GitImportGitSource
- GitImportRequest
- GitImportRequestParameters
- GitImportStatusDetail
- GitImportSucceededEvent
- GitImportTfvcSource
- GitItemDescriptor
- GitItemRequestData
- GitLastChangeItem
- GitLastChangeTreeItems
- GitMergeOriginRef
- GitObject
- GitPathAction
- GitPathToItemsCollection
- GitPullRequest
- GitPullRequestCommentThreadContext
- GitPullRequestCompletionOptions
- GitPullRequestIteration
- GitPullRequestIterationChanges
- GitPullRequestMergeOptions
- GitPullRequestQuery
- GitPullRequestQueryInput
- GitPullRequestReviewFileContentInfo
- GitPullRequestSearchCriteria
- GitPushEventData
- GitPushRef
- GitPushSearchCriteria
- GitQueryBranchStatsCriteria
- GitQueryCommitsCriteria
- GitQueryRefsCriteria
- GitRecycleBinRepositoryDetails
- GitRef
- GitRefFavorite
- GitRefUpdate
- GitRefUpdateResult
- GitRepository
- GitRepositoryCreateOptions
- GitRepositoryRef
- GitRepositoryStats
- GitResolutionMergeContent
- GitResolutionPathConflict
- GitResolutionPickOneAction
- GitStatus
- GitStatusContext
- GitSuggestion
- GitTemplate
- GitTreeDiff
- GitTreeDiffEntry
- GitTreeDiffResponse
- GitTreeEntryRef
- GitTreeRef
- GitUserDate
- GitVersionDescriptor
- GlobalGitRepositoryKey
- GraphSubjectBase
- HistoryEntry
- ImportRepositoryValidation
- IncludedGitCommit
- ItemContent
- ItemDetailsOptions
- ItemModel
- JsonPatchDocument
- JsonPatchOperation
- PolicyConfigurationRef
- PolicyTypeRef
- PropertiesCollection
- PullRequestTabExtensionConfig
- RealTimePullRequestEvent
- ReferenceLinks
- ResourceRef
- ShareNotificationContext
- SourceToTargetRef
- SupportedIde
- TeamProjectCollectionReference
- TeamProjectReference
- TfvcBranchMapping
- TfvcChangesetRef
- TfvcChangesetSearchCriteria
- TfvcChangesetsRequestData
- TfvcCheckinEventData
- TfvcItemDescriptor
- TfvcItemRequestData
- TfvcLabelRef
- TfvcLabelRequestData
- TfvcMappingFilter
- TfvcMergeSource
- TfvcPolicyFailureInfo
- TfvcPolicyOverrideInfo
- TfvcShallowBranchRef
- TfvcShelvesetRef
- TfvcShelvesetRequestData
- TfvcStatistics
- TfvcVersionDescriptor
- UpdateRefsRequest
- VersionControlProjectInfo
- VssJsonCollectionWrapperBase
- WebApiCreateTagRequestData
- WebApiTagDefinition
- AsyncRefOperationCommitLevelEventNotification
- AsyncRefOperationCompletedNotification
- AsyncRefOperationGeneralFailureNotification
- AsyncRefOperationTimeoutNotification
- AutoCompleteUpdatedEvent
- BranchUpdatedEvent
- CompletionErrorsEvent
- DiscussionsUpdatedEvent
- GitBaseVersionDescriptor
- GitChange
- GitCherryPick
- GitCommit
- GitConflictAddAdd
- GitConflictAddRename
- GitConflictDeleteEdit
- GitConflictDeleteRename
- GitConflictDirectoryFile
- GitConflictEditDelete
- GitConflictEditEdit
- GitConflictFileDirectory
- GitConflictRename1to2
- GitConflictRename2to1
- GitConflictRenameAdd
- GitConflictRenameDelete
- GitConflictRenameRename
- GitForkRef
- GitForkTeamProjectReference
- GitItem
- GitPullRequestCommentThread
- GitPullRequestStatus
- GitPush
- GitResolutionRename1to2
- GitRevert
- GitTargetVersionDescriptor
- IdentityRef
- LabelsUpdatedEvent
- MergeCompletedEvent
- PolicyEvaluationUpdatedEvent
- PullRequestCreatedEvent
- RetargetEvent
- ReviewerVoteUpdatedEvent
- ReviewersUpdatedEvent
- ReviewersVotesResetEvent
- StatusAddedEvent
- StatusUpdatedEvent
- StatusesDeletedEvent
- TfvcBranchRef
- TfvcChange
- TfvcChangeset
- TfvcHistoryEntry
- TfvcItem
- TfvcLabel
- TfvcShelveset
- TitleDescriptionUpdatedEvent
- VersionedPolicyConfigurationRef
- VssJsonCollectionWrapper
- AsyncRefOperationConflictNotification
- AsyncRefOperationProgressNotification
- GitPullRequestChange
- IdentityRefWithVote
- PolicyConfiguration
- TfvcBranch
- TfvcItemPreviousHash
Documentation For Authorization
accessToken
- Type: HTTP basic authentication
Example
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)
oauth2
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
- Scopes:
- vso.code: Grants the ability to read source code and metadata about commits, changesets, branches, and other version control artifacts. Also grants the ability to search code and get notified about version control events via service hooks.
- vso.code_manage: Grants the ability to read, update, and delete source code, access metadata about commits, changesets, branches, and other version control artifacts. Also grants the ability to create and manage code repositories, create and manage pull requests and code reviews, and to receive notifications about version control events via service hooks.
- vso.code_write: Grants the ability to read, update, and delete source code, access metadata about commits, changesets, branches, and other version control artifacts. Also grants the ability to create and manage pull requests and code reviews and to receive notifications about version control events via service hooks.
- vso.code_status: Grants the ability to read and write commit and pull request status.
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)