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

ClassMethodHTTP requestDescription
AnnotatedTagsApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/annotatedtags
AnnotatedTagsApiGetGet /{project}/_apis/git/repositories/{repositoryId}/annotatedtags/{objectId}
BlobsApiGetBlobGet /{project}/_apis/git/repositories/{repositoryId}/blobs/{sha1}
BlobsApiGetBlobsZipPost /{project}/_apis/git/repositories/{repositoryId}/blobs
CherryPicksApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/cherryPicks
CherryPicksApiGetCherryPickGet /{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}
CherryPicksApiGetCherryPickForRefNameGet /{project}/_apis/git/repositories/{repositoryId}/cherryPicks
CommitsApiGetGet /{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}
CommitsApiGetChangesGet /{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/changes
CommitsApiGetCommitsBatchPost /{project}/_apis/git/repositories/{repositoryId}/commitsbatch
CommitsApiGetPushCommitsGet /{project}/_apis/git/repositories/{repositoryId}/commits
DiffsApiGetGet /{project}/_apis/git/repositories/{repositoryId}/diffs/commits
ForksApiCreatePost /{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests
ForksApiGetGet /{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}
ForksApiGetForkSyncRequestsGet /{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests
ForksApiListGet /{project}/_apis/git/repositories/{repositoryNameOrId}/forks/{collectionId}
ImportRequestsApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/importRequests
ImportRequestsApiGetGet /{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}
ImportRequestsApiQueryGet /{project}/_apis/git/repositories/{repositoryId}/importRequests
ImportRequestsApiUpdatePatch /{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}
ItemsApiGetItemsBatchPost /{project}/_apis/git/repositories/{repositoryId}/itemsbatch
ItemsApiListGet /{project}/_apis/git/repositories/{repositoryId}/items
MergeBasesApiListGet /{project}/_apis/git/repositories/{repositoryNameOrId}/commits/{commitId}/mergebases
PolicyConfigurationsApiListGet /{project}/_apis/git/policy/configurations
PullRequestAttachmentsApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}
PullRequestAttachmentsApiDeleteDelete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}
PullRequestAttachmentsApiGetGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}
PullRequestAttachmentsApiListGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments
PullRequestCommentLikesApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes
PullRequestCommentLikesApiDeleteDelete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes
PullRequestCommentLikesApiListGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes
PullRequestCommitsApiGetPullRequestCommitsGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/commits
PullRequestCommitsApiGetPullRequestIterationCommitsGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/commits
PullRequestIterationChangesApiGetGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/changes
PullRequestIterationStatusesApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses
PullRequestIterationStatusesApiDeleteDelete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}
PullRequestIterationStatusesApiGetGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}
PullRequestIterationStatusesApiListGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses
PullRequestIterationStatusesApiUpdatePatch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses
PullRequestIterationsApiGetGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}
PullRequestIterationsApiListGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations
PullRequestLabelsApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels
PullRequestLabelsApiDeleteDelete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}
PullRequestLabelsApiGetGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}
PullRequestLabelsApiListGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels
PullRequestPropertiesApiListGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties
PullRequestPropertiesApiUpdatePatch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties
PullRequestQueryApiGetPost /{project}/_apis/git/repositories/{repositoryId}/pullrequestquery
PullRequestReviewersApiCreatePullRequestReviewerPut /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}
PullRequestReviewersApiCreatePullRequestReviewersPost /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers
PullRequestReviewersApiDeleteDelete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}
PullRequestReviewersApiGetGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}
PullRequestReviewersApiListGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers
PullRequestReviewersApiUpdatePatch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers
PullRequestShareApiSharePullRequestPost /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/share
PullRequestStatusesApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses
PullRequestStatusesApiDeleteDelete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}
PullRequestStatusesApiGetGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}
PullRequestStatusesApiListGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses
PullRequestStatusesApiUpdatePatch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses
PullRequestThreadCommentsApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments
PullRequestThreadCommentsApiDeleteDelete /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}
PullRequestThreadCommentsApiGetGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}
PullRequestThreadCommentsApiListGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments
PullRequestThreadCommentsApiUpdatePatch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}
PullRequestThreadsApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads
PullRequestThreadsApiGetGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}
PullRequestThreadsApiListGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads
PullRequestThreadsApiUpdatePatch /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}
PullRequestWorkItemsApiListGet /{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/workitems
PullRequestsApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/pullrequests
PullRequestsApiGetPullRequestGet /{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}
PullRequestsApiGetPullRequestByIdGet /{project}/_apis/git/pullrequests/{pullRequestId}
PullRequestsApiGetPullRequestsGet /{project}/_apis/git/repositories/{repositoryId}/pullrequests
PullRequestsApiGetPullRequestsByProjectGet /{project}/_apis/git/pullrequests
PullRequestsApiUpdatePatch /{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}
PushesApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/pushes
PushesApiGetGet /{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}
PushesApiListGet /{project}/_apis/git/repositories/{repositoryId}/pushes
RefsApiListGet /{project}/_apis/git/repositories/{repositoryId}/refs
RefsApiUpdateRefPatch /{project}/_apis/git/repositories/{repositoryId}/refs
RefsApiUpdateRefsPost /{project}/_apis/git/repositories/{repositoryId}/refs
RefsFavoritesApiCreatePost /{project}/_apis/git/favorites/refs
RefsFavoritesApiDeleteDelete /{project}/_apis/git/favorites/refs/{favoriteId}
RefsFavoritesApiGetGet /{project}/_apis/git/favorites/refs/{favoriteId}
RefsFavoritesApiListGet /{project}/_apis/git/favorites/refs
RepositoriesApiCreatePost /{project}/_apis/git/repositories
RepositoriesApiDeleteDelete /{project}/_apis/git/repositories/{repositoryId}
RepositoriesApiDeleteRepositoryFromRecycleBinDelete /{project}/_apis/git/recycleBin/repositories/{repositoryId}
RepositoriesApiGetDeletedRepositoriesGet /{project}/_apis/git/deletedrepositories
RepositoriesApiGetRecycleBinRepositoriesGet /{project}/_apis/git/recycleBin/repositories
RepositoriesApiGetRepositoryGet /{project}/_apis/git/repositories/{repositoryId}
RepositoriesApiListGet /{project}/_apis/git/repositories
RepositoriesApiRestoreRepositoryFromRecycleBinPatch /{project}/_apis/git/recycleBin/repositories/{repositoryId}
RepositoriesApiUpdatePatch /{project}/_apis/git/repositories/{repositoryId}
RevertsApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/reverts
RevertsApiGetRevertGet /{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}
RevertsApiGetRevertForRefNameGet /{project}/_apis/git/repositories/{repositoryId}/reverts
StatsApiListGet /{project}/_apis/git/repositories/{repositoryId}/stats/branches
StatusesApiCreatePost /{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/statuses
StatusesApiListGet /{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/statuses
SuggestionsApiListGet /{project}/_apis/git/repositories/{repositoryId}/suggestions
TreesApiGetGet /{project}/_apis/git/repositories/{repositoryId}/trees/{sha1}

Documentation For Models

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)

Author

[email protected]

# Functions

CacheExpires helper function to determine remaining time before repeating a request.
NewAPIClient creates a new API client.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAPIKey takes an APIKey as authentication for the request.
ContextBasicAuth takes BasicAuth as authentication for the request.
ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.

# Structs

APIClient manages communication with the Git API v5.0-preview In most cases there should be only one, shared, APIClient.
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
No description provided by the author
.
.
.
.
.
.
.
.
Meta data for a file attached to an artifact.
Real time event (SignalR) for an auto-complete update on a pull request.
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
Real time event (SignalR) for a source/target branch update on a pull request.
.
.
.
Criteria used in a search for change lists.
.
Represents a comment which is one of potentially many in a comment thread.
Comment iteration context is used to identify which diff was being viewed when the thread was created.
.
Represents a comment thread of a pull request.
.
Comment tracking criteria is used to identify which iteration context the thread has been tracked to (if any) along with some detail about the original position and filename.
Real time event (SignalR) for a completion errors on a pull request.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Real time event (SignalR) for a discussions update on a pull request.
.
GenericSwaggerError Provides access to the body, error and model on returned errors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A Git annotated tag.
.
Information about the progress of a cherry pick or revert operation.
Parameters that are provided in the request body when requesting to cherry pick or revert.
GitAsyncRefOperationSource specifies the pull request or list of commits to use when making a cherry pick and revert operation request.
.
.
Ahead and behind counts for a particular ref.
.
This object is returned from Cherry Pick operations and provides the id and status of the operation.
.
.
.
Provides properties that describe a Git commit and associated metadata.
.
.
Data object for AddAdd conflict.
Data object for RenameAdd conflict.
Data object for EditDelete conflict.
Data object for RenameDelete conflict.
Data object for FileDirectory conflict.
Data object for DeleteEdit conflict.
Data object for EditEdit conflict.
Data object for DirectoryFile conflict.
Data object for Rename1to2 conflict.
Data object for Rename2to1 conflict.
Data object for AddRename conflict.
Data object for DeleteRename conflict.
Data object for RenameRename conflict.
.
.
.
Status information about a requested fork operation.
Information about a fork ref.
Request to sync data between two forks.
Parameters for creating a fork request.
.
.
Parameter for creating a git import request when source is Git version control.
A request to import data from a remote source control system.
Parameters for creating an import request.
Additional status information about an import request.
.
Parameter for creating a git import request when source is tfvc version control.
.
.
.
.
.
.
Git object identifier and type information.
.
.
Represents all the data associated with a pull request.
Change made in a pull request.
Represents a comment thread of a pull request.
Comment thread context contains details about what diffs were being viewed at the time of thread creation and whether or not the thread has been tracked from that original diff.
Preferences about how the pull request should be completed.
Provides properties that describe a Git pull request iteration.
Collection of changes made in a pull request.
The options which are used when a pull request merge is created.
A set of pull request queries and their results.
Pull request query input parameters.
.
Pull requests can be searched for matching this criteria.
This class contains the metadata of a service/extension posting pull request status.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
This class contains the metadata of a service/extension posting a status.
Status context that uniquely identifies the status.
An object describing the git suggestion.
.
.
.
.
.
.
.
User info and date for Git operations.
.
Globally unique key for a repository.
.
.
.
Identity information including a vote on a pull request.
.
.
.
Optional details to include when returning an item model.
.
The JSON model for JSON Patch Operations.
The JSON model for a JSON Patch operation.
Real time event (SignalR) for updated labels on a pull request.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Real time event (SignalR) for a merge completed on a pull request.
The full policy configuration with settings.
Policy configuration reference.
Real time event (SignalR) for a policy evaluation update on a pull request.
Policy type reference.
The class represents a property bag as a collection of key-value pairs.
Real time event (SignalR) for pull request creation.
Initial config contract sent to extensions creating tabs on the pull request page.
No description provided by the author
Base contract for a real time pull request event (SignalR).
The class to represent a collection of REST reference links.
.
Real time event (SignalR) for when the target branch of a pull request is changed.
Real time event (SignalR) for an update to reviewers on a pull request.
Real time event (SignalR) for reviewer votes being reset on a pull request.
Real time event (SignalR) for a reviewer vote update on a pull request.
Context used while sharing a pull request.
.
Real time event (SignalR) for an added status on a pull request.
Real time event (SignalR) for deleted statuses on a pull request.
Real time event (SignalR) for a status update on a pull request.
Represents a Supported IDE entity.
Reference object for a TeamProjectCollection.
Represents a shallow reference to a TeamProject.
.
.
.
.
.
.
Criteria used in a search for change lists.
.
.
.
.
Item path and Version descriptor properties.
.
.
.
.
.
.
.
.
.
.
This is the deep shelveset class.
This is the shallow shelveset class.
.
.
.
Real time event (SignalR) for a title/description update on a pull request.
No description provided by the author
No description provided by the author
.
.
A particular revision for a policy configuration.
This class is used to serialized collections as a single JSON object on the wire, to avoid serializing JSON arrays directly to the client, which can be a security hole.
.
The representation of data needed to create a tag definition which is sent across the wire.
The representation of a tag definition which is sent across the wire.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author