diff --git a/Reference.md b/Reference.md index 0b5d89b8..c70f46c9 100644 --- a/Reference.md +++ b/Reference.md @@ -76,7 +76,7 @@ /orgs/:org/members/:user ======================== - - GET: `` (TODO SOON) + - GET: `Organization.has_in_members( user )`: `bool` - DELETE: `Organization.remove_from_members( user )` /orgs/:org/public_members @@ -85,7 +85,7 @@ /orgs/:org/public_members/:user =============================== - - GET: `` (TODO SOON) + - GET: `Organization.has_in_public_members( user )`: `bool` - PUT: `Organization.add_to_public_members( user )` - DELETE: `Organization.remove_from_public_members( user )` @@ -114,7 +114,7 @@ /repos/:user/:repo/collaborators/:user ====================================== - - GET: `` (TODO SOON) + - GET: `Repository.has_in_collaborators( user )`: `bool` - PUT: `Repository.add_to_collaborators( user )` - DELETE: `Repository.remove_from_collaborators( user )` @@ -407,7 +407,7 @@ /user/following/:user ===================== - - GET: `` (TODO SOON) + - GET: `AuthenticatedUser.has_in_following( user )`: `bool` - PUT: `AuthenticatedUser.add_to_following( user )` - DELETE: `AuthenticatedUser.remove_from_following( user )` @@ -437,7 +437,7 @@ /user/watched/:user/:repo ========================= - - GET: `` (TODO SOON) + - GET: `AuthenticatedUser.has_in_watched( repo )`: `bool` - PUT: `AuthenticatedUser.add_to_watched( repo )` - DELETE: `AuthenticatedUser.remove_from_watched( repo )` diff --git a/github/GithubObjects.py b/github/GithubObjects.py index a8bc64f3..e54ffd56 100644 --- a/github/GithubObjects.py +++ b/github/GithubObjects.py @@ -31,7 +31,7 @@ NamedUser = GithubObject( AuthenticatedUser._addAttributePolicy( ExtendedListAttribute( "followers", NamedUser ) ) NamedUser._addAttributePolicy( ExtendedListAttribute( "followers", NamedUser ) ) -AuthenticatedUser._addAttributePolicy( ExtendedListAttribute( "following", NamedUser, True, True ) ) +AuthenticatedUser._addAttributePolicy( ExtendedListAttribute( "following", NamedUser, addable = True, removable = True, hasable = True ) ) NamedUser._addAttributePolicy( ExtendedListAttribute( "following", NamedUser ) ) Organization = GithubObject( @@ -46,8 +46,8 @@ Organization = GithubObject( "disk_usage", "collaborators", "billing_email", "plan", "private_gists", "total_private_repos", "owned_private_repos", ), - ExtendedListAttribute( "public_members", NamedUser, True, True ), - ExtendedListAttribute( "members", NamedUser, removable = True ), + ExtendedListAttribute( "public_members", NamedUser, addable = True, removable = True, hasable = True ), + ExtendedListAttribute( "members", NamedUser, removable = True, hasable = True ), Editable( [], [ "billing_email", "blog", "company", "email", "location", "name" ] ), ) @@ -68,7 +68,7 @@ Repository = GithubObject( "mirror_url", "updated_at", "id", ), ExtendedScalarAttribute( "owner", NamedUser ), - ExtendedListAttribute( "collaborators", NamedUser, True, True ), + ExtendedListAttribute( "collaborators", NamedUser, addable = True, removable = True, hasable = True ), ExtendedListAttribute( "contributors", NamedUser ), ExtendedListAttribute( "watchers", NamedUser ), Editable( [ "name" ], [ "description", "homepage", "public", "has_issues", "has_wiki", "has_downloads" ] ), @@ -81,5 +81,5 @@ AuthenticatedUser._addAttributePolicy( ExtendedListAttribute( "repos", Repositor NamedUser._addAttributePolicy( ExtendedListAttribute( "repos", Repository ) ) Organization._addAttributePolicy( ExtendedListAttribute( "repos", Repository ) ) -AuthenticatedUser._addAttributePolicy( ExtendedListAttribute( "watched", Repository, True, True ) ) +AuthenticatedUser._addAttributePolicy( ExtendedListAttribute( "watched", Repository, addable = True, removable = True, hasable = True ) ) NamedUser._addAttributePolicy( ExtendedListAttribute( "watched", Repository ) )