googleapi

package module
v0.0.0-...-6cfd092 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2017 License: MIT Imports: 16 Imported by: 0

README

Google API Helper Build Status

Helper functions on using Google APIs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 GetCoordinatesFromStreetAddress

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

func NewHttpClient

func NewHttpClient(secretFilePath string) (*http.Client, error)

NewHttpClient returns an authenticated HTTP client which can be used by google API clients/services

func NewMapClient

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

func NewSpreadsheetService

func NewSpreadsheetService(client *http.Client) (*sheets.Service, 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
}

Jump to

Keyboard shortcuts

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