Commit Graph
8 Commits
Author SHA1 Message Date
Kevin Rickard 8b6b4505b6 Fix bug in recursive repository contents example (#1166)
The previous code would prematurely exit when the intermediate contents list holds one thing, and that one thing has not been processed / expanded yet. Now the exit condition is when the contents list is empty, and there is nothing left to be processed.
2019-07-12 16:30:15 +10:00
Moritz Schubotz fd090eccbb Update Repository.rst (#1118)
the example confused me until I found https://github.com/PyGithub/PyGithub/issues/545
2019-06-27 22:36:40 +10:00
Justin Kufro a433a2fe3d Traffic Endpoints Support (#977)
Added support for the traffic endpoints found at https://developer.github.com/v3/repos/traffic/.

We added four functions to the Repository class (one for each of the endpoints) with corresponding unit tests. 

Fixes #926
2018-12-05 09:54:31 +08:00
Alice GIRARD 0a10d7cdf0 Mark notification as read (#932)
Wraps the parts of the notification API that allows the user to mark notifications as read.
New methods are : 
 
- Notification.mark_as_read : marks a single notification thread as read
- Repository.mark_notifications_as_read : marks all the notifications for a given repository as read
- AuthenticatedUser.mark_notifications_as_read : marks all the notifications as read

Aims to fix : https://github.com/PyGithub/PyGithub/issues/571 and simply uses the APIs described on this page : https://developer.github.com/enterprise/11.10.340/v3/activity/notifications/

A weird thing I noticed doing this is that Repository.notifications_url doesn't seem to be usable directly. I used Repository.url + "/notifications" instead.
2018-10-19 07:24:45 +08:00
Juri Di Rocco 5e69ff00a3 Update Repository.rst (#935)
stargazers count attribute  is misspelled
2018-10-17 17:00:42 +08:00
AetherDeity ee9f098d91 Add a trailing slash to URL when updating or deleting a file (tests fixed) (#931)
* Add a trailing slash to URL when updating or deleting a file.

* Update test files to match new create/update/delete_file Repo methods

* Add trailing slash to get_contents() method

* update tests

* add missing slash in get_dir_contents

* add example usage

* remove dup slashes in tests

* clarify example comments
2018-10-17 08:21:17 +08:00
Vishal Sodani 19165519a9 Add examples for Repository as per #874 (#917) 2018-10-06 18:28:51 +08:00
Wan Liuyang 3eb695484b Set up example docs skeleton 2018-08-21 16:03:35 +08:00