Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

go-calcom

БесплатноБез исполняемых скриптовНе проверен

Writes Go code with go-calcom (package calcom, github.com/psyb0t/go-calcom), an unofficial client for Cal.com API v2 generated with oapi-codegen from the…

psyb0tот psyb0t547 установок в других каталогах

Об этом скилле

go-calcom

Unofficial, typed Go client for Cal.com API v2, in package calcom at the module root.

For install, operation names, headers and pagination, see references/setup.md.

Security & safety

  • Use Bearer auth from CALCOM_API_KEY. Never hardcode, commit or log credentials or request headers.
  • Pass https://api.cal.com as the server, or another deployment only when explicitly configured. Generated paths already contain /v2.
  • Creating, rescheduling or cancelling bookings and editing schedules, event types, teams or webhooks changes account data. Perform those operations only when requested and only for the intended resources.

When to use

  • Go code needs to inspect availability, bookings, event types, schedules, calendars or profile.
  • Go code needs to manage Cal.com scheduling resources at the user's request.
  • The project already imports github.com/psyb0t/go-calcom.

When NOT to use

  • The code is not Go. This module ships only a Go package.
  • You need a client maintained by Cal.com. This client is unofficial.
  • You want to change generated code. Read AGENTS.md in the repository.

Finding endpoints and types

The examples below cover a few calls. Every operation in the spec has a generated method, and the spec's descriptions are on them as Go doc comments. Look names and fields up instead of guessing. After go get github.com/psyb0t/go-calcom, from inside your module:

go doc github.com/psyb0t/go-calcom ClientWithResponsesInterface                 # every endpoint method
go doc github.com/psyb0t/go-calcom BookingsController20240813GetBookingsParams  # one method, params type or model
go doc -all github.com/psyb0t/go-calcom                                         # the whole package

The same documentation is at https://pkg.go.dev/github.com/psyb0t/go-calcom.

Method names come from the spec's operation IDs, which include controller names and endpoint versions (BookingsController20240813GetBookings). <OperationId>WithResponse takes the context, then the path parameters in order, then *<OperationId>Params when the operation has query or header parameters, then the request body when it has one. The Authorization and CalApiVersion headers are fields of that params struct. The JSON200 field (or JSON201 and so on, per declared status) holds the decoded body; it is nil for any other status.

Usage

import (
    "context"
    "net/http"
    "os"

    "github.com/psyb0t/go-calcom"
)

token := "Bearer " + os.Getenv("CALCOM_API_KEY")
auth := calcom.WithRequestEditorFn(
    func(_ context.Context, req *http.Request) error {
        req.Header.Set("Authorization", token)
        return nil
    },
)
client, err := calcom.NewClientWithResponses("https://api.cal.com", auth)
if err != nil {
    panic(err)
}
res, err := client.MeControllerGetMeWithResponse(
    context.Background(),
    &calcom.MeControllerGetMeParams{Authorization: token},
)
if err != nil {
    panic(err)
}
if res.StatusCode() != http.StatusOK || res.JSON200 == nil {
    panic(res.Status())
}
_ = res.JSON200.Data.Username

Auth is represented by operation header parameters in the source spec. Populate required Authorization fields even when a request editor sets the final header. Many operations also require CalApiVersion; use the endpoint's documented version, not a single global version. /v2/me has no version header in the spec.

The error return covers transport and decoding failures. For API errors, inspect StatusCode() and Body; parsed success fields can be nil. Optional and nullable model fields can be pointers. Number fields are float64.

Method names follow the source operation IDs, including controller names and endpoint versions. The source document is titled Cal.diy API v2, spec version 1.0.0. It defines the generated coverage; check the online docs before assuming it includes every hosted API operation.

Полный SKILL.md на ClawHub

Установить go-calcom в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл go-calcom?

Writes Go code with go-calcom (package calcom, github.com/psyb0t/go-calcom), an unofficial client for Cal.com API v2 generated with oapi-codegen from the public OpenAPI document, with typed methods for bookings, event types, available slots, schedules, calendars, teams, webhooks and profile. Use when Go code needs Cal.com scheduling operations or already imports go-calcom.

Как установить скилл go-calcom?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл go-calcom запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить go-calcom с