|
25 | 25 | fromgithub3.repos.commitimportRepoCommit
|
26 | 26 | fromgithub3.repos.comparisonimportComparison
|
27 | 27 | fromgithub3.repos.contentsimportContents,validate_commmitter
|
28 |
| -fromgithub3.repos.downloadimportDownload |
29 | 28 | fromgithub3.repos.hookimportHook
|
30 | 29 | fromgithub3.repos.statusimportStatus
|
31 | 30 | fromgithub3.repos.statsimportContributorStats
|
@@ -876,24 +875,6 @@ def delete_key(self, key_id):
|
876 | 875 | url=self._build_url('keys',str(key_id),base_url=self._api)
|
877 | 876 | returnself._boolean(self._delete(url),204,404)
|
878 | 877 |
|
879 |
| -defdownload(self,id_num): |
880 |
| -"""Get a single download object by its id. |
881 |
| -
|
882 |
| - .. warning:: |
883 |
| -
|
884 |
| - On 2012-03-11, GitHub will be deprecating the Downloads API. This |
885 |
| - method will no longer work. |
886 |
| -
|
887 |
| - :param int id_num: (required), id of the download |
888 |
| - :returns: :class:`Download <Download>` if successful, else None |
889 |
| - """ |
890 |
| -json=None |
891 |
| -ifint(id_num)>0: |
892 |
| -url=self._build_url('downloads',str(id_num), |
893 |
| -base_url=self._api) |
894 |
| -json=self._json(self._get(url),200) |
895 |
| -returnDownload(json,self)ifjsonelseNone |
896 |
| - |
897 | 878 | @requires_auth
|
898 | 879 | defedit(self,
|
899 | 880 | name,
|
@@ -1198,23 +1179,6 @@ def iter_contributor_statistics(self, number=-1, etag=None):
|
1198 | 1179 | url=self._build_url('stats','contributors',base_url=self._api)
|
1199 | 1180 | returnself._iter(int(number),url,ContributorStats,etag=etag)
|
1200 | 1181 |
|
1201 |
| -defiter_downloads(self,number=-1,etag=None): |
1202 |
| -"""Iterate over available downloads for this repository. |
1203 |
| -
|
1204 |
| - .. warning:: |
1205 |
| -
|
1206 |
| - On 2012-03-11, GitHub will be deprecating the Downloads API. This |
1207 |
| - method will no longer work. |
1208 |
| -
|
1209 |
| - :param int number: (optional), number of downloads to return. Default: |
1210 |
| - -1 returns all available downloads |
1211 |
| - :param str etag: (optional), ETag from a previous request to the same |
1212 |
| - endpoint |
1213 |
| - :returns: generator of :class:`Download <Download>`\ s |
1214 |
| - """ |
1215 |
| -url=self._build_url('downloads',base_url=self._api) |
1216 |
| -returnself._iter(int(number),url,Download,etag=etag) |
1217 |
| - |
1218 | 1182 | defiter_events(self,number=-1,etag=None):
|
1219 | 1183 | """Iterate over events on this repository.
|
1220 | 1184 |
|
|