
๐ฐWorkspace
Get a workspace
package main
import (
"context"
"fmt"
"github.com/ctreminiom/go-atlassian/bitbucket"
"log"
"os"
)
func main() {
token := os.Getenv("BITBUCKET_TOKEN")
instance, err := bitbucket.New(nil, "")
if err != nil {
log.Fatal(err)
}
instance.Auth.SetBearerToken(token)
instance.Auth.SetUserAgent("curl/7.54.0")
workspace, response, err := instance.Workspace.Get(context.Background(), "ctreminiom")
if err != nil {
log.Println(response.Endpoint)
log.Println(response.Bytes.String())
log.Fatal(err)
}
fmt.Println(workspace.Type)
fmt.Println(workspace.Links)
fmt.Println(workspace.Uuid)
fmt.Println(workspace.Name)
fmt.Println(workspace.Name)
fmt.Println(workspace.Slug)
fmt.Println(workspace.IsPrivate)
fmt.Println(workspace.CreatedOn)
fmt.Println(workspace.UpdatedOn)
}Get members in a workspace
Get member in a workspace
Get projects in a workspace
Last updated
Was this helpful?