Documentation
¶
Overview ¶
Package meet provides a client for the Google Meet API v2.
This package enables creation and configuration of Google Meet spaces with automatic recording, transcription, and Gemini note-taking, as well as retrieval of meeting artifacts from completed sessions. It follows the same account-based authentication pattern as the Gmail and Calendar clients.
Space Configuration: As of April 2025, Google Meet API v2 supports programmatic configuration of meeting spaces, allowing you to enable automatic recording, transcription, and Gemini note-taking when creating or updating spaces.
Key features:
- Create new Meet spaces with optional auto-recording, transcription, and note-taking
- Configure existing spaces to enable/disable automatic artifacts
- Retrieve conference record metadata
- List and access meeting recordings
- List and access meeting transcripts
- Multi-account support for managing multiple Google Workspace accounts
Authentication: The client uses OAuth2 with the meetings.space.readonly and meetings.space.settings scopes. For HTTP/SSE transports: OAuth is handled automatically by the MCP client. For STDIO transport: Tokens are loaded from the file system (~/.cache/inboxfewer/).
Example usage:
ctx := context.Background()
client, err := meet.NewClient(ctx)
if err != nil {
log.Fatal(err)
}
// Create a space with auto-recording enabled
space, err := client.CreateSpace(meet.SpaceInput{
Config: &meet.SpaceConfigInput{
ArtifactConfig: &meet.ArtifactConfigInput{
EnableRecording: true,
EnableTranscription: true,
},
},
})
if err != nil {
log.Fatal(err)
}
// List recordings for a conference
recordings, err := client.ListRecordings("spaces/SPACE_ID/conferences/CONFERENCE_ID")
if err != nil {
log.Fatal(err)
}
Index ¶
- func HasToken() bool
- func HasTokenForAccount(account string) bool
- func HasTokenForAccountWithProvider(account string, provider google.TokenProvider) bool
- type ArtifactConfig
- type ArtifactConfigInput
- type ArtifactGenerationConfig
- type Client
- func NewClient(ctx context.Context) (*Client, error)
- func NewClientForAccount(ctx context.Context, account string) (*Client, error)
- func NewClientForAccountWithProvider(ctx context.Context, account string, tokenProvider google.TokenProvider) (*Client, error)
- func NewClientWithProvider(ctx context.Context, provider google.TokenProvider) (*Client, error)
- func (c *Client) Account() string
- func (c *Client) CreateSpace(input SpaceInput) (*Space, error)
- func (c *Client) GetConferenceRecord(name string) (*ConferenceRecordSummary, error)
- func (c *Client) GetRecording(name string) (*Recording, error)
- func (c *Client) GetSpace(name string) (*Space, error)
- func (c *Client) GetTranscript(name string) (*Transcript, error)
- func (c *Client) GetTranscriptEntries(transcriptName string) ([]TranscriptEntry, error)
- func (c *Client) ListRecordings(conferenceRecordName string) ([]Recording, error)
- func (c *Client) ListTranscripts(conferenceRecordName string) ([]Transcript, error)
- func (c *Client) UpdateSpaceConfig(spaceName string, input SpaceConfigInput) (*Space, error)
- type ConferenceRecordSummary
- type DriveDestination
- type Recording
- type Space
- type SpaceConfig
- type SpaceConfigInput
- type SpaceInput
- type Transcript
- type TranscriptEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasToken ¶
func HasToken() bool
HasToken checks if a valid OAuth token exists for the default account
func HasTokenForAccount ¶
HasTokenForAccount checks if a valid OAuth token exists for the specified account
func HasTokenForAccountWithProvider ¶ added in v0.0.27
func HasTokenForAccountWithProvider(account string, provider google.TokenProvider) bool
HasTokenForAccountWithProvider checks if a valid OAuth token exists for the specified account
Types ¶
type ArtifactConfig ¶
type ArtifactConfig struct {
// RecordingConfig controls automatic recording
RecordingConfig *ArtifactGenerationConfig
// TranscriptionConfig controls automatic transcription
TranscriptionConfig *ArtifactGenerationConfig
// SmartNotesConfig controls automatic note-taking (Gemini)
SmartNotesConfig *ArtifactGenerationConfig
}
ArtifactConfig contains settings for automatic artifact generation
type ArtifactConfigInput ¶
type ArtifactConfigInput struct {
// EnableRecording enables automatic recording
EnableRecording bool
// EnableTranscription enables automatic transcription
EnableTranscription bool
// EnableSmartNotes enables automatic note-taking (Gemini)
EnableSmartNotes bool
}
ArtifactConfigInput represents input for artifact configuration
type ArtifactGenerationConfig ¶
type ArtifactGenerationConfig struct {
// Enabled indicates whether this artifact should be auto-generated
Enabled bool
}
ArtifactGenerationConfig controls whether an artifact type is auto-generated
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the Google Meet service
func NewClient ¶
NewClient creates a new Meet client with OAuth2 authentication for the default account For CLI usage, it will prompt for auth code via stdin if no token exists For MCP usage, it will return an error if no token exists
func NewClientForAccount ¶
NewClientForAccount creates a new Meet client with OAuth2 authentication for a specific account Uses the default file-based token provider for backward compatibility
func NewClientForAccountWithProvider ¶ added in v0.0.27
func NewClientForAccountWithProvider(ctx context.Context, account string, tokenProvider google.TokenProvider) (*Client, error)
NewClientForAccountWithProvider creates a new Meet client with OAuth2 authentication for a specific account The OAuth token is retrieved from the provided token provider
func NewClientWithProvider ¶ added in v0.0.27
NewClientWithProvider creates a new Meet client with OAuth2 authentication for the default account using the provided token provider
func (*Client) CreateSpace ¶
func (c *Client) CreateSpace(input SpaceInput) (*Space, error)
CreateSpace creates a new Google Meet space with optional configuration
func (*Client) GetConferenceRecord ¶
func (c *Client) GetConferenceRecord(name string) (*ConferenceRecordSummary, error)
GetConferenceRecord retrieves a conference record by name
func (*Client) GetRecording ¶
GetRecording retrieves a specific recording by name
func (*Client) GetTranscript ¶
func (c *Client) GetTranscript(name string) (*Transcript, error)
GetTranscript retrieves a specific transcript by name
func (*Client) GetTranscriptEntries ¶
func (c *Client) GetTranscriptEntries(transcriptName string) ([]TranscriptEntry, error)
GetTranscriptEntries retrieves all entries from a transcript
func (*Client) ListRecordings ¶
ListRecordings lists all recordings for a conference record
func (*Client) ListTranscripts ¶
func (c *Client) ListTranscripts(conferenceRecordName string) ([]Transcript, error)
ListTranscripts lists all transcripts for a conference record
func (*Client) UpdateSpaceConfig ¶
func (c *Client) UpdateSpaceConfig(spaceName string, input SpaceConfigInput) (*Space, error)
UpdateSpaceConfig updates the configuration of an existing Google Meet space
type ConferenceRecordSummary ¶
type ConferenceRecordSummary struct {
// Name is the resource name of the conference record
// Format: spaces/{space}/conferenceRecords/{conferenceRecord}
Name string
// StartTime is when the conference started
StartTime time.Time
// EndTime is when the conference ended
EndTime time.Time
// SpaceID is the ID of the Meet space
SpaceID string
// MeetingCode is the meeting code (e.g., "abc-defg-hij")
MeetingCode string
// RecordingCount is the number of recordings available
RecordingCount int
// TranscriptCount is the number of transcripts available
TranscriptCount int
}
ConferenceRecordSummary represents a summary of a conference record
type DriveDestination ¶
type DriveDestination struct {
// File is the resource name of the Drive file
File string
// ExportURI is the URI to download/export the file
ExportURI string
}
DriveDestination contains information about a file stored in Google Drive
type Recording ¶
type Recording struct {
// Name is the resource name of the recording
// Format: spaces/{space}/conferenceRecords/{conferenceRecord}/recordings/{recording}
Name string
// State is the current state of the recording (e.g., "FILE_GENERATED")
State string
// StartTime is when the recording started
StartTime time.Time
// EndTime is when the recording ended
EndTime time.Time
// DriveDestination contains Google Drive file information
DriveDestination *DriveDestination
}
Recording represents a Google Meet recording
type Space ¶
type Space struct {
// Name is the resource name of the space
// Format: spaces/{space}
Name string
// MeetingURI is the URI to join the meeting
MeetingURI string
// MeetingCode is the meeting code (e.g., "abc-defg-hij")
MeetingCode string
// Config is the configuration for the space
Config *SpaceConfig
// ActiveConference is the resource name of the active conference in this space
ActiveConference string
}
Space represents a Google Meet space
type SpaceConfig ¶
type SpaceConfig struct {
// AccessType defines who can join without knocking
AccessType string
// EntryPointAccess defines which entry points can be used
EntryPointAccess string
// ArtifactConfig contains auto artifact generation settings
ArtifactConfig *ArtifactConfig
}
SpaceConfig represents the configuration for a Google Meet space
type SpaceConfigInput ¶
type SpaceConfigInput struct {
// AccessType defines who can join without knocking
// Values: "OPEN", "TRUSTED", "RESTRICTED"
AccessType string
// EntryPointAccess defines which entry points can be used
// Values: "ALL", "CREATOR_APP_ONLY"
EntryPointAccess string
// ArtifactConfig contains auto artifact generation settings
ArtifactConfig *ArtifactConfigInput
}
SpaceConfigInput represents input for space configuration
type SpaceInput ¶
type SpaceInput struct {
// Config is the configuration for the space
Config *SpaceConfigInput
}
SpaceInput represents input for creating or updating a space
type Transcript ¶
type Transcript struct {
// Name is the resource name of the transcript
// Format: spaces/{space}/conferenceRecords/{conferenceRecord}/transcripts/{transcript}
Name string
// State is the current state of the transcript (e.g., "FILE_GENERATED")
State string
// StartTime is when transcription started
StartTime time.Time
// EndTime is when transcription ended
EndTime time.Time
// Language is the language of the transcript (BCP 47 code, e.g., "en-US")
Language string
// DriveDestination contains Google Drive file information
DriveDestination *DriveDestination
}
Transcript represents a Google Meet transcript
type TranscriptEntry ¶
type TranscriptEntry struct {
// Name is the resource name of the transcript entry
// Format: spaces/{space}/conferenceRecords/{conferenceRecord}/transcripts/{transcript}/entries/{entry}
Name string
// Participant is the name of the participant who spoke
Participant string
// Text is the transcribed text
Text string
// Language is the language of this entry (BCP 47 code)
Language string
// StartTime is when the participant started speaking
StartTime time.Time
// EndTime is when the participant finished speaking
EndTime time.Time
}
TranscriptEntry represents a single entry in a transcript