Debian Codegraph @

src/globus_sdk/services/auth/response/consents.py

raw
1 from globus_sdk import IterableResponse
2 from globus_sdk.scopes.consents import ConsentForest
3
4
5 class GetConsentsResponse(IterableResponse):
6 """
7 Response class specific to the Get Consents API
8
9 Provides iteration on the "consents" array in the response.
10 """
11
12 default_iter_key = "consents"
13
14 def to_forest(self) -> ConsentForest:
15 """
16 Creates a ConsentForest from the consents in this response.
17
18 ConsentForest is a convenience class to make interacting with the
19 tree of consents simpler.
20 """
21 return ConsentForest(self)