Project

General

Profile

GeTS API » History » Revision 9

Revision 8 (Никита Давыдовский, 11/05/2013 11:34 AM) → Revision 9/13 (Никита Давыдовский, 11/22/2013 06:14 PM)

h1. GeTS API 

 API based on HTTP protocol and YMapsML language. 

 {{toc}} 

 h2. Points 

 h3. Add point 

 Adds one or several points into database. 

 *Request should be http://kappa.cs.karelia.ru/~davydovs/gets/addPoints.php* 

 Request: 
 <pre> 
 <request token="%token%" isPublic="%true/false%" channel="%channel%"> 
   <point> 
     <!-- points in Yandex format --> 
   </point> 
 <request> 
 </pre> 

 Params: 
 * %token% - user's token (see function *login*) 
 * %true/false% - true if point should be in public space, otherwise - false 
 * %channel% - the name of user's channel or name of category channel 
 * list of points 

 Response: 
 <pre> 
 <response> 
 %message% 
 %error% 
 <response> 
 </pre> 

 h3. Remove point 

 h3. Load points 

 Loads points for circle defined by given radius, latitude and longitude. 

 *Request should be http://kappa.cs.karelia.ru/~davydovs/gets/loadPoints.php* 

 Request: 
 <pre> 
 <request token="%token%" isPublic="%true/false%" radius="%radius%" latitude="%latitude%" longitude="%longitude%"> 
 <request> 
 </pre> 

 Response: 
 <pre> 
 <response status="%status_code%"> 
    <!-- list of points in Yandex format --> 
 <response> 
 </pre> 

 h3. Update point 

 h2. Tracks 

 h3. Add track 

 h3. Load track 

 h3. Update track's info 

 h3. Remove track 

 h2. Category 

 h3. addCategory 

 h3. getCategory 

 h2. Users 

 h3. Registration 

 h3. Authorization 

 Authorize user with given login and password. 
 In response service will send auth token. 

 *Request should be GETS_SERVICE_URL/login.php* 

 Request: 
 <pre> 
 <request> 
   <params> 
     <login>...</login> 
     <password>...</password> 
   </params> 
 </request> 
 </pre> 

 _login_ - login name string 
 _password_ - password string 

 Response: 
 <pre> 
 <response> 
   <status> 
     <code>...</code> 
     <message>...</message> 
   </status> 
   <content> 
     <auth_token>...</auth_token> 
   </content>  
 </response> 
 </pre> 

 _auth_token_ - token which will be used in further GeTS transactions 

 h3. Quit session 

 h3. Remove user