Skip to content

Commit

Permalink
whitespace and documentation link updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Aug 18, 2021
1 parent 03129da commit 28995eb
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions teams_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/pkg/errors"
"net/http"
"time"

"github.com/pkg/errors"
)

type TeamsAccount struct {
Expand All @@ -15,13 +16,15 @@ type TeamsAccount struct {
ID string `json:"id"` // cloudflare account ID
}

// TeamsAccountResponse is the API response, containing information on teams account
// TeamsAccountResponse is the API response, containing information on teams
// account.
type TeamsAccountResponse struct {
Response
Result TeamsAccount `json:"result"`
}

// TeamsConfigResponse is the API response, containing information on teams account config
// TeamsConfigResponse is the API response, containing information on teams
// account config.
type TeamsConfigResponse struct {
Response
Result TeamsConfiguration `json:"result"`
Expand Down Expand Up @@ -64,7 +67,9 @@ type TeamsBlockPage struct {
Name string `json:"name,omitempty"`
}

// TeamsAccount returns teams account information with internal and external id
// TeamsAccount returns teams account information with internal and external ID.
//
// API documentation: TBA
func (api *API) TeamsAccount(ctx context.Context, accountID string) (TeamsAccount, error) {
uri := fmt.Sprintf("/accounts/%s/gateway", accountID)

Expand All @@ -82,7 +87,9 @@ func (api *API) TeamsAccount(ctx context.Context, accountID string) (TeamsAccoun
return teamsAccountResponse.Result, nil
}

// TeamsAccountConfiguration returns teams account configuration
// TeamsAccountConfiguration returns teams account configuration.
//
// API documentation: TBA
func (api *API) TeamsAccountConfiguration(ctx context.Context, accountID string) (TeamsConfiguration, error) {
uri := fmt.Sprintf("/accounts/%s/gateway/configuration", accountID)

Expand All @@ -100,7 +107,9 @@ func (api *API) TeamsAccountConfiguration(ctx context.Context, accountID string)
return teamsConfigResponse.Result, nil
}

// TeamsAccountUpdateConfiguration upserts teams account configuration
// TeamsAccountUpdateConfiguration updates a teams account configuration.
//
// API documentation: TBA
func (api *API) TeamsAccountUpdateConfiguration(ctx context.Context, accountID string, config TeamsConfiguration) (TeamsConfiguration, error) {
uri := fmt.Sprintf("/accounts/%s/gateway/configuration", accountID)

Expand Down

0 comments on commit 28995eb

Please sign in to comment.