Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion api_refs.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ Creates a new branch in the specified repository. The payload of the POST shoul
* @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.
@return Branch
*/
func (a *RefsApiService) RepositoriesWorkspaceRepoSlugRefsBranchesPost(ctx context.Context, repoSlug string, workspace string) (Branch, *http.Response, error) {
func (a *RefsApiService) RepositoriesWorkspaceRepoSlugRefsBranchesPost(ctx context.Context, repoSlug string, workspace string, body Branch) (Branch, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
Expand Down Expand Up @@ -432,6 +432,10 @@ func (a *RefsApiService) RepositoriesWorkspaceRepoSlugRefsBranchesPost(ctx conte
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}

// set POST body
localVarPostBody = &body

if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
Expand Down
13 changes: 9 additions & 4 deletions api_workspaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -1562,18 +1562,23 @@ Returns the list of projects in this workspace.
* @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.
@return PaginatedProjects
*/
func (a *WorkspacesApiService) WorkspacesWorkspaceProjectsGet(ctx context.Context, workspace string) (PaginatedProjects, *http.Response, error) {
func (a *WorkspacesApiService) WorkspacesWorkspaceProjectsGet(ctx context.Context, workspace string, nextPage string) (PaginatedProjects, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarPath string
localVarFileBytes []byte
localVarReturnValue PaginatedProjects
)

// create path and map variables
localVarPath := a.client.cfg.BasePath + "/workspaces/{workspace}/projects"
localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1)
if nextPage != "" {
localVarPath = nextPage
} else {
// create path and map variables
localVarPath = a.client.cfg.BasePath + "/workspaces/{workspace}/projects"
localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1)
}

localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
Expand Down
13 changes: 10 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
module github.com/DrFaust92/bitbucket-go-client
module github.com/migara/bitbucket-go-client

go 1.16
go 1.18

require (
github.com/antihax/optional v1.0.0
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a
golang.org/x/oauth2 v0.0.0-20220718184931-c8730f7fcb92
)

require (
github.com/golang/protobuf v1.5.2 // indirect
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
)
Loading