- Notifications
You must be signed in to change notification settings - Fork1
go-calendly is a Go client library for accessing the Calendly APIhttps://godoc.org/github.com/theodesp/go-calendly/calendly
License
theodesp/go-calendly
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
go-calendly is a Go client library for accessing theCalendly API v1.
go-calendly requires Go version 1.8 or greater.
import"github.com/theodesp/go-calendly/calendly"
Construct a new Calendly client, then use the various services on the client toaccess different parts of the Calendly API. For example:
client:=calendly.NewClient(nil)// list all event types for current usereventTypes,_,err:=client.EventTypes.List(context.Background(),nil)
Some API methods have optional parameters that can be passed. For example:
client:=calendly.NewClient(nil)// list all event types for current user including the owner dataopt:=&calendly.EventTypesOpts{Include:calendly.IncludeTypeOwner}eventTypes,_,err:=client.EventTypes.List(context.Background(),opt)
NOTE: Using thecontext package, one can easilypass cancelation signals and deadlines to various services of the client forhandling a request. In case there is no context available, thencontext.Background()
can be used as a starting point.
For more sample code snippets, head over to theexamples directory.
The go-calendly library does not directly handle authentication. Instead, whencreating a new client, pass anhttp.Client
that can handle authentication foryou. If you have an API access token (for example, aintegrations), you can use it with the library using:
funcmain() {ctx:=context.Background()// NewTokenAuthClient adds X-Token auth headerauthClient:=calendly.NewTokenAuthClient(&calendly.Config{ApiKey:apiKey})client:=calendly.NewClient(authClient)resp,_,_:=client.Echo(ctx)fmt.Println(resp)}
For complete usage of go-calendly, see the fullpackage docs
API Coverage
- Event Types
- User info
- Webhooks
In general, go-calendly followssemver as closely as wecan for tagging releases of the package. For self-contained libraries, theapplication of semantic versioning is relatively straightforward and generallyunderstood. But because go-calendly is a client library for the Calendly API, whichitself changes behavior, and because we are typically pretty aggressive aboutimplementing preview features of the Calendly API, we've adopted the followingversioning policy:
- We increment themajor version with any incompatible change tonon-preview functionality, including changes to the exported Go API surfaceor behavior of the API.
- We increment theminor version with any backwards-compatible changes tofunctionality, as well as any changes to preview functionality in the CalendlyAPI.
- We increment thepatch version with any backwards-compatible bug fixes.
Preview functionality may take the form of entire methods or simply additionaldata returned from an otherwise non-preview method. Refer to the Calendly APIdocumentation for details on preview functionality.
This library is distributed under the Apache license found in theLICENSEfile.
About
go-calendly is a Go client library for accessing the Calendly APIhttps://godoc.org/github.com/theodesp/go-calendly/calendly