Documentation
¶
Index ¶
Constants ¶
View Source
const ItemsPerPage = 50 // Common default number of items per page as per PandaDoc API
Variables ¶
This section is empty.
Functions ¶
func GetNextPageToken ¶ added in v0.0.4
func GetNextPageToken(total int, opts PageOptions) string
Types ¶
type Option ¶
type Option func(client *PandaDocClient)
func WithBearerToken ¶
func WithEuropeDomain ¶ added in v0.0.4
type PageOptions ¶
PageOptions is options for list method of paginatable resources. It's used to create query string.
type PandaDocClient ¶
type PandaDocClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(httpClient ...*uhttp.BaseHttpClient) *PandaDocClient
func (*PandaDocClient) ListUsers ¶
func (c *PandaDocClient) ListUsers(ctx context.Context, opts PageOptions) ([]User, string, annotations.Annotations, error)
func (*PandaDocClient) ListWorkspaces ¶
func (c *PandaDocClient) ListWorkspaces(ctx context.Context, opts PageOptions) ([]Workspace, string, annotations.Annotations, error)
type ReqOpt ¶
func WithPage ¶
page: Number for the page (inclusive). The page number starts with 1. If page is 0, first page is assumed.
func WithQueryParam ¶
type User ¶
type User struct {
ID string `json:"user_id"`
Email string `json:"email"`
FirstName string `json:"first_name,omitempty"`
Lastame string `json:"last_name,omitempty"`
Phone string `json:"phone_number,omitempty"`
IsOrganizationOwner bool `json:"is_organization_owner"`
License string `json:"license"`
Workspaces []struct {
Role string `json:"role"`
WorkspaceID string `json:"workspace_id"`
MembershipID string `json:"membership_id"`
}
}
type UserResponse ¶
type WorkspaceResponse ¶
Click to show internal directories.
Click to hide internal directories.