Documentation ¶
Index ¶
- type CalendlyWrapper
- func (cw *CalendlyWrapper) CreateSingleUseSchedulingLink(input *SchedulingLinkInput) (SchedulingLink, error)
- func (cw *CalendlyWrapper) GetCurrentUser() (User, error)
- func (cw *CalendlyWrapper) GetEvent(id string) (Event, error)
- func (cw *CalendlyWrapper) GetEventInvitee(eventid, inviteeid string) (Invitee, error)
- func (cw *CalendlyWrapper) GetEventType(id string) (EventType, error)
- func (cw *CalendlyWrapper) GetUser(id string) (User, error)
- func (cw *CalendlyWrapper) GetWebhookSubscription(id string) (WebhookSubscription, error)
- func (cw *CalendlyWrapper) ListEventInvitees(input *ListEventInviteesInput) ([]Invitee, error)
- func (cw *CalendlyWrapper) ListEvents(input *ListEventsInput) ([]Event, error)
- func (cw *CalendlyWrapper) ListUsersEventTypes(input *ListUsersEventTypesInput) ([]EventType, error)
- func (cw *CalendlyWrapper) ListWebhookSubscriptions(input *ListWebhookSubscriptionsInput) ([]WebhookSubscription, error)
- func (cw *CalendlyWrapper) VerifyWebhookSignature(body, secret []byte, sig *WebhookSignature) (bool, error)
- type CalendlyWrapperInput
- type Cancellation
- type CustomQuestion
- type CustomQuestionsAndAnswers
- type Event
- type EventMemberships
- type EventType
- type Guest
- type Invitee
- type InviteesCounter
- type ListEventInviteesInput
- type ListEventsInput
- type ListUsersEventTypesInput
- type ListWebhookSubscriptionsInput
- type Location
- type Payload
- type Payment
- type Profile
- type SchedulingLink
- type SchedulingLinkInput
- type Tracking
- type User
- type WebhookPayload
- type WebhookSignature
- type WebhookSubscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CalendlyWrapper ¶
type CalendlyWrapper struct {
// contains filtered or unexported fields
}
CalendlyWrapper holds the main Calendly client
func New ¶
func New(input *CalendlyWrapperInput) *CalendlyWrapper
New returns a CalendlyWrapper to be used
func (*CalendlyWrapper) CreateSingleUseSchedulingLink ¶
func (cw *CalendlyWrapper) CreateSingleUseSchedulingLink(input *SchedulingLinkInput) (SchedulingLink, error)
CreateSingleUseSchedulingLink creates a single use link for Calendly
func (*CalendlyWrapper) GetCurrentUser ¶
func (cw *CalendlyWrapper) GetCurrentUser() (User, error)
GetCurrentUser returns the current user for the given API key
func (*CalendlyWrapper) GetEvent ¶
func (cw *CalendlyWrapper) GetEvent(id string) (Event, error)
GetEvent gets the specified Calendly event
func (*CalendlyWrapper) GetEventInvitee ¶
func (cw *CalendlyWrapper) GetEventInvitee(eventid, inviteeid string) (Invitee, error)
GetEventInvitee returns an invitee for a specific event
func (*CalendlyWrapper) GetEventType ¶
func (cw *CalendlyWrapper) GetEventType(id string) (EventType, error)
GetEventType returns the event type for the given id
func (*CalendlyWrapper) GetUser ¶
func (cw *CalendlyWrapper) GetUser(id string) (User, error)
GetUser gets a user by ID
func (*CalendlyWrapper) GetWebhookSubscription ¶
func (cw *CalendlyWrapper) GetWebhookSubscription(id string) (WebhookSubscription, error)
GetWebhookSubscription gets the webhook subscription by id
func (*CalendlyWrapper) ListEventInvitees ¶
func (cw *CalendlyWrapper) ListEventInvitees(input *ListEventInviteesInput) ([]Invitee, error)
ListEventInvitees lists all the invitees for a specific event
func (*CalendlyWrapper) ListEvents ¶
func (cw *CalendlyWrapper) ListEvents(input *ListEventsInput) ([]Event, error)
ListEvents returns an event list from the Calendly API
func (*CalendlyWrapper) ListUsersEventTypes ¶
func (cw *CalendlyWrapper) ListUsersEventTypes(input *ListUsersEventTypesInput) ([]EventType, error)
ListUsersEventTypes list a users event types Either User or Organization are required
func (*CalendlyWrapper) ListWebhookSubscriptions ¶
func (cw *CalendlyWrapper) ListWebhookSubscriptions(input *ListWebhookSubscriptionsInput) ([]WebhookSubscription, error)
ListWebhookSubscriptions lists the webhook subscriptions for the provided user or organization
func (*CalendlyWrapper) VerifyWebhookSignature ¶
func (cw *CalendlyWrapper) VerifyWebhookSignature(body, secret []byte, sig *WebhookSignature) (bool, error)
VerifyWebhookSignature verifies the given webhook signature
type CalendlyWrapperInput ¶
type CalendlyWrapperInput struct { ApiKey string BaseApiUrl string CustomHeaders map[string]string }
CalendlyWrapperInput is used as input for the New function
type Cancellation ¶
type CustomQuestion ¶
type CustomQuestion struct { Name string `json:"name"` Type string `json:"type"` Position int `json:"position"` Enabled bool `json:"enabled"` Required bool `json:"required"` AnswerChoices []string `json:"answer_choices"` IncludeOther bool `json:"include_other"` }
CustomQuestion holds a Calendly CustomQuestion object
type Event ¶
type Event struct { URI string `json:"uri"` Name string `json:"name"` Status string `json:"status"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` EventType string `json:"event_type"` Location Location `json:"location"` InviteesCounter InviteesCounter `json:"invitees_counter"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` EventMemberships []EventMemberships `json:"event_memberships"` EventGuests []Guest `json:"event_guests"` Cancellation Cancellation `json:"cancellation"` }
Event holds a Calendly Event object
type EventMemberships ¶
type EventMemberships struct {
User string `json:"user"`
}
type EventType ¶
type EventType struct { URI string `json:"uri"` Name string `json:"name"` Active bool `json:"active"` Slug string `json:"slug"` SchedulingUrl string `json:"scheduling_url"` Duration int `json:"duration"` Kind string `json:"kind"` PoolingType string `json:"pooling_type"` Type string `json:"type"` Color string `json:"color"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` InternalNote string `json:"internal_note"` DescriptionPlain string `json:"description_plain"` DescriptionHtml string `json:"description_html"` Profile Profile `json:"profile"` Secret bool `json:"secret"` CustomQuestions []CustomQuestion `json:"custom_questions"` }
EventType holds a Calendly EventType object
type Guest ¶
type Guest struct { Email string `json:"email"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Guest holds a Calendly Guest object
type Invitee ¶
type Invitee struct { CancelURL string `json:"cancel_url"` CreatedAt time.Time `json:"created_at"` Email string `json:"email"` Event string `json:"event"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Name string `json:"name"` NewInvitee interface{} `json:"new_invitee"` OldInvitee interface{} `json:"old_invitee"` QuestionsAndAnswers []CustomQuestionsAndAnswers `json:"questions_and_answers"` RescheduleURL string `json:"reschedule_url"` Rescheduled bool `json:"rescheduled"` Status string `json:"status"` TextReminderNumber interface{} `json:"text_reminder_number"` Timezone string `json:"timezone"` Tracking Tracking `json:"tracking"` UpdatedAt time.Time `json:"updated_at"` URI string `json:"uri"` Canceled bool `json:"canceled"` Cancellation Cancellation `json:"cancellation"` Payment Payment `json:"payment"` NoShow string `json:"no_show"` }
Invitee holds a Calendly Invitee object
type InviteesCounter ¶
type ListEventInviteesInput ¶
type ListEventsInput ¶
type ListUsersEventTypesInput ¶
type ListUsersEventTypesInput struct { Active string // This should be a bool, but Go doesn't have a null value for bools so we use string Count int Organization string PageToken string Sort string User string }
ListUsersEventTypesInput is used as input for the ListUsersEventTypes function
type ListWebhookSubscriptionsInput ¶
type ListWebhookSubscriptionsInput struct { Organization string Scope string Count int PageToken string Sort string User string }
ListWebhookSubscriptionsInput is used as input for the ListWebhookSubscriptions function
type Payload ¶
type Payload struct { CancelURL string `json:"cancel_url"` CreatedAt time.Time `json:"created_at"` Email string `json:"email"` Event string `json:"event"` Name string `json:"name"` NewInvitee interface{} `json:"new_invitee"` OldInvitee interface{} `json:"old_invitee"` QuestionsAndAnswers []CustomQuestionsAndAnswers `json:"questions_and_answers"` RescheduleURL string `json:"reschedule_url"` Rescheduled bool `json:"rescheduled"` Status string `json:"status"` TextReminderNumber interface{} `json:"text_reminder_number"` Timezone string `json:"timezone"` Tracking Tracking `json:"tracking"` UpdatedAt time.Time `json:"updated_at"` URI string `json:"uri"` Canceled bool `json:"canceled"` Cancellation Cancellation `json:"cancellation"` }
type Profile ¶
type Profile struct { Type string `json:"type"` Name string `json:"name"` Owner string `json:"owner"` }
Profile holds a Calendly Profile object
type SchedulingLink ¶
type SchedulingLink struct { BookingURL string `json:"booking_url"` Owner string `json:"owner"` OwnerType string `json:"owner_type"` }
SchedulingLink holds a Calendly Scheduled Link
type SchedulingLinkInput ¶
type SchedulingLinkInput struct { MaxEventCount int `json:"max_event_count"` Owner string `json:"owner"` OwnerType string `json:"owner_type"` }
SchedulingLinkInput is used as input to the CreateSingleUseSchedulingLink function
type Tracking ¶
type Tracking struct { UtmCampaign interface{} `json:"utm_campaign"` UtmSource interface{} `json:"utm_source"` UtmMedium interface{} `json:"utm_medium"` UtmContent interface{} `json:"utm_content"` UtmTerm interface{} `json:"utm_term"` SalesforceUUID interface{} `json:"salesforce_uuid"` }
type User ¶
type User struct { URI string `json:"uri"` Name string `json:"name"` Slug string `json:"slug"` Email string `json:"email"` SchedulingUrl string `json:"scheduling_url"` Timezone string `json:"timezone"` AvatarUrl string `json:"avatar_url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` CurrentOrganization string `json:"current_organization"` }
User holds a Calendly User object
type WebhookPayload ¶
type WebhookPayload struct { CreatedAt time.Time `json:"created_at"` CreatedBy string `json:"created_by"` Event string `json:"event"` Payload Payload `json:"payload"` }
WebhookPayload holds a Calendly Webhook Payload object
type WebhookSignature ¶
WebhookSignature holds a Calendly webhook signature
type WebhookSubscription ¶
type WebhookSubscription struct { URI string `json:"uri"` CallbackUrl string `json:"callback_url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` RetryStartedAt time.Time `json:"retry_started_at"` State string `json:"state"` Events []string `json:"events"` Scope string `json:"scope"` Organization string `json:"organization"` User string `json:"user"` Creator string `json:"creator"` }
WebhookSubscription holds a Calendly Webhook Subscription object