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

Commitbd3c7fc

Browse files
committed
Remove Downloads API
See deprecation discussion here:github/developer.github.com#389
1 parentc7cf147 commitbd3c7fc

File tree

2 files changed

+0
-105
lines changed

2 files changed

+0
-105
lines changed

‎github3/repos/download.py

Lines changed: 0 additions & 69 deletions
This file was deleted.

‎github3/repos/repo.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
fromgithub3.repos.commitimportRepoCommit
2626
fromgithub3.repos.comparisonimportComparison
2727
fromgithub3.repos.contentsimportContents,validate_commmitter
28-
fromgithub3.repos.downloadimportDownload
2928
fromgithub3.repos.hookimportHook
3029
fromgithub3.repos.statusimportStatus
3130
fromgithub3.repos.statsimportContributorStats
@@ -876,24 +875,6 @@ def delete_key(self, key_id):
876875
url=self._build_url('keys',str(key_id),base_url=self._api)
877876
returnself._boolean(self._delete(url),204,404)
878877

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-
897878
@requires_auth
898879
defedit(self,
899880
name,
@@ -1198,23 +1179,6 @@ def iter_contributor_statistics(self, number=-1, etag=None):
11981179
url=self._build_url('stats','contributors',base_url=self._api)
11991180
returnself._iter(int(number),url,ContributorStats,etag=etag)
12001181

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-
12181182
defiter_events(self,number=-1,etag=None):
12191183
"""Iterate over events on this repository.
12201184

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp