| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Provides API wrapper for the codesite issue tracker""" | 5 """Provides API wrapper for the codesite issue tracker""" |
| 6 | 6 |
| 7 from endpoints import endpoints | 7 from endpoints_client import endpoints |
| 8 from issue_tracker.issue import Issue | 8 from issue_tracker.issue import Issue |
| 9 from issue_tracker.comment import Comment | 9 from issue_tracker.comment import Comment |
| 10 | 10 |
| 11 from google.appengine.api import app_identity | 11 from google.appengine.api import app_identity |
| 12 | 12 |
| 13 | 13 |
| 14 DISCOVERY_URL = ('https://monorail%s.appspot.com/_ah/api/discovery/v1/apis/' | 14 DISCOVERY_URL = ('https://monorail%s.appspot.com/_ah/api/discovery/v1/apis/' |
| 15 '{api}/{apiVersion}/rest') | 15 '{api}/{apiVersion}/rest') |
| 16 | 16 |
| 17 | 17 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 rtn.extend([Comment(entry) for entry in feed['items']]) | 117 rtn.extend([Comment(entry) for entry in feed['items']]) |
| 118 | 118 |
| 119 return rtn | 119 return rtn |
| 120 | 120 |
| 121 def getIssue(self, issue_id): | 121 def getIssue(self, issue_id): |
| 122 """Retrieve a set of issues in a project.""" | 122 """Retrieve a set of issues in a project.""" |
| 123 request = self.client.issues().get( | 123 request = self.client.issues().get( |
| 124 projectId=self.project_name, issueId=issue_id) | 124 projectId=self.project_name, issueId=issue_id) |
| 125 entry = endpoints.retry_request(request) | 125 entry = endpoints.retry_request(request) |
| 126 return Issue(entry) | 126 return Issue(entry) |
| OLD | NEW |