GetAnnouncementBanner
client.Organizations.AnnouncementBanner.Get(ctx, body) (*OrganizationAnnouncementBannerGetResponse, error)
POST/gitpod.v1.OrganizationService/GetAnnouncementBanner
Retrieves the announcement banner configuration for an organization.
Use this method to fetch the current announcement banner settings. All organization members can read the banner configuration.
Examples
-
Get announcement banner:
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
ParametersExpand Collapse
ReturnsExpand Collapse
type OrganizationAnnouncementBannerGetResponse struct{…}
type OrganizationAnnouncementBannerGetResponse struct{…}
Banner AnnouncementBannerbanner is the announcement banner configuration
Banner AnnouncementBanner
banner is the announcement banner configuration
GetAnnouncementBanner
package main
import (
"context"
"fmt"
"github.com/gitpod-io/gitpod-sdk-go"
"github.com/gitpod-io/gitpod-sdk-go/option"
)
func main() {
client := gitpod.NewClient(
option.WithBearerToken("My Bearer Token"),
)
announcementBanner, err := client.Organizations.AnnouncementBanner.Get(context.TODO(), gitpod.OrganizationAnnouncementBannerGetParams{
OrganizationID: gitpod.F("b0e12f6c-4c67-429d-a4a6-d9838b5da047"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", announcementBanner.Banner)
}
{
"banner": {
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"enabled": true,
"message": "message"
}
}Returns Examples
{
"banner": {
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"enabled": true,
"message": "message"
}
}