This site uses cookies to improve your experience and the quality of our services. By using this site you agree to its use of cookies. More information Hide

Route Web Service Version 1.4

Info

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):

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):

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

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

© 2006-2016 RouteYou - www.routeyou.com