Spliting GithubObjects.py

This commit is contained in:
Vincent Jacques
2012-03-13 20:01:07 +01:00
parent fb722625dd
commit 2319262077
3 changed files with 32 additions and 25 deletions
+16
View File
@@ -0,0 +1,16 @@
from GithubObject import *
from NamedUser import NamedUser
CommitComment = GithubObject(
"CommitComment",
BaseUrl( lambda obj: obj._repo._baseUrl() + "/comments/" + str( obj.id ) ),
InternalSimpleAttributes(
"url", "id", "body", "path", "position", "commit_id",
"created_at", "updated_at", "html_url", "line",
"_repo",
),
InternalObjectAttribute( "user", NamedUser ),
Editable( [ "body" ], [] ),
Deletable(),
)
+14
View File
@@ -0,0 +1,14 @@
from GithubObject import *
Download = GithubObject(
"Download",
BaseUrl( lambda obj: obj._repo._baseUrl() + "/downloads/" + str( obj.id ) ),
InternalSimpleAttributes(
"url", "html_url", "id", "name", "description", "size",
"download_count", "content_type", "policy", "signature", "bucket",
"accesskeyid", "path", "acl", "expirationdate", "prefix", "mime_type",
"redirect", "s3_url", "created_at",
"_repo",
),
Deletable(),
)
+2 -25
View File
@@ -74,31 +74,8 @@ Issue = GithubObject(
),
)
Download = GithubObject(
"Download",
BaseUrl( lambda obj: obj._repo._baseUrl() + "/downloads/" + str( obj.id ) ),
InternalSimpleAttributes(
"url", "html_url", "id", "name", "description", "size",
"download_count", "content_type", "policy", "signature", "bucket",
"accesskeyid", "path", "acl", "expirationdate", "prefix", "mime_type",
"redirect", "s3_url", "created_at",
"_repo",
),
Deletable(),
)
CommitComment = GithubObject(
"CommitComment",
BaseUrl( lambda obj: obj._repo._baseUrl() + "/comments/" + str( obj.id ) ),
InternalSimpleAttributes(
"url", "id", "body", "path", "position", "commit_id",
"created_at", "updated_at", "html_url", "line",
"_repo",
),
InternalObjectAttribute( "user", NamedUser ),
Editable( [ "body" ], [] ),
Deletable(),
)
from Download import Download
from CommitComment import CommitComment
Commit = GithubObject(
"Commit",