Documentation
¶
Overview ¶
Package imagespull implements `gplay metadata images pull`: it rapatriates the Store images live on Google Play for a package into the local Metadata tree on disk, under each locale's images/ sub-directory, alongside the text Listing `.txt` files. It reads ONLY from Play, then writes additively: resolve --package/--dir, open a read-only Edit, enumerate the app's locales, list each of the 9 image slots, download each image's bytes from its API url, and hand the resulting imagetree.Tree to imagetree.Write. The Edit is opened and discarded via edits.WithReadOnlyEdit, never committed.
Filename synthesis (ADR-0013): images.list returns no original filename, so pull names singular slots `<type>.<ext>` and gallery slots `<type>/1.<ext>`… `N.<ext>` in display order, with the extension sniffed from the image bytes (PNG/JPEG magic), not the response Content-Type. A slot with no images online writes no directory/file, so pull never emits the "empty" form and a later `apply` sees no delta: the pull → apply no-op invariant.
Index ¶
Constants ¶
const DefaultDir = "./metadata"
DefaultDir matches the rest of the metadata family and `fastlane supply`.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
NewCommand returns the cobra command for `gplay metadata images pull`.
func Run ¶
func Run(rc *kernel.RunContext, in Input) (output.Renderable, error)
Run resolves inputs, opens a read-only Edit, lists every (locale, imageType) slot, downloads the bytes, and writes the resulting tree additively.
Types ¶
type Payload ¶
type Payload struct {
Package string `json:"package"`
Dir string `json:"dir"`
Pulled []slotReport `json:"pulled"`
Summary summary `json:"summary"`
}
Payload is a gplay-defined summary of what pull WROTE (not an API pass-through): the on-disk result, not the wire payload, is what the operator cares about. Pulled is in (locale, canonical type) order.