Route Web Service Version 1.4

Search


User status

You are not logged in.

Log in


Related topics


How helpful was this?


Can't find the solution to your problem ? Email us for help on .

Info

  • Service name : Route
  • Version : 1.4
  • Status : This has to be activated for specific accounts (please contact if you would like to make use of this functionality for your set of routes).

Technical

The web service is accessible using:

Overview of provided functions

getMedia

Get the media from a route. Extra conditions can be set.

Input

  1. id (integer) : The id of the route for which to find media.
  2. conditions (object): conditions a media has to satisfy
  3. order (object): order-criteria of the media
  4. limit (integer): the number of media to return
  5. offset (integer): skip this number of media

Output

Result (object):
  • total: total number of media that satisfy the conditions.
  • limit: the limit
  • start: the offset
  • results: array of media-objects

getCoinciding

Get the routes that coincide (matching routes or partly matching routes) with the specified route. Extra conditions can be set.

Input

  1. id (integer) : The id of the route for which to find coinciding routes.
  2. conditions (object): conditions a coinciding route has to satisfy
  3. order (object): order-criteria of the coinciding routes
  4. limit (integer): the number of coinciding routes to return
  5. offset (integer): skip this number of coinciding routes

Output

Result (object):
  • total: total number of coinciding routes that satisfy the conditions.
  • limit: the limit
  • start: the offset
  • results: array of coinciding route-objects
  • object {
        ["route"]=> Route-object with id, title,...
        ["similarity"]=> Percentage of given route that is similar with the result-route. (float between 0 and 1)
        ["similarityReverse"]=> Percentage of the result-route that is similar with the given route. (float between 0 and 1)
        ["similarityMeter"]=> Number of meters that are similar (integer)
    }
    

Sample

Ask x coinciding routes from a certain user, order by similarity descending:
Parameters
  1. id: the id of the route for which you want to find the coinciding routes
  2. conditions:
  3. array(
        'type'      => 'EqualTo',
        'operands'  => array(
                            array(
                                'type'  => 'Property',
                                'value' => 'route.owner.id'
                            ),
                            
                            array( 
                                'type'  => 'Constant',
                                'value' => <id of the user>
                            )
                            
                       )
    );
    
  4. order:
  5. array(
            'type' => 'Descending',
            'operand' => array(
                'type' => 'property',
                'value' => 'similarity'
            )
    );
    
  6. limit: x, the number of routes you want.
  7. offset: 0