8000 Last round of doc-changes before 0.6.0 · stavxyz/github3.py@5af5912 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit 5af5912

Browse files
committed
Last round of doc-changes before 0.6.0
It should be pushed out in the next few moments.
1 parent 43a387d commit 5af5912

20 files changed

+259
-9
lines changed

HISTORY.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
History/Changelog
22
=================
33

4-
0.6.0: 2013-xx-xx
4+
0.6.0: 2013-04-05
55
-----------------
66

77
- Add ``sort`` and ``order`` parameters to ``github3.GitHub.search_users`` and
@@ -12,7 +12,8 @@ History/Changelog
1212

1313
- Add minimal logging (e.g., ``logging.getLogger('github3')``)
1414

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.)
1617

1718
- Calling ``refresh(True)`` on a ``github3.structs.GitHubIterator`` actually
1819
works as expected now.
@@ -31,6 +32,15 @@ History/Changelog
3132

3233
- ``IssueComment.update`` was corrected to match GitHub's documentation
3334

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+
3444
0.5.3: 2013-03-19
3545
-----------------
3646

github3/auths.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,20 @@
1111

1212

1313
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+
"""
1528
def __init__(self, auth, session=None):
1629
super(Authorization, self).__init__(auth, session)
1730
#: Details about the application (name, url)

github3/events.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ class Event(GitHubObject):
1313
"""The :class:`Event <Event>` object. It structures and handles the data
1414
returned by via the `Events <http://developer.github.com/v3/events>`_
1515
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+
1627
"""
1728
def __init__(self, event):
1829
super(Event, self).__init__(event)

github3/gists/comment.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ class GistComment(BaseComment):
66
"""The :class:`GistComment <GistComment>` object. This represents a comment
77
on a gist.
88
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+
919
See also: http://developer.github.com/v3/gists/comments/
1020
"""
1121
def __init__(self, comment, session=None):

github3/gists/gist.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ class Gist(GitHubCore):
2121
you own it). You can also "star" or "unstar" the gist (again assuming you
2222
have authenticated).
2323
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+
2434
See also: http://developer.github.com/v3/gists/
2535
"""
2636
def __init__(self, data, session=None):

github3/gists/history.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@
44

55
class GistHistory(GitHubCore):
66
"""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+
"""
820
def __init__(self, history, session=None):
921
super(GistHistory, self).__init__(history, session)
1022
self._api = history.get('url', '')

github3/issues/comment.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ class IssueComment(BaseComment):
66
"""The :class:`IssueComment <IssueComment>` object. This structures and
77
handles the comments on issues specifically.
88
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+
919
See also: http://developer.github.com/v3/issues/comments/
1020
"""
1121
def __init__(self, comment, session=None):

github3/issues/event.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ class IssueEvent(GitHubCore):
66
with events described in the
77
`Issues\>Events <http://developer.github.com/v3/issues/events>`_ section of
88
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+
920
"""
1021
def __init__(self, event, issue=None):
1122
super(IssueEvent, self).__init__(event, None)

github3/issues/issue.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ class Issue(GitHubCore):
1313
"""The :class:`Issue <Issue>` object. It structures and handles the data
1414
returned via the `Issues <http://developer.github.com/v3/issues>`_ section
1515
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+
1627
"""
1728
def __init__(self, issue, session=None):
1829
super(Issue, self).__init__(issue, session)

github3/notifications.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ class Thread(GitHubCore):
1616
contains information about the repository generating the notification, the
1717
subject, and the reason.
1818
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+
1929
See also:
2030
http://developer.github.com/v3/activity/notifications/#view-a-single-thread
2131
"""

0 commit comments

Comments
 (0)
0