For information on how to construct a JSON-RPC request, see the Wikipedia article about JSON-RPC.
Send requests to the following URL:
The parts between
% should be replaced with the following:
%service-version%: the version of the service
%service-name%: the name of the service
%token%: a token which gives you access to the web service
In a PHP application, the easiest way to invoke our web services is by using our library. For this you need the following:
The following code fetches all the routes (private ones included) you have marked as favourite.
// Simply provide the class with your key, the token will be generated automatically. RouteYou_Json_Client::setKey('<key>'); // Log in. $authenticationService = new RouteYou_Json_Client('Authentication', '1.1'); $user = $authenticationService->loginWithEmail('<email>', '<password>');// Fetch favourite routes. // When parameter permission.readable is omitted, only public routes are returned.
$routeService = new RouteYou_Json_Client('Route', '2.0'); $favourites = $routeService->search(array( 'favourite.user.id' => $user['id'], 'permission.readable' => true )); var_dump($favourites);
© 2006-2019 RouteYou - www.routeyou.com