# -*- coding: utf-8 -*-

import argparse

from route4me import Route4Me


def main(api_key):
    route4me = Route4Me(api_key)

    address = "Boston-Cambridge-Quincy, MA-NH, USA"
    print('Geocoding this address: {}'.format(address))
    response = route4me.address.geocode(
        addresses=address
    )
    print(response)


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Forward Geocoding')
    parser.add_argument('--api_key', dest='api_key', help='Route4Me API KEY',
                        type=str, required=True)
    args = parser.parse_args()
    main(args.api_key)
