Add repo.get_stargazers_with_dates()

This commit is contained in:
Dan Vanderkam
2015-10-14 15:19:39 -04:00
parent a0214ccc69
commit d31742a719
4 changed files with 126 additions and 0 deletions
+14
View File
@@ -67,6 +67,7 @@ import github.StatsCommitActivity
import github.StatsCodeFrequency
import github.StatsParticipation
import github.StatsPunchCard
import github.Stargazer
class Repository(github.GithubObject.CompletableGithubObject):
@@ -1739,6 +1740,19 @@ class Repository(github.GithubObject.CompletableGithubObject):
None
)
def get_stargazers_with_dates(self):
"""
:calls: `GET /repos/:owner/:repo/stargazers <http://developer.github.com/v3/activity/starring>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Stargazer.Stargazer`
"""
return github.PaginatedList.PaginatedList(
github.Stargazer.Stargazer,
self._requester,
self.url + "/stargazers",
None,
headers={'Accept': 'application/vnd.github.v3.star+json'}
)
def get_stats_contributors(self):
"""
:calls: `GET /repos/:owner/:repo/stats/contributors <http://developer.github.com/v3/repos/statistics/#get-contributors-list-with-additions-deletions-and-commit-counts>`_