Skip to content

Commit 683a256

Browse files
committed
Expose the stargazers count for repositories
I'm now using repo._json_data['stargazers_count'], which is a hack. Making it part of the proper API.
1 parent ad55e46 commit 683a256

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

github3/repos/repo.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ def __init__(self, repo, session=None):
124124
#: Size of the repository.
125125
self.size = repo.get('size', 0)
126126

127+
# The number of stargazers
128+
#: Number of users who starred the repository
129+
self.stargazers = repo.get('stargazers_count', 0)
130+
127131
# SSH url e.g. git@github.com/sigmavirus24/github3.py
128132
#: URL to clone the repository via SSH.
129133
self.ssh_url = repo.get('ssh_url', '')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy