googleapi

package
v0.0.82 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEvent added in v0.0.52

func CreateEvent(srv *calendar.Service, calendarID string, summary string, description string, startDateTime string, endDateTime string) (*calendar.Event, error)

func CreateSheet

func CreateSheet(service *sheets.Service, document *sheets.Spreadsheet, sheetNo int, sheetName string, rows [][]interface{}, columns []string) (int64, error)

func CreateSpreadSheet

func CreateSpreadSheet(srv *sheets.Service, documentName string) (*sheets.Spreadsheet, error)

func DeleteEvent added in v0.0.53

func DeleteEvent(srv *calendar.Service, calendarID string, eventID string) error

func DeleteEvents added in v0.0.53

func DeleteEvents(srv *calendar.Service, calendarID string, eventIDs []string) error

func GetCalendar added in v0.0.60

func GetCalendar(srv *calendar.Service, calendarID string) (*calendar.CalendarListEntry, error)

func GetCalendarTimeZone added in v0.0.54

func GetCalendarTimeZone(srv *calendar.Service, calendarID string) (*time.Location, error)

/ GetCalendarTimeZone

func GetCalendars added in v0.0.51

func GetCalendars(srv *calendar.Service) ([]*calendar.CalendarListEntry, error)

func GetCoordinatesFromStreetAddress

func GetCoordinatesFromStreetAddress(client *maps.Client, address string) (longitude float64, latitude float64, throwErr error)

func GetEvents added in v0.0.49

func GetEvents(srv *calendar.Service, calendarID string, startTime string, endTime string, query string, limit int, orderBy string) ([]*calendar.Event, error)

func NewCalendarService added in v0.0.49

func NewCalendarService(ctx context.Context, oauthConfig *oauth2.Config, token *oauth2.Token) (*calendar.Service, error)

func NewMapClient

func NewMapClient(apiKey string) (*maps.Client, error)

func NewSpreadsheetService

func NewSpreadsheetService(client *http.Client) (*sheets.Service, error)

func PatchEventDates added in v0.0.54

func PatchEventDates(srv *calendar.Service, calendarID string, eventID string, start time.Time, end time.Time) (*calendar.Event, error)

func UpdateColumnHeaders

func UpdateColumnHeaders(service *sheets.Service, document *sheets.Spreadsheet, sheetName string, columns []string) error

func UpdateColumnStyles

func UpdateColumnStyles(service *sheets.Service, document *sheets.Spreadsheet, sheetId int64, columns []ColumnFormatConfig) error

func UpdateRows

func UpdateRows(service *sheets.Service, document *sheets.Spreadsheet, sheetName string, rows [][]interface{}) error

Types

type ColumnFormatConfig

type ColumnFormatConfig interface {
	ColumnIndex() int
	ColumnDataType() string
	ColumnFormat() string
}

type GoogleClient added in v0.0.38

type GoogleClient struct {
	Context context.Context
	Config  *oauth2.Config
	Token   *oauth2.Token
}

func New added in v0.0.38

func New(ctx context.Context, googleClientSecretFilePath string, accessToken *oauth2.Token, scopes []string) (*GoogleClient, error)

func NewFromClientIDSecret added in v0.0.58

func NewFromClientIDSecret(ctx context.Context, clientID string, clientSecret string, scopes []string, accessToken *oauth2.Token) (*GoogleClient, error)

func (*GoogleClient) GetToken added in v0.0.38

func (client *GoogleClient) GetToken() (*oauth2.Token, error)

func (*GoogleClient) NewHttpClient added in v0.0.38

func (client *GoogleClient) NewHttpClient() *http.Client

Jump to

Keyboard shortcuts

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