sregistry/main/__template__/query.py
def search_all(self):
    '''a "show all" search that doesn't require a query'''

    # This should be your apis url for a search
    url = '...'

    # paginte get is what it sounds like, and what you want for multiple
    # pages of results
    results = self._paginate_get(url)
   
    if len(results) == 0:
        bot.info("No container collections found.")
        sys.exit(1)

    bot.info("Collections")

    # Here is how to create a simple table. You of course must parse your
    # custom result and form the fields in the table to be what you think
    # are important!
    rows = []
    for result in results:
        if "containers" in result:
            for c in result['containers']:
                rows.append([ c['uri'],
                              c['detail'] ])

    bot.table(rows)
    return rows
def search_all(self):
    '''a "show all" search that doesn't require a query'''

    # This should be your apis url for a search
    url = '...'

    # paginte get is what it sounds like, and what you want for multiple
    # pages of results
    results = self._paginate_get(url)
   
    if len(results) == 0:
        bot.info("No container collections found.")
        sys.exit(1)

    bot.info("Collections")

    # Here is how to create a simple table. You of course must parse your
    # custom result and form the fields in the table to be what you think
    # are important!
    rows = []
    for result in results:
        if "containers" in result:
            for c in result['containers']:
                rows.append([ c['uri'],
                              c['detail'] ])

    bot.table(rows)
    return rows
a "show all" search that doesn't require a query