class Gmaps::App

Defined in:

app.cr

Constant Summary

Log = ::Log.for("app")

Constructors

Instance Method Summary

Constructor Detail

def self.new(api_key : String, formatter : DirectionsFormatter = AsciidocFormatter.new) #

[View source]

Instance Method Detail

def api_key : String #

Google Maps API key


[View source]
def ask_hospitals(hospitals : Array(Gmaps::Hospital), input : ACON::Input::Interface, output : ACON::Output::Interface) : Gmaps::Hospital | Nil #

[View source]
def client : Gmaps::Client #

Client for interacting with Google Maps API


[View source]
def fetch_static_map(hospital : Gmaps::Hospital, direction_result : Gmaps::DirectionResult) #

[View source]
def get_nearest_hospitals(coordinates : Gmaps::Locatable) #

[View source]
def get_route(origin : Gmaps::Locatable, destination : Gmaps::Hospital) #

[View source]
def hospital_name(hospital : Gmaps::Hospital) #

[View source]
def parse_coordinates(lat : String | Nil, lng : String | Nil) #

[View source]
def print_directions_adoc(hospital : Gmaps::Hospital, direction_result : Gmaps::DirectionResult) #

[View source]
def print_result(hospital : Gmaps::Hospital, direction_result : Gmaps::DirectionResult) #

[View source]
def print_static_map(hospital : Gmaps::Hospital, direction_result : Gmaps::DirectionResult) #

[View source]
def puts_asciidoc_directions(hospital : Gmaps::Hospital, direction_result : Gmaps::DirectionResult, heading_level : Int32 = 3, io : IO = STDOUT) #

[View source]
def reporter : Gmaps::DirectionsReporter #

Reporter for generating directions reports


[View source]
def run(coordinates : Gmaps::Locatable) #

[View source]