zoom

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2018 License: MIT Imports: 13 Imported by: 0

README

zoom-go

Port of https://github.com/benbalter/zoom-launcher to zoom. Go easy, it's my first Go project.

Installation

To install, run:

$ go get github.com/benbalter/zoom-go/cmd/zoom

This will install a zoom executable file into $GOPATH/bin/zoom.

Usage

Ensure $GOPATH/bin is in your $PATH, and run zoom! That's all.

Authorization

The first time you run zoom, you will see instructions for how to create a Google app in the Developer Console, authorize it to access your calendar, download credentials, then import the credentials into zoom. After you import, you should be walked through the process of authorizing in the browser. Paste the authorization code back into your terminal, and vòila, zoom will be all configured for your next run.

Documentation

Overview

Package zoom provides a way to fetch the next Zoom meeting in your Google calendar.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoogleCalendarAuthorizationURL

func GoogleCalendarAuthorizationURL(provider config.Provider) (string, error)

GoogleCalendarAuthorizationURL returns the authorization URL for the service configured in the provider.

func HandleGoogleCalendarAuthorization

func HandleGoogleCalendarAuthorization(provider config.Provider, authCode string) error

HandleGoogleCalendarAuthorization takes an auth code and generates the necessary token and stores it on the provider.

func HumanizedStartTime

func HumanizedStartTime(event *calendar.Event) string

HumanizedStartTime converts the event's start time to a human-friendly statement.

func IsMeetingSoon

func IsMeetingSoon(event *calendar.Event) bool

IsMeetingSoon returns true if the meeting is less than 5 minutes from now.

func MeetingStartTime

func MeetingStartTime(event *calendar.Event) (time.Time, error)

MeetingStartTime returns the calendar event's start time.

func MeetingSummary added in v0.2.0

func MeetingSummary(event *calendar.Event) string

MeetingSummary generates a one-line summary of the meeting as a string.

func MeetingURLFromEvent

func MeetingURLFromEvent(event *calendar.Event) (*url.URL, bool)

MeetingURLFromEvent returns a URL if the event is a Zoom meeting.

func NewGoogleCalendarService

func NewGoogleCalendarService(provider config.Provider) (*calendar.Service, error)

NewGoogleCalendarService creates a new Google Calendar service with the credentials in the provider.

func NewGoogleClient

func NewGoogleClient(provider config.Provider) (*http.Client, error)

NewGoogleClient creates a new client using the token from the given provider.

func NextEvent

func NextEvent(service *calendar.Service) (*calendar.Event, error)

NextEvent returns the next calendar event in your primary calendar. It will list at most 10 events, and select the first one with a Zoom URL if one exists.

Types

This section is empty.

Directories

Path Synopsis
cmd
zoom
Command zoom prints your next Google Calendar event and opens Zoom if the meeting is a zoom meeting.
Command zoom prints your next Google Calendar event and opens Zoom if the meeting is a zoom meeting.
Package config provides methods for fetching and storing configuration.
Package config provides methods for fetching and storing configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL