forked from organicmaps/organicmaps
Client-server protocol description update
This commit is contained in:
parent
61c1639b54
commit
0625ba6504
1 changed files with 25 additions and 8 deletions
|
@ -2,8 +2,13 @@ Description: Sent when client opens Downloader
|
|||
Request: ID, CountriesV, PurchasesV
|
||||
{
|
||||
"ID":"12345", // unique client id
|
||||
"CountriesVersion":1,
|
||||
"PurchasesVersion":1
|
||||
"Cmd":"VersionCheck",
|
||||
"Params":
|
||||
{
|
||||
"CountriesV":1, // local version of countries file on the client
|
||||
"PurchasesV":1, // local version of purchases file on the client
|
||||
"ClientV":1 // client version
|
||||
}
|
||||
}
|
||||
Response: Credit [, CountriesV, Countries, PurchasesV, Purchases]
|
||||
{
|
||||
|
@ -11,14 +16,18 @@ Response: Credit [, CountriesV, Countries, PurchasesV, Purchases]
|
|||
"CountriesV":2, // optional, latest version of countries list
|
||||
"Countries":{...}, // optional, latest countries list with new prices and new countries
|
||||
"PurchasesV":2, // optional, latest inapp purchases list version
|
||||
"StoreIDS":["123","456","789"] // optional, latest inapp purchases IDS
|
||||
"Purchases":["123","456","789"] // optional, latest inapp purchases IDS
|
||||
}
|
||||
|
||||
Description: Sent by client to validate payment and add credits
|
||||
Request: ID, Receipt
|
||||
{
|
||||
"ID":"12345",
|
||||
"Receipt":"ASD24@#$!@$%" // base 64 encoded app store receipt to validate and store on our server
|
||||
"Cmd":"ValidatePayment",
|
||||
"Params":
|
||||
{
|
||||
"Receipt":"ASD24@#$!@$%" // base 64 encoded app store receipt to validate and store on our server
|
||||
}
|
||||
}
|
||||
Response: Credit [, Error]
|
||||
{
|
||||
|
@ -27,10 +36,14 @@ Response: Credit [, Error]
|
|||
}
|
||||
|
||||
Description: Sent by client to add some credit by entering friend promo code or any other public promo code
|
||||
Request: ID, PromoCode
|
||||
Request: ID, Code
|
||||
{
|
||||
"ID":"12345",
|
||||
"PromoCode":"123asdREWR24ad"
|
||||
"Cmd":"ValidatePromoCode",
|
||||
"Params":
|
||||
{
|
||||
"Code":"123asdREWR24ad"
|
||||
}
|
||||
}
|
||||
Response: Credit [, Error]
|
||||
{
|
||||
|
@ -42,7 +55,11 @@ Description: Sent by client when he tries to download the country
|
|||
Request: ID, Country
|
||||
{
|
||||
"ID":"12345",
|
||||
"Country":"Belarus"
|
||||
"Cmd":"Download",
|
||||
"Params":
|
||||
{
|
||||
"Country":"Belarus"
|
||||
}
|
||||
}
|
||||
Response: Country[, Url | Error]
|
||||
{
|
||||
|
@ -55,7 +72,7 @@ Description: Client requests own "Bring friend" code once, which should be enter
|
|||
Request: ID, FriendCode
|
||||
{
|
||||
"ID":"12345",
|
||||
"FriendCode":""
|
||||
"Cmd":"FriendCode",
|
||||
}
|
||||
Response: FriendCode
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue