Project

General

Profile

Actions

GeTS API » History » Revision 12

« Previous | Revision 12/13 (diff) | Next »
Никита Давыдовский, 12/19/2013 12:52 PM


GeTS API

API based on HTTP protocol and YMapsML language.

Points

Add point

Adds one or several points into database.

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

Request:

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

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:

<response>
%message%
%error%
<response>

Remove point

Load points

Loads points for circle defined by given: category, radius, latitude and longitude; or radius, latitude and longitude; or category.

Request should be http://oss.fruct.org/projects/gets/service/loadPoints.php

Request:

<request>
  <params>
    <auth_token>...</auth_token> 
    <latitude>...</latitude>
    <longitude>...</longitude>
    <radius>...</radius>
    <category_name>...</category_name>
  </params>
</request>

auth_token - auth token string (optional)
latitude - float value
longitude - float value
radius - float non-negative value
category_name - name of category string

Points can be retrieved by: only category_name, or latitude and longitude and radius, or combination of both previous possibilities.

Response:

<response>
  <status>
    &lt;code&gt;...&lt;/code&gt;
    <message>...</message>
  </status>
  <content>
    %list of points in kml format%
  </content> 
</response>

Update point

Tracks

Add track

Load track

Update track's info

Remove track

Category

addCategory

getCategory

Method is returning list of point's categories available in GeTS service.

Request should be http://oss.fruct.org/projects/gets/service/getCategories.php

Request:

<request>
  <params>
    <auth_token>...</auth_token> 
  </params>
</request>

auth_token - auth token string (optional)

Response:

<response>
  <status>
    &lt;code&gt;...&lt;/code&gt;
    <message>...</message>
  </status>
  <content>
    <categories>
      <category>
        <id>...</id>
        <name>...</name>
        <description>...</description>
        <url>...</url>
      </category>
    </categories>
  </content> 
</response>

Tag categories contains list of categories placed in tags category.
Each tag category contains tags:

id - identifier of category (positive integer)
name - category's name (string)
description - category's description (string)
url - category's url (string)

Users

Registration

Authorization

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

Request should be GETS_SERVICE_URL/login.php

Request:

<request>
  <params>
    <login>...</login>
    <password>...</password>
  </params>
</request>

login - login name string
password - password string

Response:

<response>
  <status>
    &lt;code&gt;...&lt;/code&gt;
    <message>...</message>
  </status>
  <content>
    <auth_token>...</auth_token>
  </content> 
</response>

auth_token - token which will be used in further GeTS transactions

Quit session

Remove user

Updated by Никита Давыдовский almost 11 years ago · 12 revisions