Инструменты пользователя

Инструменты сайта


yovokids_api_init

Различия

Здесь показаны различия между двумя версиями данной страницы.

Ссылка на это сравнение

Следующая версия
Предыдущая версия
yovokids_api_init [2022/10/24 06:15]
serg создано
yovokids_api_init [2022/10/28 06:59] (текущий)
serg
Строка 1: Строка 1:
-http://api01.kokids.org/​api/​init+<​code>​ 
 +POST http://apiNN.kokids.org/​api/​init ​ 
 +NN = {01,02} 
 +</​code>​
  
 INPUT INPUT
Строка 6: Строка 9:
  
 type tInitInput struct { type tInitInput struct {
- Bundle string //app id + Bundlestring //app id i.e. "​com.YovoGames.kidgame"​ 
- Offset string //client time offset (i.e. '​+0200'​ ,'​+0000',​ '​-1200',​ '​+0530'​) + Offsetstring //client time offset (i.e. '​+0200'​ ,'​+0000',​ '​-1200',​ '​+0530'​). see example TimeZoneUtc below 
- Apk    ​int ​   //bundle code or apk version int + ApkVer* ​   ​int ​   //bundle code or apk version int 
- //fillin all possible login data. If you have gaid but not uid -> you'll receive uid, + OSint* ​ TOs  ​//(enum see below) 
- //if you have uid and loggin from ios -> fill in all data to join accounts in the db +        //Если есть Uid и token логин с их помощью
- //login by kokids userid and token+
  Uid   ​int64 ​ //if exist  Uid   ​int64 ​ //if exist
  Token string //if uid>0  Token string //if uid>0
- //other login method (android device id)+ //если логина и токена нет, тогда берем системные
  GAID     ​string  GAID     ​string
  GaidType int  GaidType int
- //login by ios IDFA 
- IDFA string 
- //other login methods will be here 
  
 } }
 +type TOs int
 +const (
 + OSUnknown TOs = iota - 1
 + OSAndroid
 + OSHuawei
 + OSIOs
 +        OSAmazon
 +)
 +
 +type TGAIDType int
 +const (
 + GTUnknown TGAIDType = iota
 + GTAppID
 + GTPubID
 +)
 </​code>​ </​code>​
  
Строка 33: Строка 47:
  Data        map[string]any //extra data saved in db  Data        map[string]any //extra data saved in db
 } }
 +</​code>​
 +  * Example of new client request
 +
 +{{:​init_new.png?​600|}}
 +  * others requests
 +{{:​init.png?​600|}}
 +<​code>​
 + ​private string TimeZoneUtc()
 +    {
 +        string symbol = "​+";​
 +        TimeSpan tm = TimeZoneInfo.Local.GetUtcOffset(DateTime.Now);​
 +        if (tm.TotalMinutes < 0)
 +            symbol = "​-";​
 +
 +        return DateTime.Now.ToString("​yyyy-MM-dd HH:​mm:​ss"​) + " " + symbol + tm.ToString("​hhmm"​);​
 +    }
 </​code>​ </​code>​
yovokids_api_init.1666592100.txt.gz · Последние изменения: 2022/10/24 06:15 — serg