Add team attributes, edit parameters, and links in reference documentation

This commit is contained in:
Vincent Jacques
2012-02-23 19:42:08 +00:00
parent 30e0296711
commit 3825a71ec2
3 changed files with 10 additions and 7 deletions
+3
View File
@@ -174,6 +174,9 @@ class IntegrationTest:
print o.login, "(", o.name, ")"
print " Members:", ", ".join( u.login for u in o.get_members() )
print " Repos:", ", ".join( r.name for r in o.get_repos() )
print " Teams:"
for team in o.get_teams():
print " ", team.name, "(" + team.permission + "):", ", ".join( u.login for u in team.get_members() ), "->", ", ".join( r.name for r in team.get_repos() )
print
sys.stdout.flush()
+3 -3
View File
@@ -93,7 +93,7 @@ Members
Teams
-----
* `get_teams()`: list of `Team`
* `create_team( ... )`: `Team`: see [API](http://developer.github.com/v3/.../#...) for parameters (TODO SOON)
* `create_team( ... )`: `Team`: see [API](http://developer.github.com/v3/orgs/teams/#create-team) for parameters
Class `Repository`
==================
@@ -139,8 +139,8 @@ Teams
Class `Team`
============
* Attributes: see [API](http://developer.github.com/v3/.../#...) (TODO SOON)
* `edit( ... )`: see [API](http://developer.github.com/v3/.../#...) for parameters (TODO SOON)
* Attributes: see [API](http://developer.github.com/v3/orgs/teams/#get-team)
* `edit( ... )`: see [API](http://developer.github.com/v3/orgs/teams/#edit-team) for parameters
* `delete()`
Members
+4 -4
View File
@@ -181,12 +181,12 @@ Organization._addAttributePolicy( MethodFromCallable( "create_fork", __createFor
Team = GithubObject(
"Team",
BaseUrl( lambda obj: "/teams/" + obj.id ),
Identity( lambda obj: obj.id ),
BaseUrl( lambda obj: "/teams/" + str( obj.id ) ),
Identity( lambda obj: str( obj.id ) ),
BasicAttributes(
### @todo
"url", "name", "id", "permission", "members_count", "repos_count",
),
Editable( [], [] ), ### @todo
Editable( [ "name" ], [ "permission" ] ),
Deletable(),
ListOfReferences( "members", NamedUser, addable = True, removable = True, hasable = True ),
ListOfReferences( "repos", Repository, addable = True, removable = True, hasable = True ),