mirror of
https://github.com/i1v/googleplay
synced 2024-09-21 12:19:26 +00:00
renamed: blog/2023-02-27-protos/AndroidAppDeliveryData.java -> blog/java/AndroidAppDeliveryData.java
This commit is contained in:
parent
a8cc400710
commit
3c3a29d42f
33 changed files with 73 additions and 58 deletions
2
.ignore
2
.ignore
|
@ -1 +1 @@
|
|||
docs/com/google
|
||||
java
|
||||
|
|
3
blog/go.mod
Normal file
3
blog/go.mod
Normal file
|
@ -0,0 +1,3 @@
|
|||
module blog
|
||||
|
||||
go 1.20
|
|
@ -17,7 +17,7 @@ versionCode | 25
|
|||
versionName | 7.1.2
|
||||
|
||||
- https://apkmirror.com/apk/google-inc/google-play-store
|
||||
- https://github.com/MCMrARM/Google-Play-API/blob/master/proto/gsf.proto
|
||||
- https://apkmirror.com/apk/google-inc/google-services-framework
|
||||
|
||||
## How to install Android App Bundle?
|
||||
|
||||
|
|
20
checkin.go
20
checkin.go
|
@ -143,16 +143,6 @@ func (c Config) Checkin(native_platform string) (*Response, error) {
|
|||
return &Response{res}, nil
|
||||
}
|
||||
|
||||
// Checkin$AndroidCheckinResponse
|
||||
type Device struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// AndroidId
|
||||
func (d Device) ID() (uint64, error) {
|
||||
return d.Get_Fixed64(7)
|
||||
}
|
||||
|
||||
type Native_Platform map[int64]string
|
||||
|
||||
var Platforms = Native_Platform{
|
||||
|
@ -174,3 +164,13 @@ func (n Native_Platform) String() string {
|
|||
}
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// Checkin$AndroidCheckinResponse
|
||||
type Device struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// AndroidId
|
||||
func (d Device) ID() (uint64, error) {
|
||||
return d.Get_Fixed64(7)
|
||||
}
|
||||
|
|
91
delivery.go
91
delivery.go
|
@ -9,33 +9,6 @@ import (
|
|||
"strconv"
|
||||
)
|
||||
|
||||
type Delivery struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
func (d Delivery) Additional_File() []File_Metadata {
|
||||
var files []File_Metadata
|
||||
// .additionalFile
|
||||
for _, file := range d.Get_Messages(4) {
|
||||
files = append(files, File_Metadata{file})
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
// .downloadUrl
|
||||
func (d Delivery) Download_URL() (string, error) {
|
||||
return d.Get_String(3)
|
||||
}
|
||||
|
||||
func (d Delivery) Split_Data() []Split_Data {
|
||||
var splits []Split_Data
|
||||
// .splitDeliveryData
|
||||
for _, split := range d.Get_Messages(15) {
|
||||
splits = append(splits, Split_Data{split})
|
||||
}
|
||||
return splits
|
||||
}
|
||||
|
||||
type File struct {
|
||||
Package_Name string
|
||||
Version_Code uint64
|
||||
|
@ -68,20 +41,6 @@ func (f File) OBB(file_type uint64) string {
|
|||
return string(b)
|
||||
}
|
||||
|
||||
type File_Metadata struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// .downloadUrl
|
||||
func (f File_Metadata) Download_URL() (string, error) {
|
||||
return f.Get_String(4)
|
||||
}
|
||||
|
||||
// .fileType
|
||||
func (f File_Metadata) File_Type() (uint64, error) {
|
||||
return f.Get_Varint(1)
|
||||
}
|
||||
|
||||
func (h Header) Delivery(app string, ver uint64) (*Delivery, error) {
|
||||
req, err := http.NewRequest(
|
||||
"GET", "https://play-fe.googleapis.com/fdfe/delivery", nil,
|
||||
|
@ -131,16 +90,60 @@ func (h Header) Delivery(app string, ver uint64) (*Delivery, error) {
|
|||
return &del, nil
|
||||
}
|
||||
|
||||
// .downloadUrl
|
||||
func (d Delivery) Download_URL() (string, error) {
|
||||
return d.Get_String(3)
|
||||
}
|
||||
|
||||
func (d Delivery) Split_Data() []Split_Data {
|
||||
var splits []Split_Data
|
||||
// .splitDeliveryData
|
||||
for _, split := range d.Get_Messages(15) {
|
||||
splits = append(splits, Split_Data{split})
|
||||
}
|
||||
return splits
|
||||
}
|
||||
|
||||
// AndroidAppDeliveryData
|
||||
type Delivery struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
func (d Delivery) Additional_File() []App_File_Metadata {
|
||||
var files []App_File_Metadata
|
||||
// .additionalFile
|
||||
for _, file := range d.Get_Messages(4) {
|
||||
files = append(files, App_File_Metadata{file})
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
// SplitDeliveryData
|
||||
type Split_Data struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// .id
|
||||
func (s Split_Data) ID() (string, error) {
|
||||
return s.Get_String(1)
|
||||
}
|
||||
|
||||
// .downloadUrl
|
||||
func (s Split_Data) Download_URL() (string, error) {
|
||||
return s.Get_String(5)
|
||||
}
|
||||
|
||||
// .id
|
||||
func (s Split_Data) ID() (string, error) {
|
||||
return s.Get_String(1)
|
||||
// AppFileMetadata
|
||||
type App_File_Metadata struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// .fileType
|
||||
func (a App_File_Metadata) File_Type() (uint64, error) {
|
||||
return a.Get_Varint(1)
|
||||
}
|
||||
|
||||
// .downloadUrl
|
||||
func (a App_File_Metadata) Download_URL() (string, error) {
|
||||
return a.Get_String(4)
|
||||
}
|
||||
|
|
13
details.go
13
details.go
|
@ -171,8 +171,6 @@ func (h Header) Details(app string) (*Details, error) {
|
|||
return &det, nil
|
||||
}
|
||||
|
||||
///////////////
|
||||
|
||||
// .details.appDetails.installationSize
|
||||
func (d Details) Installation_Size() (uint64, error) {
|
||||
value, err := d.Get(13).Get(1).Get_Varint(9)
|
||||
|
@ -190,3 +188,14 @@ func (d Details) File() []File_Metadata {
|
|||
}
|
||||
return files
|
||||
}
|
||||
|
||||
// FileMetadata
|
||||
// This is similar to AppFileMetadata, but notably field 4 is different.
|
||||
type File_Metadata struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// .fileType
|
||||
func (f File_Metadata) File_Type() (uint64, error) {
|
||||
return f.Get_Varint(1)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue