ads

package
v0.0.0-...-c86a4d9 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleAdsClient

type GoogleAdsClient struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(params *GoogleAdsClientParams) (*GoogleAdsClient, error)

NewClient creates a new client with specified credential params

func NewClientFromStorage

func NewClientFromStorage(filepath string) (*GoogleAdsClient, error)

NewClientFromStorage creates a new client instance from specified "google-ads.json" file

func (*GoogleAdsClient) Conn

func (g *GoogleAdsClient) Conn() *grpc.ClientConn

Conn returns a pointer to the clients gRPC connection

func (*GoogleAdsClient) Context

func (g *GoogleAdsClient) Context() context.Context

Context returns the context of the client

func (*GoogleAdsClient) TokenIsValid

func (g *GoogleAdsClient) TokenIsValid() bool

TokenIsValid returns a bool indicating if the generated access token is valid

type GoogleAdsClientParams

type GoogleAdsClientParams struct {
	ClientID        string
	ClientSecret    string
	DeveloperToken  string
	RefreshToken    string
	LoginCustomerID string
}

func ReadCredentialsFile

func ReadCredentialsFile(filepath string) (*GoogleAdsClientParams, error)

ReadCredentialsFile reads a credentials JSON file and returns the exported config

Jump to

Keyboard shortcuts

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