Code Monkey home page Code Monkey logo

google-photos-api-client-go's Introduction

Go Report Card

Google photos API client (Go library)

The official google photos client doesn't have upload functionality, this repo aims to complete it with upload functionality and improve ease of use for classic use cases.

It contains three packages, github.com/nmrshll/google-photos-api-client-go/lib-gphotos simply wraps the official library to offer the same functionality plus upload, the two other packages try to make it easier to use in classic cases:

Quick start

Download using go get github.com/nmrshll/google-photos-api-client-go

Then use this way:

In a CLI tool or desktop/mobile app (when your app is fully client-side and doesn't have its own server-side part):

func main() {
	// ask the user to authenticate on google in the browser
	photosClient, err := gphotosclient.NewClient(
		gphotosclient.AuthenticateUser(
			gphotoslib.NewOAuthConfig(gphotoslib.APIAppCredentials{
				ClientID:     "________________",
				ClientSecret: "____________________"},
			),
		),
	)
	if err != nil {
		log.Fatal(err)
	}

	_, err = photosClient.UploadFile("/path/to/file")
	if err != nil {
		log.Fatal(err)
	}
}

on the server side:

func main() {
	fmt.Println("Hello world !")
}

More Examples

server-side:

no server, all client side (desktop,cli,mobile,...):

google-photos-api-client-go's People

Contributors

nmrshll avatar nhorvath avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.