-
Notifications
You must be signed in to change notification settings - Fork 43
/
market.proto
220 lines (190 loc) · 5.9 KB
/
market.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
option java_package = "com.gc.android.market.api.model";
enum AppType {
NONE = 0;
APPLICATION = 1;
RINGTONE = 2;
WALLPAPER = 3;
GAME = 4;
}
message AppsRequest {
optional AppType appType = 1;
optional string query = 2;
optional string categoryId = 3;
optional string appId = 4;
optional bool withExtendedInfo = 6;
enum OrderType {
NONE = 0;
POPULAR = 1;
NEWEST = 2;
FEATURED = 3;
}
enum ViewType {
ALL = 0;
FREE = 1;
PAID = 2;
}
optional OrderType orderType = 7 [default = NONE];
optional uint64 startIndex = 8;
optional int32 entriesCount = 9;
optional ViewType viewType = 10 [default = ALL];
}
message AppsResponse {
repeated App app = 1;
optional int32 entriesCount = 2;
}
message Category {
optional int32 appType = 2;
optional string title = 4;
optional string categoryId = 3;
optional string subtitle = 5;
repeated Category subCategories = 8;
}
message CommentsRequest {
optional string appId = 1;
optional int32 startIndex = 2;
optional int32 entriesCount = 3;
}
message CommentsResponse {
repeated Comment comments = 1;
optional int32 entriesCount = 2;
}
message App {
optional string id = 1;
optional string title = 2;
optional AppType appType = 3 [default = NONE];
optional string creator = 4;
optional string version = 5;
optional string price = 6;
optional string rating = 7;
optional int32 ratingsCount = 8;
optional group ExtendedInfo = 12 {
optional string description = 13;
optional int32 downloadsCount = 14;
repeated string permissionId = 15;
optional int32 installSize = 16;
optional string packageName = 17;
optional string category = 18;
optional string contactEmail = 20;
optional string downloadsCountText = 23;
optional string contactPhone = 26;
optional string contactWebsite = 27;
// V2
optional int32 screenshotsCount = 30;
optional string promoText = 31;
// V3
optional string recentChanges = 38;
optional string promotionalVideo = 43;
}
optional string creatorId = 22;
optional string packageName = 24;
optional int32 versionCode = 25;
//V2
optional string priceCurrency = 32;
optional int32 priceMicros = 33;
}
message Comment {
optional string text = 1;
optional int32 rating = 2;
optional string authorName = 3;
optional uint64 creationTime = 4;
optional string authorId = 5;
}
message CategoriesRequest {
}
message CategoriesResponse {
repeated Category categories = 1;
}
message SubCategoriesRequest {
optional AppType appType = 1;
}
message SubCategoriesResponse {
repeated Category category = 1;
optional string subCategoryDisplay = 2;
optional int32 subCategoryId = 3;
}
// operator : http://www.2030.tk/wiki/Android_market_switch
// operatorNumeric : see http://en.wikipedia.org/wiki/Mobile_Network_Code
message RequestContext {
required string authSubToken = 1; // authsub token for service 'android'
required bool isSecure = 2; // is this a secure request or not
required int32 version = 3; // always 1002
required string androidId = 4; // android id converted to hexadecimal
optional string deviceAndSdkVersion = 5; // ro.product.device ':' ro.build.version.sdk
optional string userLanguage = 6; // ro.product.locale.language
optional string userCountry = 7; // ro.product.locale.region
optional string operatorAlpha = 8; // gsm.operator.alpha
optional string simOperatorAlpha = 9; // gsm.sim.operator.alpha
optional string operatorNumeric = 10; // gsm.operator.numeric
optional string simOperatorNumeric = 11; // sim.gsm.operator.numeric
}
message GetImageRequest {
optional string appId = 1;
enum AppImageUsage {
ICON = 0;
SCREENSHOT = 1;
SCREENSHOT_THUMBNAIL = 2;
PROMO_BADGE = 3;
BILING_ICON = 4;
}
optional AppImageUsage imageUsage = 3;
optional string imageId = 4; // 0 or 1
}
message GetAssetRequest {
required string assetId = 1;
optional string directDownloadKey = 2;
}
message GetImageResponse {
optional bytes imageData = 1;
}
message GetAssetResponse {
repeated group InstallAsset = 1 {
optional string assetId = 2;
optional string assetName = 3;
optional string assetType = 4;
optional string assetPackage = 5;
optional string blobUrl = 6;
optional string assetSignature = 7;
optional uint64 assetSize = 8;
optional uint64 refundTimeout = 9;
optional bool forwardLocked = 10;
optional bool secured = 11;
optional int32 versionCode = 12;
optional string downloadAuthCookieName = 13;
optional string downloadAuthCookieValue = 14;
}
}
message Request {
optional RequestContext context = 1;
repeated group RequestGroup = 2 {
optional AppsRequest appsRequest = 4;
optional CommentsRequest commentsRequest = 5;
optional GetAssetRequest getAssetRequest = 10;
optional GetImageRequest imageRequest = 11;
optional SubCategoriesRequest subCategoriesRequest = 14;
optional CategoriesRequest categoriesRequest = 21;
}
}
message ResponseContext {
enum ResultType {
OK = 0;
BAD_REQUEST = 1;
INTERNAL_SERVICE_ERROR = 2;
NOT_MODIFIED = 3;
USER_INPUT_ERROR = 4;
}
optional ResultType result = 1;
optional int32 maxAge = 2;
optional string etag = 3;
optional int32 serverVersion = 4;
}
message Response {
repeated group ResponseGroup = 1 {
optional ResponseContext context = 2;
optional AppsResponse appsResponse = 3;
optional CommentsResponse commentsResponse = 4;
optional GetAssetResponse getAssetResponse = 9;
optional GetImageResponse imageResponse = 10;
optional CategoriesResponse categoriesResponse = 20;
optional SubCategoriesResponse subCategoriesResponse = 13;
}
}