Example #1
0
def delete(id):
    try:
        api = MyelindlApi()
        name = api.project_get_info(id)['info']['name']
        result = api.project_delete(id)
    except MyelindlApiError, e:
        click.echo("delete a project failed, {}".format(e))
Example #2
0
def info(id):
    try:
        api = MyelindlApi()
        result = api.project_get_info(id)

        template = '| {:>11} | {:>40}|'
        header = template.format('Field', 'Value')
        click.echo('=' * len(header))
        click.echo(header)
        click.echo('=' * len(header))

        for k, v in result['info'].iteritems():
            line = template.format(k, v)
            click.echo(line)
        click.echo('=' * len(header))
    except MyelindlApiError, e:
        click.echo("show project info failed, {}".format(e))