
Api for the public transportations of your city
- or -
Post a project like this3714
€100(approx. $114)
- Posted:
- Proposals: 2
- Remote
- #645384
- Awarded
Description
Experience Level: Intermediate
General information for the business: I pay $100 for each set of transit Api's for any city in the world
Description of requirements/functionality: In Arrivo HD (http://www.inarrivo.net) provides a unified interface to the public transit services by means of a backoffice interface. So far the interface is ready for Rome and partly Milan and would like to extend the support to other cities endowed with an open-data provision of transit information. The candidates will have to produce three php classes with the relative commented methods:
This the city class the abstract methods of which should be implemented:
abstract class City{
abstract protected function myName();
abstract protected function build();
abstract protected function getLinesForBus($bus, $prompt);
abstract protected function getStations ($line);
abstract protected function getPalinePositions ($line);
abstract protected function database();
public function mysqli(){
static $mysqli=0;
if ($mysqli==0) {
require "server.inc.php";
$database=$this->database();
$mysqli = new mysqli($server, $username, $password, $database);
}
return $mysqli;
}
abstract protected function nearMe($userLatitude, $userLongitude);
}
------
(name_of_city).h.php
class (city) implements City
public function nearMe($userLatitude, $userLongitude) //answers true if the location is covered by the service
public function getLinesForBus($bus) //returns an array of dictionaries (line, destination,unmonitored) corresponding to the lines of the bus
public function getStations($linea) //returns an array of dictionaries (stop_code, name) corresponding to the lines of the bus
public function getMetroLines($metro) //same as for the buses, perhaps the same function
public function getMetroLineStations($line) //same as for the buses, perhaps the same function
public function getPalinePositions ($linea) //returns an array of dictionaries (stop_code, latitude, longitude) corresponding to the lines of the bus
(name_of_city)table.h.php
class (city)Table implements timeTable
public function poll($palina) //returns an array of dictionaries (busNumber, line, stops, receiving(1=arriving, 0=approacing, 2=at the beggining of line waiting to start), capolineaTime (strtotime of start time from the beginning), time (waiting time), busDestination; if available that could be extended to metros.
public function metroPoll($line) //return a dictionary (hour, minute) of the start date of the metro of the line
(name_of_city)direction.h.php
class (city)Directions implements Directions
public function route($city, $start, $arrival, $html, $userLatitude, $userLongitude) //both start and location have values, you may use whichever you like
in this case the output is temporarily in xml with the form:
(() if there is no metro field, that is a bus, if there is no line that is a walking path).......
Specific technologies required: The support may be done in php, python or whatever linux language you prefer as long as the interface is in the form of the provided php classes
OS requirements: Linux
Extra notes: At most one new city for month, first arrived, first served and paid, independently of the size of the city. Payment will be done after the testing of the interface on the iOS app. Candidates may also download the app to make their own preventive testing.
Description of requirements/functionality: In Arrivo HD (http://www.inarrivo.net) provides a unified interface to the public transit services by means of a backoffice interface. So far the interface is ready for Rome and partly Milan and would like to extend the support to other cities endowed with an open-data provision of transit information. The candidates will have to produce three php classes with the relative commented methods:
This the city class the abstract methods of which should be implemented:
abstract class City{
abstract protected function myName();
abstract protected function build();
abstract protected function getLinesForBus($bus, $prompt);
abstract protected function getStations ($line);
abstract protected function getPalinePositions ($line);
abstract protected function database();
public function mysqli(){
static $mysqli=0;
if ($mysqli==0) {
require "server.inc.php";
$database=$this->database();
$mysqli = new mysqli($server, $username, $password, $database);
}
return $mysqli;
}
abstract protected function nearMe($userLatitude, $userLongitude);
}
------
(name_of_city).h.php
class (city) implements City
public function nearMe($userLatitude, $userLongitude) //answers true if the location is covered by the service
public function getLinesForBus($bus) //returns an array of dictionaries (line, destination,unmonitored) corresponding to the lines of the bus
public function getStations($linea) //returns an array of dictionaries (stop_code, name) corresponding to the lines of the bus
public function getMetroLines($metro) //same as for the buses, perhaps the same function
public function getMetroLineStations($line) //same as for the buses, perhaps the same function
public function getPalinePositions ($linea) //returns an array of dictionaries (stop_code, latitude, longitude) corresponding to the lines of the bus
(name_of_city)table.h.php
class (city)Table implements timeTable
public function poll($palina) //returns an array of dictionaries (busNumber, line, stops, receiving(1=arriving, 0=approacing, 2=at the beggining of line waiting to start), capolineaTime (strtotime of start time from the beginning), time (waiting time), busDestination; if available that could be extended to metros.
public function metroPoll($line) //return a dictionary (hour, minute) of the start date of the metro of the line
(name_of_city)direction.h.php
class (city)Directions implements Directions
public function route($city, $start, $arrival, $html, $userLatitude, $userLongitude) //both start and location have values, you may use whichever you like
in this case the output is temporarily in xml with the form:
(() if there is no metro field, that is a bus, if there is no line that is a walking path).......
Specific technologies required: The support may be done in php, python or whatever linux language you prefer as long as the interface is in the form of the provided php classes
OS requirements: Linux
Extra notes: At most one new city for month, first arrived, first served and paid, independently of the size of the city. Payment will be done after the testing of the interface on the iOS app. Candidates may also download the app to make their own preventive testing.

Fabrizio B.
100% (1)Projects Completed
2
Freelancers worked with
2
Projects awarded
14%
Last project
10 Dec 2015
Italy
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies