# Path: indicomobile/core/indico_api.py
# def get_room(room_name):
#     path = '/export/roomName/CERN/{room_name}.json'.format(urllib.quote(room_name))
#     response = perform_request(path)
#     return response['results']


import urllib, urllib2
from flask import json, current_app, render_template, Blueprint
from indicomobile.core.indico_api import get_room

maps = Blueprint('map', __name__, template_folder='templates')

@maps.route('/map/location/CERN/room/<room_name>/', methods=['GET'])
def get_map(room_name):

# Path: indicomobile/core/indico_api.py
# def get_room(room_name):
#     path = '/export/roomName/CERN/{room_name}.json'.format(urllib.quote(room_name))
#     response = perform_request(path)
#     return response['results']


# Path: indicomobile/views/maps.py
import urllib, urllib2
from flask import json, current_app, render_template, Blueprint
from indicomobile.core.indico_api import get_room


maps = Blueprint('map', __name__, template_folder='templates')

@maps.route('/map/location/CERN/room/<room_name>/', methods=['GET'])
def get_map(room_name):

    results = get_room(room_name)