(self)
| 68 | return json.loads(payload) |
| 69 | |
| 70 | def get_repository_data(self) -> dict: |
| 71 | url = f"https://api.github.com/repos/{self.owner}/{self.name}" |
| 72 | |
| 73 | try: |
| 74 | return self._get_json(url) |
| 75 | except HTTPError as exc: |
| 76 | if exc.code == 404: |
| 77 | raise NoSuchRepository(f"{self.owner}/{self.name}") from exc |
| 78 | else: |
| 79 | raise |
| 80 | except requests.HTTPError as exc: |
| 81 | if exc.response.status_code == 404: |
| 82 | raise NoSuchRepository(f"{self.owner}/{self.name}") from exc |
| 83 | else: |
| 84 | raise |
| 85 | |
| 86 | def get_contributors(self) -> list: |
| 87 | url = f"https://api.github.com/repos/{self.owner}/{self.name}/contributors" |
no test coverage detected