GeTS API » History » Version 9
Никита Давыдовский, 11/22/2013 06:14 PM
| 1 | 1 | Кирилл Кулаков | h1. GeTS API |
|---|---|---|---|
| 2 | |||
| 3 | API based on HTTP protocol and YMapsML language. |
||
| 4 | 2 | Никита Артемов | |
| 5 | 4 | Никита Давыдовский | {{toc}} |
| 6 | 2 | Никита Артемов | |
| 7 | 4 | Никита Давыдовский | h2. Points |
| 8 | 2 | Никита Артемов | |
| 9 | 4 | Никита Давыдовский | h3. Add point |
| 10 | 2 | Никита Артемов | |
| 11 | 7 | Кирилл Кулаков | Adds one or several points into database. |
| 12 | |||
| 13 | 8 | Никита Давыдовский | *Request should be http://kappa.cs.karelia.ru/~davydovs/gets/addPoints.php* |
| 14 | |||
| 15 | 7 | Кирилл Кулаков | Request: |
| 16 | <pre> |
||
| 17 | <request token="%token%" isPublic="%true/false%" channel="%channel%"> |
||
| 18 | <point> |
||
| 19 | <!-- points in Yandex format --> |
||
| 20 | </point> |
||
| 21 | <request> |
||
| 22 | </pre> |
||
| 23 | |||
| 24 | Params: |
||
| 25 | * %token% - user's token (see function *login*) |
||
| 26 | * %true/false% - true if point should be in public space, otherwise - false |
||
| 27 | * %channel% - the name of user's channel or name of category channel |
||
| 28 | * list of points |
||
| 29 | |||
| 30 | Response: |
||
| 31 | <pre> |
||
| 32 | <response> |
||
| 33 | %message% |
||
| 34 | %error% |
||
| 35 | <response> |
||
| 36 | 6 | Никита Давыдовский | </pre> |
| 37 | |||
| 38 | 4 | Никита Давыдовский | h3. Remove point |
| 39 | 1 | Кирилл Кулаков | |
| 40 | h3. Load points |
||
| 41 | 8 | Никита Давыдовский | |
| 42 | Loads points for circle defined by given radius, latitude and longitude. |
||
| 43 | |||
| 44 | *Request should be http://kappa.cs.karelia.ru/~davydovs/gets/loadPoints.php* |
||
| 45 | |||
| 46 | Request: |
||
| 47 | <pre> |
||
| 48 | <request token="%token%" isPublic="%true/false%" radius="%radius%" latitude="%latitude%" longitude="%longitude%"> |
||
| 49 | <request> |
||
| 50 | </pre> |
||
| 51 | |||
| 52 | Response: |
||
| 53 | <pre> |
||
| 54 | <response status="%status_code%"> |
||
| 55 | <!-- list of points in Yandex format --> |
||
| 56 | <response> |
||
| 57 | </pre> |
||
| 58 | 1 | Кирилл Кулаков | |
| 59 | 4 | Никита Давыдовский | h3. Update point |
| 60 | |||
| 61 | 1 | Кирилл Кулаков | h2. Tracks |
| 62 | 4 | Никита Давыдовский | |
| 63 | h3. Add track |
||
| 64 | |||
| 65 | h3. Load track |
||
| 66 | |||
| 67 | h3. Update track's info |
||
| 68 | |||
| 69 | h3. Remove track |
||
| 70 | 5 | Никита Давыдовский | |
| 71 | h2. Category |
||
| 72 | |||
| 73 | h3. addCategory |
||
| 74 | |||
| 75 | h3. getCategory |
||
| 76 | 4 | Никита Давыдовский | |
| 77 | h2. Users |
||
| 78 | |||
| 79 | h3. Registration |
||
| 80 | |||
| 81 | h3. Authorization |
||
| 82 | |||
| 83 | 9 | Никита Давыдовский | Authorize user with given login and password. |
| 84 | In response service will send auth token. |
||
| 85 | |||
| 86 | *Request should be GETS_SERVICE_URL/login.php* |
||
| 87 | |||
| 88 | Request: |
||
| 89 | <pre> |
||
| 90 | <request> |
||
| 91 | <params> |
||
| 92 | <login>...</login> |
||
| 93 | <password>...</password> |
||
| 94 | </params> |
||
| 95 | </request> |
||
| 96 | </pre> |
||
| 97 | |||
| 98 | _login_ - login name string |
||
| 99 | _password_ - password string |
||
| 100 | |||
| 101 | Response: |
||
| 102 | <pre> |
||
| 103 | <response> |
||
| 104 | <status> |
||
| 105 | <code>...</code> |
||
| 106 | <message>...</message> |
||
| 107 | </status> |
||
| 108 | <content> |
||
| 109 | <auth_token>...</auth_token> |
||
| 110 | </content> |
||
| 111 | </response> |
||
| 112 | </pre> |
||
| 113 | |||
| 114 | _auth_token_ - token which will be used in further GeTS transactions |
||
| 115 | |||
| 116 | 4 | Никита Давыдовский | h3. Quit session |
| 117 | 1 | Кирилл Кулаков | |
| 118 | 7 | Кирилл Кулаков | h3. Remove user |