def gimmeIndex(response_format, callback): formats = format.formats() if response_format == formats[0]: return indexHtml() if response_format == formats[1]: return indexPlain() if response_format == formats[2]: return indexJson(callback)
def gimmeProjects(response_format, callback): formats = format.formats() if response_format == formats[0]: return projectsHtml() if response_format == formats[1]: return projectsPlain() if response_format == formats[2]: return projectsJson(callback)
def gimmeProject(project, response_format, callback): formats = format.formats() if response_format == formats[0]: return projectHtml(project) if response_format == formats[1]: return projectPlain(project) if response_format == formats[2]: return projectJson(project, callback)