Repository.get_collaborators, .get_contributors, .get_watchers, .get_forks

This commit is contained in:
Vincent Jacques
2012-02-12 21:28:12 +01:00
parent b4b8aa9e11
commit 9ed8e2f804
3 changed files with 18 additions and 4 deletions
+6
View File
@@ -20,6 +20,8 @@ NamedUser = GithubObject(
"blog", "location", "email", "hireable", "bio", "public_repos",
"public_gists", "followers", "following", "html_url", "created_at",
"type",
# Only in Repository.get_contributors()
"contributions",
),
)
@@ -60,9 +62,13 @@ Repository = GithubObject(
"mirror_url", "updated_at", "id",
),
ExtendedScalarAttribute( "owner", NamedUser ),
ExtendedListAttribute( "collaborators", NamedUser ),
ExtendedListAttribute( "contributors", NamedUser ),
ExtendedListAttribute( "watchers", NamedUser ),
)
Repository._addAttributePolicy( ExtendedScalarAttribute( "parent", Repository ) )
Repository._addAttributePolicy( ExtendedScalarAttribute( "source", Repository ) )
Repository._addAttributePolicy( ExtendedListAttribute( "forks", Repository ) )
AuthenticatedUser._addAttributePolicy( ExtendedListAttribute( "repos", Repository ) )
NamedUser._addAttributePolicy( ExtendedListAttribute( "repos", Repository ) )