googlephotos

package
v0.0.0-...-124a127 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const UPLOAD_URL = "https://photoslibrary.googleapis.com/v1/uploads"

Variables

This section is empty.

Functions

func LoginServer

func LoginServer(data chan *string, httpListenPort int, redirectPath string)

Types

type BatchCreateMediaItemsRequest

type BatchCreateMediaItemsRequest struct {
	NewMediaItems []NewMediaItem `json:"newMediaItems"`
}

type BatchCreateMediaItemsResponse

type BatchCreateMediaItemsResponse struct {
	NewMediaItemResults []NewMediaItemResult `json:"newMediaItemResults"`
}

type ContributorInfo

type ContributorInfo struct {
	ProfilePictureBaseUrl string `json:"profilePictureBaseUrl"`
	DisplayName           string `json:"displayName"`
}

type GooglePhotosApi

type GooglePhotosApi struct {
	OidcClient *http.Client
}

func (*GooglePhotosApi) Upload

func (g *GooglePhotosApi) Upload(filePath string, fileName string) error

type Login

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

func NewLogin

func NewLogin(c configuration.Conf) Login

func (*Login) PerformLogin

func (l *Login) PerformLogin(filePath string) (*http.Client, error)

type MediaItem

type MediaItem struct {
	Id              string          `json:"id"`
	Description     string          `json:"description"`
	ProductUrl      string          `json:"productUrl"`
	BaseUrl         string          `json:"baseUrl"`
	MimeType        string          `json:"mimeType"`
	Filename        string          `json:"filename"`
	MediaMetadata   MediaMetadata   `json:"mediaMetadata"`
	ContributorInfo ContributorInfo `json:"contributorInfo"`
}

type MediaMetadata

type MediaMetadata struct {
	CreationTime string `json:"creationTime"`
	Width        string `json:"width"`
	Height       string `json:"height"`
	Photo        Photo  `json:"photo"`
}

type NewMediaItem

type NewMediaItem struct {
	Description     string          `json:"description"`
	SimpleMediaItem SimpleMediaItem `json:"simpleMediaItem"`
}

type NewMediaItemResult

type NewMediaItemResult struct {
	UploadToken string    `json:"uploadToken"`
	MediaItem   MediaItem `json:"mediaItem"`
}

type Photo

type Photo struct {
	CameraMake      string `json:"cameraMake"`
	CameraModel     string `json:"cameraModel"`
	FocalLength     int    `json:"focalLength"`
	ApertureFNumber int    `json:"apertureFNumber"`
	IsoEquivalent   int    `json:"isoEquivalent"`
	ExposureTime    string `json:"exposureTime"`
}

type SimpleMediaItem

type SimpleMediaItem struct {
	UploadToken string `json:"uploadToken"`
	FileName    string `json:"fileName"`
}

Jump to

Keyboard shortcuts

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