Retrieve list of Leap projects accessible to the authenticated user.
(self)
| 395 | return parsed.data.project |
| 396 | |
| 397 | def list_projects(self) -> list[models.LeapProject]: |
| 398 | """Retrieve list of Leap projects accessible to the authenticated user.""" |
| 399 | path = 'projects/oauth/' |
| 400 | response = self.session.get(path) |
| 401 | parsed = models._LeapProjectsResponse.model_validate( |
| 402 | orjson.loads(response.content)) |
| 403 | return [p.project for p in parsed.data.projects] |
| 404 | |
| 405 | def get_project_token(self, *, |
| 406 | project: Optional[models.LeapProject] = None, |