'List public repositories for the specified ``username``.
.. versionadded:: 0.6
:param str username: (required), username
:param str type: (optional), accepted values:
(\'all\', \'owner\', \'member\')
API default: \'all\'
:param str sort: (optional), accepted values:
(\'created\', \'updated\', \'pushed\', \'full_name\')
API default: \'created\'
:param str direction: (optional), accepted values:
(\'asc\', \'desc\'), API default: \'asc\' when using \'full_name\',
\'desc\' otherwise
:param int number: (optional), number of repositories to return.
Default: -1 returns all repositories
:param str etag: (optional), ETag from a previous request to the same
endpoint
:returns: generator of :class:`Repository <github3.repos.Repository>`
objects'

def repositories_by(self, username, type=None, sort=None, direction=None, number=(-1), etag=None):

    url = self._build_url(u'users', username, u'repos')
    params = {}
    if (type in (u'all', u'owner', u'member')):
        params.update(type=type)
    if (sort in (u'created', u'updated', u'pushed', u'full_name')):
        params.update(sort=sort)
    if (direction in (u'asc', u'desc')):
        params.update(direction=direction)
    return self._iter(int(number), url, Repository, params, etag)
