Skip to content

Commit b6ab012

Browse files
author
Kenneth Reitz
committed
GitHubModel
1 parent b895d6c commit b6ab012

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

github3/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def oauth(self):
4646
@property
4747
def logged_in(self):
4848
r = self._get('')
49+
print
4950

50-
# print r
5151
if r.status_code == 200:
5252
return True
5353
else:

github3/models.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@
99
"""
1010

1111

12+
class GitHubModel(object):
1213

13-
class User(object):
14+
def __init__(self):
15+
pass
16+
17+
18+
19+
class User(GitHubModel):
1420
pass
1521

1622
def __init__(self):
@@ -25,31 +31,31 @@ def __init__(self):
2531

2632

2733

28-
class Repo(object):
34+
class Repo(GitHubModel):
2935
"""GitHub Repository."""
3036
pass
3137

3238

3339

34-
class Gist(object):
40+
class Gist(GitHubModel):
3541
"""GitHub Gist.
3642
3743
gist.files['filename.py']
3844
"""
3945

4046
def __init__(self):
41-
pass
47+
self.api_url = None
4248

4349

4450

45-
class GistComment(object):
51+
class GistComment(GitHubModel):
4652
"""GitHub GistComment."""
4753

4854
def __init__(self):
4955
pass
5056

5157

52-
class Issue(object):
58+
class Issue(GitHubModel):
5359

5460

5561
def __init__(self):
@@ -66,13 +72,13 @@ def __init__(self):
6672
self.api_url = None
6773

6874
# api
69-
self.milestone
70-
self.assignee
71-
75+
self.milestone = None
76+
self.assignee = None
7277

7378

74-
class Milestone(object):
7579

80+
class Milestone(GitHubModel):
7681

77-
def __init__(self):pass
82+
def __init__(self):
83+
self.api_url = None
7884

0 commit comments

Comments
 (0)