common.py

Functions:

get_API_data

  • description: takes formatted query and adds it to BASE_URL variable from the config file, then requests a response for the query.

  • inputs:

    • query: the formatted string query; look up if you haven’t read how to format your query! This query should contain information about locations you want navigational data for. See above for examples in the relevant format_relevantOtherFile_query function for the type of data you want.

  • outputs:

    • response: data returned from API in the form of a Python dictionary - the API response is formatted as a JSON however the function changes it to a dict in the return statement.