Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb6c86c1

Browse files
committed
A few minor changes.
1 parent70c381b commitb6c86c1

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

‎github3/notifications.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ def mark(self):
5959
6060
:returns: bool
6161
"""
62-
returnself._boolean(self._patch(self._api),205,404)
62+
mark= {'read':True}
63+
returnself._boolean(self._patch(self._api,data=dumps(mark)),205,
64+
404)
6365

6466
defset_subscription(self,subscribed,ignored):
6567
"""Set the user's subscription for this thread

‎github3/repos.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,6 +1528,22 @@ def list_watchers(self):
15281528
"""DEPRECATED: Use list_stargazers() instead."""
15291529
raiseDeprecationWarning('Use list_stargazers() instead.')
15301530

1531+
defmark_notifications(self,last_read=''):
1532+
"""Mark all notifications in this repository as read.
1533+
1534+
:param str last_read: (optional), Describes the last point that
1535+
notifications were checked. Anything updated since this time will
1536+
not be updated. Default: Now. Expected in ISO 8601 format:
1537+
``YYYY-MM-DDTHH:MM:SSZ``. Example: "2012-10-09T23:39:01Z".
1538+
:returns: bool
1539+
"""
1540+
url=self._build_url('notifications',base_url=self._api)
1541+
mark= {'read':True}
1542+
iflast_read:
1543+
mark['last_read_at']=last_read
1544+
returnself._boolean(self._put(url,data=dumps(mark)),
1545+
205,404)
1546+
15311547
defmerge(self,base,head,message=''):
15321548
"""Perform a merge from ``head`` into ``base``.
15331549

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp