notion

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Schemas     []string `json:"schemas"`
	ID          string   `json:"id"`
	DisplayName string   `json:"displayName"`
	Members     []Member `json:"members"`
}

type GroupsResponse

type GroupsResponse struct {
	TotalResults int64   `json:"totalResults"`
	Resources    []Group `json:"Resources"`
	StartIndex   int64   `json:"startIndex"`
	ItemsPerPage int64   `json:"itemsPerPage"`
}

type Member

type Member struct {
	Value string `json:"value"`
	Ref   string `json:"$ref"`
	Type  string `json:"type"`
}

type ScimClient

type ScimClient struct {
	// contains filtered or unexported fields
}

func NewScimClient

func NewScimClient(scimToken string, httpClient *http.Client) *ScimClient

func (*ScimClient) GetGroup

func (c *ScimClient) GetGroup(ctx context.Context, groupId string) (Group, error)

GetGroup returns group details by group ID.

func (*ScimClient) GetGroups

func (c *ScimClient) GetGroups(ctx context.Context, count int, startIndex int) (GroupsResponse, error)

GetGroups returns all Notion groups.

func (*ScimClient) GetPaginatedGroups

func (c *ScimClient) GetPaginatedGroups(ctx context.Context) ([]Group, error)

GetPaginatedGroups returns all groups - paginated.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL