Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2011-10-03 16:27:21 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:25:06 +0300
commit0625ba6504f61758ddb441e5513d386e007cf84b (patch)
tree9fb844aaad3ffc5954556b4f40b7fe5e30beae30 /server
parent61c1639b54782959e075c03f49591d2fcd2f9599 (diff)
Client-server protocol description update
Diffstat (limited to 'server')
-rw-r--r--server/protocol.txt33
1 files changed, 25 insertions, 8 deletions
diff --git a/server/protocol.txt b/server/protocol.txt
index 64a4200c0b..27d4721ff5 100644
--- a/server/protocol.txt
+++ b/server/protocol.txt
@@ -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
{