gogoogleclient

package module
v0.0.0-...-3ae5881 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2017 License: MIT Imports: 7 Imported by: 0

README

GoGoogleClient

A golang package to help with creating service accounts to google api services.

Environment

The authentication information needed to connect to a Google service account should be downloaded as a json file from the Google developer console.

The location of this file should then be stored in the environment variable GOOGLE_APPLICATION_CREDENTIALS.

Usage

The Client method returns an authenticated http client for the given API scope:

client := gogoogleclient.Client("https://www.googleapis.com/auth/analytics") 
data, error := client.Get(appropriate http request to API)

Dependencies

  • golang.org/x/oauth2
  • golang.org/x/oauth2/google
  • github.com/stretchr/testify/assert

Documentation

Overview

Package gogoogleclient helps service apps connect to google apis

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(scope string) *http.Client

Client returns a google service client

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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