8000
File tree Expand file tree Collapse file tree 20 files changed +259
-9
lines changed Expand file tree Collapse file tree 20 files changed +259
-9
lines changed Original file line number Diff line number Diff line change 1
1
History/Changelog
2
2
=================
3
3
4
- 0.6.0: 2013-xx-xx
4
+ 0.6.0: 2013-04-05
5
5
-----------------
6
6
7
7
- Add ``sort `` and ``order `` parameters to ``github3.GitHub.search_users `` and
@@ -12,7 +12,8 @@ History/Changelog
12
12
13
13
- Add minimal logging (e.g., ``logging.getLogger('github3') ``)
14
14
15
- - Re-organize the library.
15
+ - Re-organize the library a bit. (Split up repos.py, issues.py, gists.py and a
16
+ few others into sub-modules for my sanity.)
16
17
17
18
- Calling ``refresh(True) `` on a ``github3.structs.GitHubIterator `` actually
18
19
works as expected now.
@@ -31,6 +32,15 @@ History/Changelog
31
32
32
33
- ``IssueComment.update `` was corrected to match GitHub's documentation
33
34
35
+ - ``github3.login `` now accepts an optional ``url `` parameter for users of the
36
+ ``GitHubEnterprise `` API, courtesy of Kristian Glass (@doismellburning)
37
+
38
+ - Several classes now allow their instances to be compared with ``== `` and
39
+ ``!= ``. In most cases this will check the unique id provided by GitHub. In
40
+ others, it will check SHAs and any other guaranteed immutable and unique
41
+ attribute. The class doc-strings all have information about this and details
42
+ about how equivalence is determined.
43
+
34
44
0.5.3: 2013-03-19
35
45
-----------------
36
46
Original file line number Diff line number Diff line change 11
11
12
12
13
13
class Authorization (GitHubCore ):
14
- """The :class:`Authorization <Authorization>` object."""
14
+ """The :class:`Authorization <Authorization>` object.
15
+
16
+ Two authorization instances can be checked like so::
17
+
18
+ a1 == a2
19
+ a1 != a2
20
+
21
+ And is equivalent to::
22
+
23
+ a1.id == a2.id
24
+ a1.id != a2.id
25
+
26
+ See also: http://developer.github.com/v3/oauth/#oauth-authorizations-api
27
+ """
15
28
def __init__ (self , auth , session = None ):
16
29
super (Authorization , self ).__init__ (auth , session )
17
30
#: Details about the application (name, url)
Original file line number Diff line number Diff line change @@ -13,6 +13,17 @@ class Event(GitHubObject):
13
13
"""The :class:`Event <Event>` object. It structures and handles the data
14
14
returned by via the `Events <http://developer.github.com/v3/events>`_
15
15
section of the GitHub API.
16
+
17
+ Two events can be compared like so::
18
+
19
+ e1 == e2
20
+ e1 != e2
21
+
22
+ And that is equivalent to::
23
+
24
+ e1.id == e2.id
25
+ e1.id != e2.id
26
+
16
27
"""
17
28
def __init__ (self , event ):
18
29
super (Event , self ).__init__ (event )
Original file line number Diff line number Diff line change @@ -6,6 +6,16 @@ class GistComment(BaseComment):
6
6
"""The :class:`GistComment <GistComment>` object. This represents a comment
7
7
on a gist.
8
8
9
+ Two comment instances can be checked like so::
10
+
11
+ c1 == c2
12
+ c1 != c2
13
+
14
+ And is equivalent to::
15
+
16
+ c1.id == c2.id
17
+ c1.id != c2.id
18
+
9
19
See also: http://developer.github.com/v3/gists/comments/
10
20
"""
11
21
def __init__ (self , comment , session = None ):
Original file line number Diff line number Diff line change @@ -21,6 +21,16 @@ class Gist(GitHubCore):
21
21
you own it). You can also "star" or "unstar" the gist (again assuming you
22
22
have authenticated).
23
23
24
+ Two gist instances can be checked like so::
25
+
26
+ g1 == g2
27
+ g1 != g2
28
+
29
+ And is equivalent to::
30
+
31
+ g1.id == g2.id
32
+ g1.id != g2.id
33
+
24
34
See also: http://developer.github.com/v3/gists/
25
35
"""
26
36
def __init__ (self , data , session = None ):
Original file line number Diff line number Diff line change 4
4
5
5
class GistHistory (GitHubCore ):
6
6
"""The :class:`GistHistory <GistHistory>` object represents one version
7
- (or revision) of a gist."""
7
+ (or revision) of a gist.
8
+
9
+ Two history instances can be checked like so::
10
+
11
+ h1 == h2
12
+ h1 != h2
13
+
14
+ And is equivalent to::
15
+
16
+ h1.version == h2.version
17
+ h1.version != h2.version
18
+
19
+ """
8
20
def __init__ (self , history , session = None ):
9
21
super (GistHistory , self ).__init__ (history , session )
10
22
self ._api = history .get ('url' , '' )
Original file line number Diff line number Diff line change @@ -6,6 +6,16 @@ class IssueComment(BaseComment):
6
6
"""The :class:`IssueComment <IssueComment>` object. This structures and
7
7
handles the comments on issues specifically.
8
8
9
+ Two comment instances can be checked like so::
10
+
11
+ c1 == c2
12
+ c1 != c2
13
+
14
+ And is equivalent to::
15
+
16
+ c1.id == c2.id
17
+ c1.id != c2.id
18
+
9
19
See also: http://developer.github.com/v3/issues/comments/
10
20
"""
11
21
def __init__ (self , comment , session = None ):
Original file line number Diff line number Diff line change @@ -6,6 +6,17 @@ class IssueEvent(GitHubCore):
6
6
with events described in the
7
7
`Issues\>Events <http://developer.github.com/v3/issues/events>`_ section of
8
8
the GitHub API.
9
+
10
+ Two event instances can be checked like so::
11
+
12
+ e1 == e2
13
+ e1 != e2
14
+
15
+ And is equivalent to::
16
+
17
+ e1.commit_id == e2.commit_id
18
+ e1.commit_id != e2.commit_id
19
+
9
20
"""
10
21
def __init__ (self , event , issue = None ):
11
22
super (IssueEvent , self ).__init__ (event , None )
Original file line number Diff line number Diff line change @@ -13,6 +13,17 @@ class Issue(GitHubCore):
13
13
"""The :class:`Issue <Issue>` object. It structures and handles the data
14
14
returned via the `Issues <http://developer.github.com/v3/issues>`_ section
15
15
of the GitHub API.
16
+
17
+ Two issue instances can be checked like so::
18
+
19
+ i1 == i2
20
+ i1 != i2
21
+
22
+ And is equivalent to::
23
+
24
+ i1.id == i2.id
25
+ i1.id != i2.id
26
+
16
27
"""
17
28
def __init__ (self , issue , session = None ):
18
29
super (Issue , self ).__init__ (issue , session )
Original file line number Diff line number Diff line change @@ -16,6 +16,16 @@ class Thread(GitHubCore):
16
16
contains information about the repository generating the notification, the
17
17
subject, and the reason.
18
18
19
+ Two thread instances can be checked like so::
20
+
21
+ t1 == t2
22
+ t1 != t2
23
+
24
+ And is equivalent to::
25
+
26
+ t1.id == t2.id
27
+ t1.id != t2.id
28
+
19
29
See also:
20
30
http://developer.github.com/v3/activity/notifications/#view-a-single-thread
21
31
"""
You can’t perform that action at this time.
0 commit comments