Giter VIP home page Giter VIP logo

map-tube-minsk's Introduction

NAME
    Map::Tube::Minsk - Interface to the Minsk metro.

SYNOPSIS
     use Map::Tube::Minsk;
     my $obj = Map::Tube::Minsk->new;
     my $routes_ar = $obj->get_all_routes($from, $to);
     my $station = $obj->get_node_by_id($station_id);
     my $station = $obj->get_node_by_name($station_name);
     my $route = $obj->get_shortest_route($from, $to);
     my $metro_name = $obj->name;
     my $xml_file = $obj->xml;

DESCRIPTION
    It currently provides functionality to find the shortest route between
    the two given nodes.

    For more information about Minsk imetro map, click here
    <https://en.wikipedia.org/wiki/Minsk_Metro>.

METHODS
    "new()"
             Constructor.

    "get_all_routes($from, $to)" [EXPERIMENTAL]
             Get all routes from station to station.
             Returns reference to array with Map::Tube::Route objects.

    "get_node_by_id($station_id)"
             Get station node by id.
             Returns Map::Tube::Node object.

    "get_node_by_name($station_name)"
             Get station node by name.
             Returns Map::Tube::Node object.

    "get_shortest_route($from, $to)"
             Get shortest route between $from and $to node names. Node names in $from and $to are case insensitive.
             Returns Map::Tube::Route object.

    "name()"
             Get metro name.
             Returns string with metro name.

    "xml()"
             Get XML specification of Minsk metro.
             Returns string with XML.

EXAMPLE1
     # Pragmas.
     use strict;
     use warnings;

     # Modules.
     use Encode qw(decode_utf8 encode_utf8);
     use Map::Tube::Minsk;

     # Object.
     my $obj = Map::Tube::Minsk->new;

     # Get route.
     my $route = $obj->get_shortest_route(decode_utf8('Уручча'), decode_utf8('Усход'));

     # Print out type.
     print "Route: ".encode_utf8($route)."\n";

     # Output:
     # Route: Уручча (Маскоўская_лінія), Барысаўскі тракт (Маскоўская_лінія), Усход (Маскоўская_лінія)

EXAMPLE2
     # Pragmas.
     use strict;
     use warnings;

     # Modules.
     use Map::Tube::Minsk;

     # Object.
     my $obj = Map::Tube::Minsk->new;

     # Get XML file.
     my $xml_file = $obj->xml;

     # Print out XML file.
     print "XML file: $xml_file\n";

     # Output like:
     # XML file: .*/minsk-map.xml

DEPENDENCIES
    File::Share, Map::Tube, Moo, namespace::clean.

SEE ALSO
    Map::Tube, Map::Tube::Barcelona, Map::Tube::Berlin, Map::Tube::Delhi,
    Map::Tube::Kiew, Map::Tube::London, Map::Tube::Moscow, Map::Tube::NYC,
    Map::Tube::Prague, Map::Tube::Sofia, Map::Tube::Tokyo,
    Map::Tube::Warsaw.

REPOSITORY
    <https://github.com/tupinek/Map-Tube-Minsk>

AUTHOR
    Michal Špaček <mailto:[email protected]>

    <http://skim.cz>

LICENSE AND COPYRIGHT
     © 2014 Michal Špaček
     Artistic License
     BSD 2-Clause License

VERSION
    0.02

map-tube-minsk's People

Contributors

michal-josef-spacek avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.