lib

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GSheetService

type GSheetService struct {
	*sheets.Service
}

func NewGsheetService

func NewGsheetService(credentialFilePath string) (gsrv *GSheetService, err error)

func NewGsheetServiceV2

func NewGsheetServiceV2() (gsrv *GSheetService, err error)

func (*GSheetService) Append

func (srv *GSheetService) Append(
	spreadsheetId string, range_ string, values [][]interface{},
) (resp *sheets.AppendValuesResponse, err error)

API: POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}:append DOC: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append

func (*GSheetService) ReadSheet

func (srv *GSheetService) ReadSheet(spreadsheetId, readRange string) (values [][]string)
  • Example: spreadsheetId := "1AGHH6abcXzBmfC5e9r50t3wXKhlUs5XIE-fj1U4fV0Q" readRange := "Log1!A2:B" *

func (*GSheetService) Search

func (srv *GSheetService) Search(
	spreadsheetId string,
) (result *sheets.SearchDeveloperMetadataResponse, err error)

func (*GSheetService) Update

func (srv *GSheetService) Update(
	spreadsheetId, updateRange string, values *sheets.ValueRange,
) (result *sheets.UpdateValuesResponse, err error)

type ISheetService

type ISheetService interface {
	ReadSheet(spreadsheetId, readRange string) (values [][]string)
	Append(spreadsheetId string, range_ string, values [][]interface{}) (resp *sheets.AppendValuesResponse, err error)
}

Jump to

Keyboard shortcuts

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