Initial redesigned UI for repo listings w/ stars.

This commit is contained in:
Jimmy Zelinskie 2014-12-11 15:06:30 -05:00
parent 97b605ca8d
commit 5a484cfe11
10 changed files with 308 additions and 103 deletions

View file

@ -107,6 +107,7 @@ class RepositoryList(ApiResource):
@query_param('sort', 'Whether to sort the results.', type=truthy_bool, default=False)
@query_param('count', 'Whether to include a count of the total number of results available.',
type=truthy_bool, default=False)
@query_param('starred', 'Whether or not to include starred repositories', type=truthy_bool, default=True)
def get(self, args):
"""Fetch the list of repositories under a variety of situations."""
username = None
@ -123,7 +124,7 @@ class RepositoryList(ApiResource):
repo_query = model.get_visible_repositories(username, limit=args['limit'], page=args['page'],
include_public=args['public'], sort=args['sort'],
namespace=args['namespace'])
namespace=args['namespace'], include_starred=args['starred'])
response['repositories'] = [repo_view(repo) for repo in repo_query
if (repo.visibility.name == 'public' or