Example #1
0
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)
Example #2
0
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)
Example #3
0
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)