googleapi

package
v0.0.0-...-471bdaf Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGoogleApiPostXml

func BuildGoogleApiPostXml(os Os, app App) ([]byte, error)
func GetPermalinks(resp Response) ([]string, error)

Types

type Action

type Action struct {
	Event string `xml:"event,attr"`
	Run   string `xml:"run,attr"`
}

type App

type App struct {
	Appid       string   `xml:"appid,attr"`
	Version     string   `xml:"version,attr"`
	Ap          string   `xml:"ap,attr"`
	UpdateCheck struct{} `xml:"updatecheck"`
}

type Os

type Os struct {
	Platform     string `xml:"platform,attr"`
	Version      string `xml:"version,attr"`
	Architecture string `xml:"arch,attr"`
}

type Request

type Request struct {
	XMLName  xml.Name `xml:"request"`
	Protocol string   `xml:"protocol,attr"`
	Os       Os       `xml:"os"`
	App      App      `xml:"app"`
}

type Response

type Response struct {
	XMLName xml.Name `xml:"response"`
	App     struct {
		Status      string `xml:"status"`
		UpdateCheck struct {
			Manifest struct {
				Version string   `xml:"version,attr"`
				Actions []Action `xml:"actions>action"`
			} `xml:"manifest"`

			Urls []struct {
				Codebase string `xml:"codebase,attr"`
			} `xml:"urls>url"`
		} `xml:"updatecheck"`
	} `xml:"app"`
}

NOTE: Use `InnerXML string `xml:",innerxml"“ to inspect unknown fields: https://stackoverflow.com/a/38509722

func PostGoogleAPI

func PostGoogleAPI(os Os, app App) (Response, error)

Jump to

Keyboard shortcuts

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