I'm using pygithub3
to call an api to receive an organization's repositories, but am getting this result:
<pygithub3.core.result.smart.Result object at 0x7f97e9c03d50>
I believe this is a buffer object. Why is this happening? I want the result to be
['express-file', 'users']
My code looks somewhat like this:
import pygithub3
auth = dict(username="******", password="******") # I hashed these for SO.
gh = pygithub3.Github(**auth)
repos = gh.repos.list_by_org(org="incrosoft", type="all")
print repos
How would I get my desired output? Is it possible? Is there something to turn it into my desired array?
If you look at the docstring of the Result
class, you'll see that one can obtain a list by calling your_result.all()
.
If you type help(pygithub3.core.result.smart.Result)
in your Python interpreter session (with pygithub3
imported), you'll see this docstring printed, so you don't need to check the source each time.