mirror of
https://github.com/kennethreitz/python-github3.git
synced 2026-06-05 23:10:17 +00:00
GitHubModel
This commit is contained in:
+1
-1
@@ -46,8 +46,8 @@ class GitHub(object):
|
|||||||
@property
|
@property
|
||||||
def logged_in(self):
|
def logged_in(self):
|
||||||
r = self._get('')
|
r = self._get('')
|
||||||
|
print
|
||||||
|
|
||||||
# print r
|
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|||||||
+17
-11
@@ -9,8 +9,14 @@ This module provides the GitHub3 object models.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class GitHubModel(object):
|
||||||
|
|
||||||
class User(object):
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class User(GitHubModel):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -25,31 +31,31 @@ class User(object):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Repo(object):
|
class Repo(GitHubModel):
|
||||||
"""GitHub Repository."""
|
"""GitHub Repository."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Gist(object):
|
class Gist(GitHubModel):
|
||||||
"""GitHub Gist.
|
"""GitHub Gist.
|
||||||
|
|
||||||
gist.files['filename.py']
|
gist.files['filename.py']
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
self.api_url = None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class GistComment(object):
|
class GistComment(GitHubModel):
|
||||||
"""GitHub GistComment."""
|
"""GitHub GistComment."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Issue(object):
|
class Issue(GitHubModel):
|
||||||
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -66,13 +72,13 @@ class Issue(object):
|
|||||||
self.api_url = None
|
self.api_url = None
|
||||||
|
|
||||||
# api
|
# api
|
||||||
self.milestone
|
self.milestone = None
|
||||||
self.assignee
|
self.assignee = None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Milestone(object):
|
class Milestone(GitHubModel):
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
def __init__(self):pass
|
self.api_url = None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user